Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add dataset-level stats #2297

Merged
merged 11 commits into from
Nov 19, 2024
Merged

feat: add dataset-level stats #2297

merged 11 commits into from
Nov 19, 2024

Conversation

jqnatividad
Copy link
Collaborator

resolves #2288

@jqnatividad jqnatividad added the WIP work in progress label Nov 18, 2024
@jqnatividad jqnatividad marked this pull request as draft November 18, 2024 05:25
@jqnatividad
Copy link
Collaborator Author

will need to modify a lot of stats tests to account for the new dataset-level stats

@jqnatividad jqnatividad changed the title feat: add datase level stats feat: add dataset-level stats Nov 18, 2024
warning: usage of `FromIterator::from_iter`
   --> src/cmd/stats.rs:789:27
    |
789 |                 work_br = csv::ByteRecord::from_iter(vec![&*header].into_iter().chain(stat));
    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `.collect()` instead of `::from_iter()`: `vec![&*header].into_iter().chain(stat).collect::<csv::ByteRecord<_>>()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_iter_instead_of_collect
    = note: `-W clippy::from-iter-instead-of-collect` implied by `-W clippy::pedantic`
    = help: to override `-W clippy::pedantic` add `#[allow(clippy::from_iter_instead_of_collect)]`

warning: implicitly cloning a `ByteRecord` by calling `to_owned` on its dereferenced type
   --> src/cmd/stats.rs:803:31
    |
803 |             stats_br_vec.push(dataset_stats_br.to_owned());
    |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `dataset_stats_br.clone()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_clone
    = note: `-W clippy::implicit-clone` implied by `-W clippy::pedantic`
    = help: to override `-W clippy::pedantic` add `#[allow(clippy::implicit_clone)]`

warning: implicitly cloning a `ByteRecord` by calling `to_owned` on its dereferenced type
   --> src/cmd/stats.rs:812:31
    |
812 |             stats_br_vec.push(dataset_stats_br.to_owned());
    |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `dataset_stats_br.clone()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_clone

warning: implicitly cloning a `ByteRecord` by calling `to_owned` on its dereferenced type
   --> src/cmd/stats.rs:825:31
    |
825 |             stats_br_vec.push(dataset_stats_br.to_owned());
    |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `dataset_stats_br.clone()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_clone
…ng approach

also refactor csv_to_jsonl to pass output_jsonl by reference instead of by value
…vel objects

so as not to trigger select where objects starting with _ is a sentinel for last column
…el stats

also add assert_succes to select frequency and tojsonl tests to help in debugging
@jqnatividad
Copy link
Collaborator Author

merge this now so we can take advantage of the new slice --invert option

@jqnatividad jqnatividad marked this pull request as ready for review November 19, 2024 20:39
@jqnatividad jqnatividad merged commit cc49c38 into master Nov 19, 2024
8 of 15 checks passed
@jqnatividad jqnatividad deleted the 2288-dataset-level-stats branch November 19, 2024 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WIP work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

stats: add dataset level stats
1 participant