Skip to content

Commit

Permalink
Release/v0.4.0 (#163)
Browse files Browse the repository at this point in the history
* switch from black and pylint to ruff

* fix Table nb with demos and docu; works with latest Genesis and pystatis version

* update dependencies; switch to ruff; add mypy to pre-commit hooks

* run mypy in src

* format

* format and lint

* switch from black to ruff

* add tests for missing db coverage

* fix typos and add try catch for helloworld

* fix security issue

* update version of safety action
  • Loading branch information
pmayd authored Dec 4, 2024
1 parent 65c3f76 commit 85b09ac
Show file tree
Hide file tree
Showing 64 changed files with 80,820 additions and 147,146 deletions.
11 changes: 0 additions & 11 deletions .flake8

This file was deleted.

15 changes: 5 additions & 10 deletions .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,16 @@ jobs:
poetry-version: ${{ vars.POETRY_VERSION }}
- name: Install dependencies
run: poetry install --with dev
- name: Run black
run: poetry run black . --check
- name: Run isort
run: poetry run isort . --check-only
- name: Run flake8
run: poetry run flake8 src --output-file=flake8_report.txt
- name: Run pylint
run: poetry run pylint src --recursive=y
- name: Ruff format check
run: poetry run ruff format --check src
- name: Ruff lint check
run: poetry run ruff check src
- name: Run bandit
run: poetry run bandit -r src
- name: Run Safety CLI to check for vulnerabilities
uses: pyupio/safety-action@v1
uses: pyupio/safety-action@v1.0.1
with:
api-key: ${{ secrets.SAFETY_API_KEY }}
continue-on-error: true # Do not fail this action if vulnerabilities are found
args: "--short-report --policy-file=.safety-policy.yml"
- name: Run mypy
run: poetry run mypy src
Expand Down
25 changes: 15 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,6 @@ repos:
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: check-merge-conflict
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
args: ["--profile", "black", "--filter-files", "--line-length", "120"]
- repo: https://github.com/psf/black
rev: 23.10.0
hooks:
- id: black
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.27.0
hooks:
Expand All @@ -34,3 +24,18 @@ repos:
- id: python-safety-dependencies-check
files: pyproject.toml
args: ["--short-report", "--policy-file=.safety-policy-v2.yml"]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.8.1
hooks:
# Run the linter.
- id: ruff
args: [--fix]
# Run the formatter.
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0 # Use the sha / tag you want to point at
hooks:
- id: mypy
args: [--strict, --ignore-missing-imports]
files: ^src/
Loading

0 comments on commit 85b09ac

Please sign in to comment.