Skip to content
Snippets Groups Projects
Commit d6d9372c authored by Klaas Kliffen's avatar Klaas Kliffen :satellite:
Browse files

Merge branch 'main' into 'requirements-info'

# Conflicts:
#   tests/requirements.txt
parents 68ec691d 69073f94
No related branches found
No related tags found
1 merge request!7Add minimal versions and licensing information for requirements
......@@ -3,3 +3,5 @@ dist/*
*.pyc
.coverage
coverage.xml
htmlcov/*
......@@ -45,6 +45,19 @@ run_pylint:
# script:
# - echo "build fortran/c/cpp extension source code"
run_unit_tests_coverage:
stage: test
image: python:3.7
script:
- tox -e coverage
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
paths:
- htmlcov/*
run_unit_tests:
stage: test
image: python:3.${PY_VERSION}
......
......@@ -22,7 +22,22 @@ cool_module.greeter() # prints "Hello World"
## Contributing
To contribute, please create a feature branch and a "Draft" merge request.
Upon completion, the merge request should be marked as ready and a reviewer should be assigned.
Upon completion, the merge request should be marked as ready and a reviewer
should be assigned.
Verify your changes locally and be sure to add tests. Verifying local
changes is done through `tox`.
```pip install tox```
With tox the same jobs as run on the CI/CD pipeline can be ran. These
include unit tests and linting.
```tox```
To automatically apply most suggested linting changes execute:
```tox -e format```
## License
This project is licensed under the Apache License Version 2.0
autopep8 >= 1.7.0 # MIT
black >= 22.0.0 # MIT
build >= 0.8.0 # MIT
flake8 >= 5.0.0 # MIT
......
......@@ -16,11 +16,16 @@ deps =
-r{toxinidir}/tests/requirements.txt
commands =
{envpython} --version
{envpython} -m pytest --cov=map
{envpython} -m pytest
[testenv:coverage]
commands =
{envpython} --version
{envpython} -m pytest --cov-report xml --cov-report html --cov=map
# Use generative name and command prefixes to reuse the same virtualenv
# for all linting jobs.
[testenv:{pep8,black,pylint}]
[testenv:{pep8,black,pylint,format}]
usedevelop = False
envdir = {toxworkdir}/linting
commands =
......@@ -30,6 +35,10 @@ commands =
black: {envpython} -m black --check --diff .
pylint: {envpython} -m pylint --version
pylint: {envpython} -m pylint map tests
format: {envpython} -m autopep8 -v -aa --in-place --recursive map
format: {envpython} -m autopep8 -v -aa --in-place --recursive tests
format: {envpython} -m black -v .
[testenv:build]
usedevelop = False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment