Validates the codecov.yml
configuration file.
This python package executes the equivalent of the curl
command described in the
codecov documentation, and it can be
integrated in the pre-commit.
This package was inspired by gitlab-lint,
a package that checks .gitlab-ci.yml
configuration file.
The recommended use is to add it in the .pre-commit-config.yaml
file
- repo: https://github.com/mashi/codecov-validator
rev: v1.0.0 # replace by any tag version >= 1.0.0 available
hooks:
- id: ccv
# args: [--filename, .codecov.yml] # example with arguments
In this way, the codecov.yml
file is checked before commit
and prevents the
user from including invalid files in the version control.
The development uses:
-
Version control with git to track changes.
-
A pre-commit to maintain the quality of the code. It helps identify issues, for example, code formatting, before files are added to the version control. Check the
.pre-commit-config.yaml
for the complete list of verifications. -
The code documentation is generated automatically from the docstrings and exported to readthedocs (click on the docs the badge above).
-
Here, CI/CD methods are implemented using GitHub actions configured inside the
.github
folder. The CI process is executed after code changes and includes- code formatting check,
- running tests for different python versions,
- and package build check.
The CD process is triggered by new tags in this repository:
- tests are executed,
- the package is built,
- and the new release is upload to pypi.
-
For maintenance:
- the renovatebot is configured to keep packages up to date.
- Scheduled tests are configured to periodically perform tests and builds.
The code is developed inside a virtual environment with the packages from the
requirements.txt
file:
python3 -m venv .venv
source .venv/bin/activate
pip install wheel
pip install -r requirements.txt
pre-commit install
To execute tests:
python -m unittests discover -b
To generate the documentation, install the packages and call sphinx:
python3 -m venv .venv
source .venv/bin/activate
pip install wheel
pip install -r docs/requirements-doc.txt
sphinx-build -E -b html docs/source docs/_build
After the end of the build process, open the docs/_build/index.html
file.
This is an unofficial package, not endorsed by Codecov. It was written with the purpose of learning about python, how to build and maintain packages, and to explore programming tools.