-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
43b20ff
commit 64f2c5c
Showing
5 changed files
with
137 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,53 @@ | ||
name: Code Checks | ||
name: Continuous Integration | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: read | ||
concurrency: | ||
group: ci-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
code-checks: | ||
name: Code Checks | ||
pylint: | ||
name: PyLint | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
- uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
cache: 'pip' | ||
- name: Install | ||
run: | | ||
python3 -m pip install -U -r requirements.txt | ||
- name: Run | ||
run: | | ||
echo -e "\n\`\`\`\n" >> $GITHUB_STEP_SUMMARY | ||
pylint --ignore="=~,__pycache__,venv,.mypy_cache" . >> $GITHUB_STEP_SUMMARY | ||
echo -e "\n\`\`\`\n" >> $GITHUB_STEP_SUMMARY | ||
mypy: | ||
name: MyPy | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
cache: 'pip' | ||
- name: Install | ||
run: | | ||
python3 -m pip install -U -r requirements.txt | ||
mkdir lint | ||
- name: PyLint | ||
run: pylint --recursive yes --ignore="__pycache__,venv,.mypy_cache" --output-format=text:lint/pylint.txt . | ||
- name: MyPy | ||
run: mypy pypu.py --strict --any-exprs-report ./lint --lineprecision-report ./lint | ||
- name: Update Diagrams | ||
- name: Run | ||
run: | | ||
python3 pypu.py -m ./ -f svg > ./example.svg | ||
python3 pypu.py -m ./data/ -f svg > ./data/uml.svg | ||
python3 pypu.py -m ./utils/ -f svg > ./utils/uml.svg | ||
- name: PDoc | ||
run: pdoc pypu.py utils data --favicon https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsoutlined/code/default/48px.svg --logo https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsoutlined/code/default/48px.svg -o ./docs | ||
- name: Upload Lint Results | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Lint | ||
path: ./lint/ | ||
- name: Upload PDoc | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: ./docs/ | ||
deploy: | ||
name: Deploy Documentation | ||
needs: code-checks | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- id: deployment | ||
uses: actions/deploy-pages@v2 | ||
echo -e "\n\`\`\`\n" >> $GITHUB_STEP_SUMMARY | ||
mypy >> $GITHUB_STEP_SUMMARY | ||
echo -e "\n\`\`\`\n" >> $GITHUB_STEP_SUMMARY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: docs-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
generate: | ||
name: Generate Documentation | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
cache: 'pip' | ||
- name: Install | ||
run: | | ||
python3 -m pip install -U -r requirements.txt | ||
- name: Update Diagrams | ||
run: | | ||
python3 pypu.py -m ./ -f svg > ./example.svg | ||
python3 pypu.py -m ./data/ -f svg > ./data/uml.svg | ||
python3 pypu.py -m ./utils/ -f svg > ./utils/uml.svg | ||
- name: PDoc | ||
run: pdoc pypu.py utils data --favicon https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsoutlined/code/default/48px.svg --logo https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsoutlined/code/default/48px.svg -o ./docs | ||
- name: Upload PDoc | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: ./docs/ | ||
deploy: | ||
name: Deploy Documentation | ||
needs: generate | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,46 @@ | ||
[MAIN] | ||
fail-on=I | ||
|
||
check-quote-consistency=yes | ||
|
||
jobs=0 | ||
|
||
recursive=yes | ||
|
||
load-plugins=pylint.extensions.broad_try_clause, | ||
pylint.extensions.code_style, | ||
pylint.extensions.comparison_placement, | ||
pylint.extensions.confusing_elif, | ||
pylint.extensions.for_any_all, | ||
pylint.extensions.consider_refactoring_into_while_condition, | ||
pylint.extensions.consider_ternary_expression, | ||
pylint.extensions.bad_builtin, | ||
pylint.extensions.mccabe, | ||
pylint.extensions.dict_init_mutate, | ||
pylint.extensions.docstyle, | ||
pylint.extensions.dunder, | ||
pylint.extensions.check_elif, | ||
pylint.extensions.empty_comment, | ||
pylint.extensions.eq_without_hash, | ||
pylint.extensions.private_import, | ||
pylint.extensions.redefined_variable_type, | ||
pylint.extensions.no_self_use, | ||
pylint.extensions.overlapping_exceptions, | ||
pylint.extensions.docparams, | ||
pylint.extensions.redefined_loop_name, | ||
pylint.extensions.set_membership, | ||
pylint.extensions.typing, | ||
pylint.extensions.while_used, | ||
|
||
[REPORTS] | ||
score=no | ||
|
||
[BASIC] | ||
module-naming-style=any | ||
|
||
[MESSAGES CONTROL] | ||
# C0103: Naming convention violation | ||
# C0114: Missing module docstring | ||
# R0903: Too few public methods | ||
disable=C0103,C0114,R0903 | ||
disable=missing-module-docstring, | ||
too-few-public-methods, | ||
docstring-first-line-empty, | ||
consider-using-assignment-expr, | ||
while-used, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
[mypy] | ||
files = pypu.py | ||
strict = True | ||
ignore_missing_imports = True |