Skip to content

Commit

Permalink
Consolidate bandit and flake8 configs into pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
MetRonnie committed Oct 19, 2023
1 parent a59c119 commit a332085
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 29 deletions.
1 change: 0 additions & 1 deletion .bandit

This file was deleted.

5 changes: 5 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,13 @@ jobs:
run: pip install -e .[all]

- name: Style
if: !matrix.coverage
run: flake8

- name: Bandit
if: !matrix.coverage
run: bandit -r metomi/isodatetime -c pyproject.toml

- name: Run tests
env:
TZ: ${{ matrix.tz }}
Expand Down
16 changes: 16 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,23 @@ test = [
"pytest-cov",
"pytest-xdist",
"flake8",
"bandit",
]
all = [
"metomi-isodatetime[test]",
]


[tool.pytest.ini_options]
addopts = "-v -s -ra --color=auto --doctest-glob='*.md' -m 'not slow'"
markers = [
"slow: mark a test as slow - it will be skipped by default (use '-m \"slow or not slow\"' to run all tests)"
]
testpaths = [
"metomi/isodatetime/tests",
"README.md",
]


[tool.bandit]
exclude_dirs = ["metomi/isodatetime/tests"]
28 changes: 0 additions & 28 deletions pytest.ini

This file was deleted.

0 comments on commit a332085

Please sign in to comment.