Skip to content

Commit

Permalink
ci: extract dev config files from tox.ini
Browse files Browse the repository at this point in the history
Better to only keep tox job definitions in the tox.ini file. Note that
config files are only extracted if their respective tools supports a
config file name that starts with a dot
  • Loading branch information
redeboer committed Apr 15, 2021
1 parent 5fbcc19 commit 7eb3866
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 55 deletions.
2 changes: 2 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@
"*.svg",
"*particle*.*ml",
".constraints/*.txt",
".flake8*",
".gitignore",
".gitpod.*",
".mypy.ini",
".pre-commit-config.yaml",
".pydocstyle*",
".pylintrc",
".readthedocs.yml",
".vscode/*",
Expand Down
36 changes: 36 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[flake8]
application-import-names =
tensorwaves
filename =
./src/*.py
./tests/*.py
exclude =
__pycache__
docs/conf.py
typings/**
ignore = # more info: https://www.flake8rules.com/
E203 # https://github.com/psf/black#slices
E231 # allowed by black
E501 # https://github.com/psf/black#line-length
RST299 # missing pygments
RST201 # block quote ends without a blank line (black formatting)
RST301 # unexpected indentation (related to google style docstring)
W503 # https://github.com/psf/black#line-breaks--binary-operators
rst-roles =
attr,
cite,
class,
doc,
download,
file,
func,
meth,
mod,
ref,
rst-directives =
deprecated,
envvar,
exception,
glue:figure,
glue:math,
seealso,
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/ComPWA/repo-maintenance
rev: 0.0.10
rev: 0.0.11
hooks:
- id: check-dev-files
- id: fix-first-nbcell
Expand Down
11 changes: 11 additions & 0 deletions .pydocstyle
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[pydocstyle]
convention = google
add_ignore =
D101, # class docstring
D102, # method docstring
D103, # function docstring
D105, # magic method docstring
D107, # init docstring
D203, # conflicts with D211
D213, # multi-line docstring should start at the second line
D407, # missing dashed underline after section
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"rewrap.wrappingColumn": 79,
"search.exclude": {
"**/tests/**/__init__.py": true,
"*/tox.ini": true,
"*/.pydocstyle": true,
".constraints/*.txt": true
},
"telemetry.enableCrashReporter": false,
Expand Down
File renamed without changes.
File renamed without changes.
56 changes: 3 additions & 53 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ changedir = docs
allowlist_externals =
make
commands =
make ignore-warnings=1 doctest # for margin directive
make ignore-warnings=1 doctest # for margin directive

[testenv:linkcheck]
description =
Expand All @@ -90,7 +90,7 @@ changedir = docs
allowlist_externals =
make
commands =
make ignore-warnings=1 linkcheck # for margin directive
make ignore-warnings=1 linkcheck # for margin directive

[testenv:pydeps]
description =
Expand All @@ -115,63 +115,13 @@ allowlist_externals =
mypy
pre-commit
commands =
mypy src tests # run separately because of potential caching problems
mypy src tests # run separately because of potential caching problems
pre-commit run {posargs} -a


[coverage:run]
branch = True
source = src

[flake8]
application-import-names =
tensorwaves
filename =
./src/*.py
./tests/*.py
exclude =
__pycache__
docs/conf.py
typings/**
ignore = # more info: https://www.flake8rules.com/
E203 # https://github.com/psf/black#slices
E231 # allowed by black
E501 # https://github.com/psf/black#line-length
RST299 # missing pygments
RST201 # block quote ends without a blank line (black formatting)
RST301 # unexpected indentation (related to google style docstring)
W503 # https://github.com/psf/black#line-breaks--binary-operators
rst-roles =
attr,
cite,
class,
doc,
download,
file,
func,
meth,
mod,
ref,
rst-directives =
deprecated,
envvar,
exception,
glue:figure,
glue:math,
seealso,

[pydocstyle]
convention=google
add_ignore =
D101, # class docstring
D102, # method docstring
D103, # function docstring
D105, # magic method docstring
D107, # init docstring
D203, # conflicts with D211
D213, # multi-line docstring should start at the second line
D407, # missing dashed underline after section

[pytest]
addopts =
--color=yes
Expand Down
File renamed without changes.

0 comments on commit 7eb3866

Please sign in to comment.