Skip to content

mashi/codecov-validator

Repository files navigation

Ruff pre-commit Language grade: Python codecov github-actions Documentation Status

Description

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.

Usage

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.

Software and Tools

The development uses:

  1. Version control with git to track changes.

  2. 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.

  3. The code documentation is generated automatically from the docstrings and exported to readthedocs (click on the docs the badge above).

  4. Here, CI/CD methods are implemented using GitHub actions configured inside the .github folder. The CI process is executed after code changes and includes

    1. code formatting check,
    2. running tests for different python versions,
    3. and package build check.

    The CD process is triggered by new tags in this repository:

    1. tests are executed,
    2. the package is built,
    3. and the new release is upload to pypi.
  5. For maintenance:

    1. the renovatebot is configured to keep packages up to date.
    2. Scheduled tests are configured to periodically perform tests and builds.

Instructions (Development)

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.

Disclaimer

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages