Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new "--csv-no-header" option to the rdump tool, allowing users to output CSV files without a header and fixes a regression where the selected fields were not correctly propagated to the adapter.
- Adds the "csv-no-header" mode option and corresponding alias in the argument parser.
- Updates the CSV adapter to conditionally write the header based on the new parameter.
- Introduces regression tests to verify that selected fields are properly handled for both modes.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/test_regression.py | Adds regression tests to verify selected fields propagation and CSV header behavior. |
| flow/record/tools/rdump.py | Updates argument parsing and URI construction to support the new csv-no-header mode. |
| flow/record/adapter/csvfile.py | Enhances the CSV adapter to conditionally write the header based on the new header parameter. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #170 +/- ##
==========================================
+ Coverage 82.82% 82.90% +0.07%
==========================================
Files 34 34
Lines 3576 3592 +16
==========================================
+ Hits 2962 2978 +16
Misses 614 614
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Schamper
requested changes
Jun 18, 2025
47801f9 to
c4e39a6
Compare
Schamper
requested changes
Jun 20, 2025
Schamper
approved these changes
Jun 20, 2025
This allows you to dump the fields as CSV but without the row header. Also fixes issue that in some cases the selected fields were not propagated to the adapter.
Test included.
Co-authored-by: Erik Schamper <1254028+Schamper@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This allows you to dump the fields as CSV but without the row header.
Also fixes issue that in some cases the selected fields were not propagated to the adapter.