A small utility package
Project description
Common Utils
TODOs
- Use own
Logger
once the class is finalized in all scripts.
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.75.tar.gz
(25.6 kB
view hashes)
Built Distribution
Close
Hashes for gaohn-common-utils-0.0.75.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e72410dceffef805feb6145046632c3c2f881e0f9cb548be00050d1534deb1e0 |
|
MD5 | 0222532e173bb7c9df99e028d84f50a0 |
|
BLAKE2b-256 | 340b9a42f3ef5fc1e11b9c29ab4ea6dd976766a5344ca010731f8e3f7db80ed0 |
Close
Hashes for gaohn_common_utils-0.0.75-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8877cd5b5c3b0005945c9eda36ad340df3abcc42e91a34a356c80ae382ddca2 |
|
MD5 | d52b4c5a325499198afd07104ae709f3 |
|
BLAKE2b-256 | 2437c1011c7395efeb4ed902e7a8e0bcc0cd3ca7dcef2c0f12cba9366575bbcc |