API¶
Pyrig plugin that integrates Codecov coverage reporting into a project.
rig ¶
Codecov overrides of pyrig's scaffolding and maintenance layer.
Mirrors pyrig's own rig namespace so its plugin-discovery mechanism
automatically picks up this package's overrides and additions.
configs ¶
Declarative definitions of the configuration files managed by this plugin.
This package is this plugin's discovery scope for pyrig's config-file management: every file this plugin manages or overrides is defined here.
version_control ¶
Codecov customizations for generated version-control configuration.
remote ¶
Codecov customizations for generated GitHub remote-repository configuration.
workflows ¶
Codecov-specific overrides for GitHub Actions workflow configuration.
Codecov coverage-upload step for the health check CI workflow.
Bases: HealthCheckWorkflowConfigFile
Health check workflow extended with a Codecov coverage upload step.
codecov_token_var() -> str
Return the raw secrets expression for CODECOV_TOKEN.
Returns:
| Type | Description |
|---|---|
str
|
The |
Source code in src/pyrig_codecov/rig/configs/version_control/remote/workflows/health_check.py
insert_codecov_token() -> str
Return the ${{ secrets.CODECOV_TOKEN }} expression.
Returns:
| Type | Description |
|---|---|
str
|
GitHub Actions expression for the |
Source code in src/pyrig_codecov/rig/configs/version_control/remote/workflows/health_check.py
Build a step that uploads the coverage report to Codecov.
Fails the CI job if the upload fails.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Step using |
Note
The upload token always comes from a CODECOV_TOKEN repository
secret, so it must be configured for the upload to succeed. Since
this workflow also runs for Dependabot pull requests, the secret
must be added to both the Actions and Dependabot secret stores.
Source code in src/pyrig_codecov/rig/configs/version_control/remote/workflows/health_check.py
Return the matrix job steps, extended with a Codecov upload step.
Returns:
| Type | Description |
|---|---|
list[dict[str, Any]]
|
The base class steps plus a final step that uploads the |
list[dict[str, Any]]
|
coverage report to Codecov. |
Source code in src/pyrig_codecov/rig/configs/version_control/remote/workflows/health_check.py
resources ¶
Static resource files bundled with the project.
tools ¶
Tool definitions and overrides contributed by this plugin.
This package is this plugin's discovery scope for pyrig's tool management: every tool this plugin defines or overrides is declared here.
testing ¶
Codecov-specific overrides of pyrig's test-and-coverage tool wrappers.
project ¶
Codecov-specific coverage reporting and badge configuration.
ProjectTester ¶
Bases: ProjectTester
Coverage tool configured for Codecov as the reporting backend.
Points the coverage badge at Codecov instead of a static shields.io badge, raises the required coverage threshold to 100%, and exposes the report file, format, and upload token needed to publish results to Codecov from CI.
Return the base pytest flags, extended with a report-format flag.
Returns:
| Type | Description |
|---|---|
Args
|
The base pytest flags plus a |
Args
|
flag set to |
Source code in src/pyrig_codecov/rig/tools/testing/project.py
image_url() -> str
Return the URL of the Codecov coverage badge image for the default branch.
Source code in src/pyrig_codecov/rig/tools/testing/project.py
report_file() -> Path
Return the coverage report file path.
Returns:
| Type | Description |
|---|---|
Path
|
|
Return the base ignore paths plus the coverage report file.