diff --git a/.github/workflows/interrogate.yml b/.github/workflows/interrogate.yml index 1e6966a3..8031ec07 100644 --- a/.github/workflows/interrogate.yml +++ b/.github/workflows/interrogate.yml @@ -22,7 +22,6 @@ jobs: pip install .[dev] - name: interrogate checks run: | - python -m pip install interrogate interrogate -v --fail-under 40 --exclude "*/__init__.py" --exclude "*/__main__.py" --output docstring-coverage.txt --generate-badge interrogate-badge.svg ls -l - name: Upload docstring-coverage diff --git a/docs/devguide.md b/docs/devguide.md index b8203c88..4fe4df0b 100644 --- a/docs/devguide.md +++ b/docs/devguide.md @@ -62,3 +62,13 @@ A code review is responsible for checking the following: 5. Code is readable and well-structured 6. Code does not do anything unexpected or beyond the scope of the function 7. Any additional dependencies are justified and do not result in bloat + + +## Github Actions - Workflows +We are using Github actions to automated testing and specific workflows. +1. **Black** - Python code formatting. https://pypi.org/project/black/ +2. **Interrogate** - will check the codebase docstring coverage and create a report. https://interrogate.readthedocs.io/en/latest/ + * To use manually run: `interrogate -v [PATH]` + * To run with a failing test float, exclusions, output file and badge run: `interrogate -v --fail-under 40 --exclude "*/__init__.py" --exclude "*/__main__.py" --output docstring-coverage.txt --generate-badge interrogate-badge.svg` + + diff --git a/pyproject.toml b/pyproject.toml index 6f4970f0..eccac7fd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ all = [ "pyearthtools-training[all] @ git+https://github.com/ACCESS-Community-Hub/PyEarthTools.git#subdirectory=packages/training" ] test = ["pytest", "pytest-cov", "pytest-xdist", "pudb"] -dev = ["pre-commit", "black==25.1.0"] +dev = ["pre-commit", "black==25.1.0", "interrogate"] docs = [ "sphinx", "myst-parser",