You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,17 +17,19 @@ All details (e.g. SQLite schema, code interfaces) subject to breaking changes un
17
17
## Developing
18
18
19
19
Set up your development environment:
20
-
- Install the nightly compiler via [rustup](https://rustup.rs/). At time of writing, `codecov-rs` requires the nightly compiler for niceties such as `#[feature(trait_alias)]`.
20
+
21
21
- 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`
- Large sample test reports are checked in using [Git LFS](https://git-lfs.com/) 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.
24
24
25
25
`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:
26
+
26
27
- Thorough doc comments (`///` / `/**`). For parsers, include snippets that show what inputs look like
27
28
- Granular, in-module unit tests
28
29
- Integration tests with real-world samples (that are safe to distribute; don't send us data from your private repo)
29
30
30
31
The `core/examples/` directory contains runnable commands for developers including:
32
+
31
33
-`parse_pyreport`: converts a given pyreport into a SQLite report
32
34
-`sql_to_pyreport`: converts a given SQLite report into a pyreport (report JSON + chunks file)
33
35
@@ -53,9 +55,8 @@ New parsers should be optional via Cargo features. Adding them to the default fe
53
55
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.
54
56
55
57
Coverage formats really run the gamut so there's no one-size-fits-all framework we can use. Some options:
58
+
56
59
-[`quick_xml`](https://crates.io/crates/quick_xml), a streaming XML parser
57
-
-[`winnow`](https://crates.io/crates/winnow), a parser combinator framework (fork of [`nom`](https://crates.io/crates/nom))
58
-
-`winnow`'s docs illustrate [how one can write a streaming parser](https://docs.rs/winnow/latest/winnow/_topic/partial/index.html)
59
60
-[`serde`](https://serde.rs/), a popular serialization/deserialization framework
60
61
-`serde`'s docs illustrate [how one can write a streaming parser](https://serde.rs/stream-array.html)
61
62
@@ -64,6 +65,7 @@ Non-XML formats lack clean OOTB support for streaming so `codecov-rs` currently
0 commit comments