Excluded ipynb files from json pretty formatter + poetry update (#50)

* Excluded ipynb files from json pretty formatter +  poetry update
* Reworked pip audit
* Relocated dependencies
* Reworked the tests a bit.
* Poetry update
* Excluded lint and test workflows against the target branch
This commit is contained in:
Philipp Horstenkamp 2023-08-16 20:25:15 +02:00 committed by GitHub
parent 1e7e55e649
commit 9c237402be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 545 additions and 50 deletions

View File

@ -49,7 +49,7 @@ jobs:
- run: poetry install --without develop,doc
- name: Run linters
run: |
mypy src tests
mypy src tests --install-types --non-interactive
ruff:
runs-on: ubuntu-latest
@ -85,8 +85,8 @@ jobs:
run: poetry export -f requirements.txt --output requirements.txt
- name: Check license
run: |
poetry run pip install pip-licenses
poetry run pip-licenses --format=markdown --output-file=license-summary.md
pip install pip-licenses
pip-licenses --format=markdown --output-file=license-summary.md
- name: Archive license summary
uses: actions/upload-artifact@v3
with:
@ -95,6 +95,7 @@ jobs:
license-summary.md
requirements.txt
- name: Check requirements security with pip-audit
uses: pypa/gh-action-pip-audit@v1.0.0
with:
inputs: requirements.txt
run: |
pip install pip-audit
pip-audit -r requirements.txt --no-deps --disable-pip || true
pip-audit -r requirements.txt --format=markdown --output=lbr-audit.md --no-deps --disable-pip

View File

@ -2,7 +2,6 @@ name: Test & Build
on:
pull_request:
pull_request_target:
push:
paths:
- '*.py'

View File

@ -22,6 +22,7 @@ repos:
- id: destroyed-symlinks
- id: debug-statements
- id: pretty-format-json
exclude: (\.ipynb$)
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
@ -52,7 +53,7 @@ repos:
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.4.1
rev: v1.5.0
hooks:
- id: mypy
additional_dependencies:
@ -77,6 +78,6 @@ repos:
- id: validate-html
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.24.0
rev: 0.24.1
hooks:
- id: check-github-workflows

571
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -6,6 +6,7 @@ requires = ["poetry-core"]
disallow_untyped_defs = true
exclude = ".ipynb_checkpoints, .mypy_cache, .mytest_cache, build"
follow_imports = "silent"
ignore_missing_imports = true
plugins = ["sqlalchemy.ext.mypy.plugin"]
python_version = "3.11"
warn_redudant_casts = true
@ -40,7 +41,6 @@ python = "^3.11"
seaborn = "^0.12.2"
selenium = "^4.10.0"
tqdm = "^4.65.0"
types-tqdm = "^4.65.0"
[tool.poetry.group.develop.dependencies]
black = {extras = ["jupyter"], version = "^23.3.0"}
@ -64,8 +64,11 @@ sphinxcontrib-napoleon = "^0.7"
black = "^23.3.0"
mypy = "^1.3.0"
pandas-stubs = "^2.0.1.230501"
pip-audit = "^2.6.1"
pip-licenses = "^4.3.2"
ruff = "^0.0.270"
types-requests = "^2.31.0.1"
types-tqdm = "^4.65.0"
[tool.poetry.group.test.dependencies]
pytest = "^7.3.1"