Commit 1eac674e authored by Teake Nutma's avatar Teake Nutma

Add docstring checking to CI and split various task into different jobs

parent 742e0239
Pipeline #1129 failed with stage
in 2 minutes and 1 second
......@@ -9,10 +9,22 @@ cache:
- .pip-cache
- .tox
lint:
stages:
- test
lint_docs:
stage: test
allow_failure: true
script:
- tox -e lint_docs
lint_style:
stage: test
allow_failure: true
script:
- tox -e lint
- tox -e lint_style
test:
lint_syntax:
stage: test
script:
- tox -e test
- tox -e lint_syntax
......@@ -6,13 +6,31 @@ commands=
python -m pytest --cov=datamodelvalidator/ tests/
[testenv:lint]
[testenv:lint_style]
deps=
pep8
pylint
commands=
# Pylint 1.6.4 does not fully support PEP 484 type hints, which is why we also use pep8.
# When pylint 2.0 is released we could rely solely on pylint (without the --disable=R,C option) and remove pep8.
pep8 --max-line-length=120 datamodelvalidator/ tests/
# no-value-for-parameter is disabled because pylint doesn't take decorators into account (pylint issue #207
pylint --max-line-length=120 --reports=no --disable=R,C,no-value-for-parameter,protected-access --extension-pkg-whitelist=lxml datamodelvalidator
[testenv:lint_syntax]
deps=
pylint
commands=
# no-value-for-parameter is disabled because pylint doesn't take decorators into account (see pylint issue #207)
pylint datamodelvalidator \
--reports=no --score=no --max-line-length=120 --disable=C,R0903,no-value-for-parameter,protected-access \
--extension-pkg-whitelist=lxml
[testenv:lint_docs]
ignore_errors=True
deps=
pylint
pydocstyle
commands=
pylint datamodelvalidator \
--reports=no --score=no \
--load-plugins=pylint.extensions.docparams \
--accept-no-param-doc=no --accept-no-raise-doc=no --accept-no-return-doc=no --accept-no-yields-doc=no \
--disable=all --enable=C0111,parameter_documentation
pydocstyle datamodelvalidator --convention=numpy --add-ignore=D1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment