mirror of
https://github.com/qurator-spk/dinglehopper.git
synced 2025-06-09 20:00:01 +02:00
Added some helpful tools and configurations
This commit is contained in:
parent
5cbd4f3d95
commit
03ad413f4a
5 changed files with 53 additions and 6 deletions
2
.coveragerc
Normal file
2
.coveragerc
Normal file
|
@ -0,0 +1,2 @@
|
|||
[run]
|
||||
omit = qurator/dinglehopper/tests/*
|
|
@ -1,10 +1,37 @@
|
|||
Testing
|
||||
-------
|
||||
# Testing
|
||||
|
||||
Use `pytest` to run the tests in [the tests directory](qurator/dinglehopper/tests):
|
||||
~~~
|
||||
```bash
|
||||
virtualenv -p /usr/bin/python3 venv
|
||||
. venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
pip install pytest
|
||||
pip install -r requirements-dev.txt
|
||||
pytest
|
||||
~~~
|
||||
```
|
||||
|
||||
### Test running examples
|
||||
### Only unit tests
|
||||
```bash
|
||||
pytest -m "not integration"
|
||||
```
|
||||
|
||||
### Only integration tests
|
||||
```bash
|
||||
pytest -m integration
|
||||
```
|
||||
|
||||
### All tests
|
||||
```bash
|
||||
pytest
|
||||
```
|
||||
|
||||
### All tests with code coverage
|
||||
```bash
|
||||
pytest --cov=qurator --cov-report=html
|
||||
```
|
||||
|
||||
### Static code analysis
|
||||
```bash
|
||||
pytest -k "not test" --flake8
|
||||
pytest -k "not test" --mypy
|
||||
```
|
||||
|
|
4
requirements-dev.txt
Normal file
4
requirements-dev.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
pytest
|
||||
pytest-flake8
|
||||
pytest-cov
|
||||
pytest-mypy
|
12
setup.cfg
12
setup.cfg
|
@ -1,2 +1,12 @@
|
|||
[flake8]
|
||||
max-line-length = 90
|
||||
max-line-length = 88
|
||||
extend-ignore = E203, W503
|
||||
|
||||
[pylint]
|
||||
max-line-length = 88
|
||||
|
||||
[pylint.messages_control]
|
||||
disable = C0330, C0326
|
||||
|
||||
[mypy]
|
||||
ignore_missing_imports = True
|
||||
|
|
4
setup.py
4
setup.py
|
@ -4,6 +4,9 @@ from setuptools import find_packages, setup
|
|||
with open("requirements.txt") as fp:
|
||||
install_requires = fp.read()
|
||||
|
||||
with open('requirements-dev.txt') as fp:
|
||||
tests_require = fp.read()
|
||||
|
||||
setup(
|
||||
name="dinglehopper",
|
||||
author="Mike Gerber, The QURATOR SPK Team",
|
||||
|
@ -16,6 +19,7 @@ setup(
|
|||
namespace_packages=["qurator"],
|
||||
packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
|
||||
install_requires=install_requires,
|
||||
tests_require=tests_require,
|
||||
package_data={
|
||||
"": ["*.json", "templates/*"],
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue