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.91.tar.gz
(28.3 kB
view hashes)
Built Distribution
Close
Hashes for gaohn-common-utils-0.0.91.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb57ccf1af0c8567fb1826d9d1d1a8b6554851afce6a1b323991fa2602189004 |
|
MD5 | 0b183e820f9037848ec483e7882d0349 |
|
BLAKE2b-256 | ebc84882989c88bcd9b4d562cafc0bf358bfe982fee0b66d3fb8e72c15fcece7 |
Close
Hashes for gaohn_common_utils-0.0.91-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c5c7850c5ee760b0a753441346292d554a58478f4253f048b9297aa3bc34a4a |
|
MD5 | ce100bca3be4509cefafb43f63ec5966 |
|
BLAKE2b-256 | 616f7d370e4f1145e1dc43e744e9e7d8074b8f26833a3a313f20299561a9da3f |