This document explains the badges added to the README and the manual setup steps required.
[](https://objectstate.readthedocs.io/en/latest/?badge=latest)- Status: Should work automatically if objectstate is registered on ReadTheDocs
- Link: https://objectstate.readthedocs.io
- Configuration:
.readthedocs.yamlis already configured
[](https://trissim.github.io/objectstate/coverage/)- Status: Will be automatically updated by GitHub Actions workflow
- Link: https://trissim.github.io/objectstate/coverage/
- Workflow:
.github/workflows/coverage-pages.yml
The coverage badge and reports require GitHub Pages to be enabled:
- Go to: https://github.com/trissim/objectstate/settings/pages
- Under "Build and deployment":
- Source: Select "GitHub Actions"
- Save the settings
Once enabled, the coverage reports will be available at:
- Badge SVG: https://raw.githubusercontent.com/trissim/objectstate/main/.github/badges/coverage.svg
- Coverage Report: https://trissim.github.io/objectstate/coverage/
To match the problem statement requirement:
- Go to: https://github.com/trissim/objectstate
- Click the ⚙️ (settings) icon next to "About"
- Add or update:
- Description: Generic lazy dataclass configuration framework with dual-axis inheritance
- Website: https://objectstate.readthedocs.io
- Topics: Add relevant tags like
python,configuration,dataclass, etc.
- Save changes
Ensure the repository is properly linked to ReadTheDocs:
- Go to: https://readthedocs.org/dashboard/
- Verify
objectstateproject exists - Check webhook is configured at: https://github.com/trissim/objectstate/settings/hooks
- Trigger a build to ensure documentation is up to date
The coverage badge is similar to the ezstitcher repository setup:
-
On every push to
mainbranch, thecoverage-pages.ymlworkflow:- Runs tests with coverage
- Generates a coverage badge SVG at
.github/badges/coverage.svg - Commits the badge back to the repository
- Deploys HTML coverage reports to GitHub Pages
-
The badge in README.md links to:
- SVG file from the
mainbranch (always up-to-date) - Coverage report hosted on GitHub Pages
- SVG file from the
After enabling GitHub Pages:
- Push a commit to the
mainbranch - Wait for the "Tests, Coverage and GitHub Pages" workflow to complete
- Check that:
- The badge SVG was updated in
.github/badges/coverage.svg - The coverage report is available at https://trissim.github.io/objectstate/coverage/
- The badge in README shows the correct coverage percentage
- The badge SVG was updated in
This setup uses GitHub Pages for coverage reports instead of Codecov.io:
Advantages:
- No external service account required
- No API tokens needed
- Works out of the box
- Reports hosted on your GitHub Pages
CI Workflow:
- The existing
ci.ymlworkflow still uploads to Codecov if configured - The new
coverage-pages.ymlworkflow generates the badge and GitHub Pages - Both can coexist - Codecov for CI checks, GitHub Pages for the badge