A small utility package
Project description
Common Utils
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>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gaohn-common-utils-0.0.111.tar.gz
(32.1 kB
view hashes)
Built Distribution
Close
Hashes for gaohn-common-utils-0.0.111.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac02eed7835e4c8ab697743c7afe60c47d15d8f4a9847457e910f20977820bb1 |
|
MD5 | 69472d32c9502e1741fcfeaa6de3ad2c |
|
BLAKE2b-256 | 347aa7da4ebf2314ac8e3d29c41505c47e9d348c8b9bedf341fa9e847370850a |
Close
Hashes for gaohn_common_utils-0.0.111-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cf84a4a2c2a16f4d4a31a83e2da2c72dc2caa9b8400dd434a98e1154169f571 |
|
MD5 | 9d4b609bb01cdd7a8088ef17d701e61d |
|
BLAKE2b-256 | e0473635c971cfaee0b58ee55743c41b11c38308ac3adbec83c910c10074e05f |