Skip to content

Measure docstring coverage of Python packages with GitHub Actions

License

Notifications You must be signed in to change notification settings

epassaro/docstr-cov-workflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docstr-cov-workflow

Measure docstring coverage of Python packages with GitHub Actions

Usage

  1. Copy .github/workflows/docstr-cov.yml and .docstr.yaml to your repository.
  2. Tweak the configuration file following the package documentation.
  3. Login to https://jsonbin.org and store the API key as a repository secret named JSONBIN_APIKEY.
  4. The workflow will fail if the coverage is lower than the score of the base branch (on pull_request) or the previous commit (on push), and files that made the job fail will be blamed.
  5. Pushing to main branch updates the current coverage of the project by updating a nice badge.
  6. You can change the color range of the badge by tweaking the RANGE variable at the top of the workflow. For example, 50..75 means that coverage below 50 will display a red badge, and above 75 a green one.
  7. Remember to add the badge to your README.md

Example

docstr-cov

Make changes to example/base.py and see the workflow in action.

Acknowledgements

About

Measure docstring coverage of Python packages with GitHub Actions

Resources

License

Stars

Watchers

Forks

Languages