Skip to main content

codecov-rs

Actions codecov

Library for processing code coverage reports.

Supported formats include:

  • codecov-rs's SQLite format described in src/report/models.rs
  • Codecov's Python report implementation ("pyreport")

See core/src/parsers or the list of features in core/Cargo.toml for a complete list. All formats are converted to codecov-rs's SQLite format (inspired by coverage.py) and converting back is generally not a goal (pyreport being the exception).

All details (e.g. SQLite schema, code interfaces) subject to breaking changes until further notice. In the future, we will at least use SQLite's schema_version pragma to attempt backwards compatibility.

Developing

Set up your development environment:

  • Install the nightly compiler via rustup. At time of writing, codecov-rs requires the nightly compiler for niceties such as #[feature(trait_alias)].
  • To work on the Python bindings, run source .envrc (or use direnv) to set up a virtual environment. Update development dependencies with pip install -r python/requirements.dev.txt
  • Install lint hooks with pip install pre-commit && pre-commit install.
  • Large sample test reports are checked in using Git LFS in test_utils/fixtures/**/large directories (e.g. test_utils/fixtures/pyreport/large). Tests and benchmarks may reference them so installing it yourself is recommended.

codecov-rs aims to serve as effective documentation for every flavor of every format it supports. To that end, the following are greatly appreciated in submissions:

  • Thorough doc comments (/// / /**). For parsers, include snippets that show what inputs look like
  • Granular, in-module unit tests
  • Integration tests with real-world samples (that are safe to distribute; don't send us data from your private repo)

The core/examples/ directory contains runnable commands for developers including:

  • parse_pyreport: converts a given pyreport into a SQLite report
  • sql_to_pyreport: converts a given SQLite report into a pyreport (report JSON + chunks file)

You can run an example with cargo run --example <example> <arguments>. Consider following suit for your own new feature.

Repository structure

  • core/: Rust crate with all of the core coverage-processing functionality
  • bindings/: Rust crate with PyO3 bindings for core/
  • test_utils/: Rust crate with utilities for Rust tests and sample data for any tests
    • test_utils/fixtures: Checked-in sampled data. Large samples are checked in with Git LFS
  • python/codecov_rs: Python code using/typing the Rust crate in bindings/
  • python/tests: Python tests

Cargo.toml in the root defines a Cargo workspace. pyproject.toml in the root defines our Python package. Development dependencies for the Python code are in python/requirements.dev.txt.

Writing new parsers

TBD: Design not settled

New parsers should be optional via Cargo features. Adding them to the default featureset is fine.

Where possible, parsers should not load their entire input or output into RAM. On the input side, you can avoid that with a streaming parser or by using memmap2 to map the input file into virtual memory. SQLite makes it straightforward enough to stream outputs to the database.

Coverage formats really run the gamut so there's no one-size-fits-all framework we can use. Some options:

Non-XML formats lack clean OOTB support for streaming so codecov-rs currently relies more on the mmap approach.

Testing

Run tests with:

# Rust tests
$ cargo test

# Python tests
$ pytest

Benchmarks

Run benchmarks with:

$ cargo bench --features testing

Metadata

Release files for codecov-rs 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for codecov-rs 0.1.0
File Size Uploaded Provenance
codecov_rs-0.1.0.tar.gz 81.2 kB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for codecov-rs 0.1.0
File
codecov_rs-0.1.0-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details
codecov_rs-0.1.0-cp312-abi3-win32.whl CPython 3.12 abi3 Windows x86-32 Details
codecov_rs-0.1.0-cp312-abi3-musllinux_1_2_x86_64.whl CPython 3.12 abi3 Linux musl 1.2+ x86-64 Details
codecov_rs-0.1.0-cp312-abi3-musllinux_1_2_i686.whl CPython 3.12 abi3 Linux musl 1.2+ x86-32 Details
codecov_rs-0.1.0-cp312-abi3-musllinux_1_2_aarch64.whl CPython 3.12 abi3 Linux musl 1.2+ ARM64 Details
codecov_rs-0.1.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 abi3 Linux glibc 2.17+ x86-64 Details
codecov_rs-0.1.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.12 abi3 Linux glibc 2.17+ ARM64 Details
codecov_rs-0.1.0-cp312-abi3-manylinux_2_5_i686.manylinux1_i686.whl CPython 3.12 abi3 Linux glibc 2.5+ x86-32 Details
codecov_rs-0.1.0-cp312-abi3-macosx_11_0_arm64.whl CPython 3.12 abi3 macOS 11.0+ ARM64 Details
codecov_rs-0.1.0-cp312-abi3-macosx_10_12_x86_64.whl CPython 3.12 abi3 macOS 10.12+ x86-64 Details

Total release size: 45.6 MB

Release files / codecov_rs-0.1.0.tar.gz

Download URL codecov_rs-0.1.0.tar.gz
Size 81.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a638887222232883c570cea5b5f9db2292267253810807a653f851aa8870e315
BLAKE2b-256 checksum
How to use checksums
e734d67963cd68c2909869ba01bba67eb7e079a31b0dddcd7615adb329ef4504
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.4

Release files / codecov_rs-0.1.0-cp312-abi3-win_amd64.whl

Download URL codecov_rs-0.1.0-cp312-abi3-win_amd64.whl
Size 1.2 MB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
e413fbd94ba7fb00f92a951283f0b60af8928b6e9a3ddb1abe5cd4842ec34e9b
BLAKE2b-256 checksum
How to use checksums
54ee3e94ff278371ad2946d73610e98feb7d83b6ec457a1d4cb703111bc1866e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.4

Release files / codecov_rs-0.1.0-cp312-abi3-win32.whl

Download URL codecov_rs-0.1.0-cp312-abi3-win32.whl
Size 1.0 MB
Tags CPython 3.12 Windows x86-32 abi3
SHA-256 checksum
How to use checksums
2aa8121d5c68847e2b512186413de2882d9b2aa836ae29d906faaf7b50babae2
BLAKE2b-256 checksum
How to use checksums
c16b1a8a1ce8819ff63d2632daad851d9bf276d1f3e2b2eaf9f777b62d91ac89
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.4

Release files / codecov_rs-0.1.0-cp312-abi3-musllinux_1_2_x86_64.whl

Download URL codecov_rs-0.1.0-cp312-abi3-musllinux_1_2_x86_64.whl
Size 6.9 MB
Tags CPython 3.12 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
552139d530a30debf4c3a80c07c2653b161c8ae55a5ab45dd2f1d3d544e65096
BLAKE2b-256 checksum
How to use checksums
bc4e54d36d4c7cf1d4f8297a28cf18893e92eeff65702bb5880c782dcbf5e462
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.4

Release files / codecov_rs-0.1.0-cp312-abi3-musllinux_1_2_i686.whl

Download URL codecov_rs-0.1.0-cp312-abi3-musllinux_1_2_i686.whl
Size 7.0 MB
Tags CPython 3.12 Linux musl 1.2+ x86-32 abi3
SHA-256 checksum
How to use checksums
5da828313178848a1c5e60d3226493152a2a7b245d5851ebc0e4f028c2364d56
BLAKE2b-256 checksum
How to use checksums
1cb13bab9086016c6dea53aad23ee046e386413b51fe8c2dc47134a4e99534db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.4

Release files / codecov_rs-0.1.0-cp312-abi3-musllinux_1_2_aarch64.whl

Download URL codecov_rs-0.1.0-cp312-abi3-musllinux_1_2_aarch64.whl
Size 6.7 MB
Tags CPython 3.12 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
4aaadaf1e3f912bfd44bae8b1d5387355000f81f2b135ed4392fefabcc2e9c43
BLAKE2b-256 checksum
How to use checksums
e7d608709b99137950cb63fe5f0c427296fbb50247f580116e86b36f17d3f501
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.4

Release files / codecov_rs-0.1.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL codecov_rs-0.1.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 7.1 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
4dab93e7e66102e95b4a3f4c1b5dffa86c41de4293f06601975f2546c3bff4f5
BLAKE2b-256 checksum
How to use checksums
bc8598669a00ed0369cd88c9ffcacc942aecea3a90dd9ec7ce5d5d364924f7e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.4

Release files / codecov_rs-0.1.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL codecov_rs-0.1.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 5.8 MB
Tags CPython 3.12 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
a17a1f73d958e00ff13c8f23ec0b95f02b6f1bba682e90e4c9f3a5f068adfff2
BLAKE2b-256 checksum
How to use checksums
97d1a528772b51972a8f8e96e44b66d18ef497c94fcd3c1cc4d95330da1737b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.4

Release files / codecov_rs-0.1.0-cp312-abi3-manylinux_2_5_i686.manylinux1_i686.whl

Download URL codecov_rs-0.1.0-cp312-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Size 6.8 MB
Tags CPython 3.12 Linux glibc 2.5+ x86-32 abi3
SHA-256 checksum
How to use checksums
15c31135f4703ba2c5b7d157721ad9a3faf3d2d3ce50d4655354279c8cb04142
BLAKE2b-256 checksum
How to use checksums
d2d50e163082f4c31a0c2afb54e20a1bad5fe547b0b3b8c902e13f33939f3b63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.4

Release files / codecov_rs-0.1.0-cp312-abi3-macosx_11_0_arm64.whl

Download URL codecov_rs-0.1.0-cp312-abi3-macosx_11_0_arm64.whl
Size 1.4 MB
Tags CPython 3.12 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
3e7310426bb46eb6c227cfde08749a23f3e866657273b821dc64f81fa530e58d
BLAKE2b-256 checksum
How to use checksums
a1855afe441b372e9c601a33465a5a921f1103cc1ec86a2865fef013b5cef152
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.4

Release files / codecov_rs-0.1.0-cp312-abi3-macosx_10_12_x86_64.whl

Download URL codecov_rs-0.1.0-cp312-abi3-macosx_10_12_x86_64.whl
Size 1.6 MB
Tags CPython 3.12 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
ab8245c8beafd79aeaafcc1b56188256b79f087160272633432275a4b8d2c98b
BLAKE2b-256 checksum
How to use checksums
31be39d49430ece31c0424cfc2de8830beac410fe118b65bc58ad787611df3f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.7.4

Security for codecov-rs 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

11 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page