Skip to main content

Common Utils

Continuous Integration

Continuous Integration

Virtual Environment

First, make a virtual environment with make_venv.sh:

curl -s -o make_venv.sh \
  https://raw.githubusercontent.com/gao-hongnan/common-utils/main/scripts/devops/make_venv.sh && \
bash make_venv.sh venv --pyproject --dev && \
source venv/bin/activate && \
rm make_venv.sh

Continue on error vs If Always

See here.

Run Bandit Security Check

bash ./scripts/devops/ci/ci_security_bandit.sh \
  --severity-level=low \
  --format=json \
  --output=bandit_results.json \
  common_utils

Run Linter Check

bash ./scripts/devops/ci/ci_linter_pylint.sh \
  --rcfile=pyproject.toml \
  --fail-under=10 \
  --score=yes \
  --output-format=json:pylint_results.json,colorized \
  common_utils

Run Formatter Black Check

bash ./scripts/devops/ci/ci_formatter_black.sh \
  --check \
  --diff \
  --color \
  --verbose \
  common_utils

Run Formatter Isort Check

bash ./scripts/devops/ci/ci_formatter_isort.sh \
  --check \
  --diff \
  --color \
  --verbose \
  common_utils

Run MyPy Type Check

bash ./scripts/devops/ci/ci_typing_mypy.sh \
  --config-file=pyproject.toml \
  common_utils \
  | tee mypy_results.log

Run Unit Test

Run Integration Test

Run System Test

Run Acceptance Test

See madewithml.

Run Data Test (Great Expectations)

Run Markdown Lint

npm install -g markdownlint-cli && \
touch .markdownlint.json && \
npm install --save-dev --save-exact prettier
# prettier
function pr() {
  if [ -z "$1" ]; then
    echo "Error: TARGET_DIR is mandatory."
    return 1
  fi

  TARGET_DIR="$1"
  prettier "$TARGET_DIR" --write \
    --prose-wrap always \
    --print-width 80 \
    --tab-width 4 \
    --use-tabs true
}
pr <TARGET_MARKDOWN_FILE>
markdownlint --fix <TARGET_MARKDOWN_FILE>

Release files for gaohn-common-utils 0.0.112

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gaohn-common-utils 0.0.112
File Size Uploaded
gaohn-common-utils-0.0.112.tar.gz 32.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gaohn-common-utils 0.0.112
File Interpreter ABI Platform
gaohn_common_utils-0.0.112-py3-none-any.whl Python 3 none any Details

Total release size: 71.8 kB

Release files / gaohn-common-utils-0.0.112.tar.gz

Download URL gaohn-common-utils-0.0.112.tar.gz
Size 32.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6b90992bd1a93e66b6d83a8478094433e74e341107ab46e7e0639394779092a5
BLAKE2b-256 checksum
How to use checksums
a7dd9ee5730b25493d7cac5a948ae6f7033925a73ce77c40c081e2e81c982d8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.17

Release files / gaohn_common_utils-0.0.112-py3-none-any.whl

Download URL gaohn_common_utils-0.0.112-py3-none-any.whl
Size 39.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
82e36614c4adb902ad5bc95092fd3076ace4ecd95acd6b5d0ccd9d8049f85722
BLAKE2b-256 checksum
How to use checksums
82d7dd98d2c364fb795fd1a611754ba70e24ebbf72fada449704524255959e55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.17

Release history Release notifications | RSS feed

This release

0.0.112 This release

2 release files

0.0.97

2 release files

0.0.96

2 release files

0.0.95

2 release files

0.0.94

2 release files

0.0.93

2 release files

0.0.92

2 release files

0.0.91

2 release files

0.0.90

2 release files

0.0.86

2 release files

0.0.85

2 release files

0.0.83

2 release files

0.0.82

2 release files

0.0.81

2 release files

0.0.80

2 release files

0.0.79

2 release files

0.0.78

2 release files

0.0.77

2 release files

0.0.76

2 release files

0.0.75

2 release files

0.0.73

2 release files

0.0.72

2 release files

0.0.70

2 release files

0.0.69

2 release files

0.0.68

2 release files

0.0.67

2 release files

0.0.65

2 release files

0.0.64

2 release files

0.0.63

2 release files

0.0.62

2 release files

0.0.61

2 release files

0.0.60

2 release files

0.0.59

2 release files

0.0.58

2 release files

0.0.57

2 release files

0.0.56

2 release files

0.0.55

2 release files

0.0.54

2 release files

0.0.53

2 release files

0.0.52

2 release files

0.0.51

2 release files

0.0.49

2 release files

0.0.48

2 release files

0.0.47

2 release files

0.0.46

2 release files

0.0.45

2 release files

0.0.43

2 release files

0.0.42

2 release files

0.0.41

2 release files

0.0.40

2 release files

0.0.39

2 release files

0.0.38

2 release files

0.0.37

2 release files

0.0.36

2 release files

0.0.35

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page