Skip to content

Conversation

@Floris272
Copy link
Contributor

Partially closes maykinmedia/open-api-framework#188

Changes

  • adds csv flag to dump_data script

@codecov-commenter
Copy link

codecov-commenter commented Oct 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.16%. Comparing base (9025da3) to head (46f6e4c).
⚠️ Report is 24 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #685      +/-   ##
==========================================
+ Coverage   82.33%   83.16%   +0.82%     
==========================================
  Files         130      128       -2     
  Lines        2463     2429      -34     
  Branches      200      193       -7     
==========================================
- Hits         2028     2020       -8     
+ Misses        392      369      -23     
+ Partials       43       40       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Floris272 Floris272 force-pushed the feature/oaf-188-add-csv-option-to-data-dump-script branch from cf9c1dc to 144633c Compare October 7, 2025 16:01
@Floris272 Floris272 marked this pull request as ready for review October 9, 2025 07:53
@Floris272
Copy link
Contributor Author

Currently it checks if the CSV_OUTPUT_DIR exists but maybe it would be better if it creates it as well or that the default one exists in the project using .gitkeep?

In this project the core app does not have many tables but for openzaak for example it should probably be a zip/tar?

Copy link
Collaborator

@stevenbal stevenbal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Floris272 how much work would it be to export it to a .zip? I think that's probably ideal, otherwise let's make sure the CSV output dir always exists

@github-actions
Copy link
Contributor

github-actions bot commented Oct 14, 2025

🐰 Bencher Report

Branchfeature/oaf-188-add-csv-option-to-data-dump-script
Testbedubuntu-latest
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
performance_test/tests/test_objects_list.py::test_objects_api_list_filter_one_result📈 view plot
🚷 view threshold
19.44 ms
(+0.89%)Baseline: 19.26 ms
20.23 ms
(96.08%)
performance_test/tests/test_objects_list.py::test_objects_api_list_large_page_size_page_1📈 view plot
🚷 view threshold
236.98 ms
(+2.50%)Baseline: 231.19 ms
242.75 ms
(97.62%)
performance_test/tests/test_objects_list.py::test_objects_api_list_large_page_size_page_5📈 view plot
🚷 view threshold
238.10 ms
(+1.82%)Baseline: 233.83 ms
245.52 ms
(96.98%)
performance_test/tests/test_objects_list.py::test_objects_api_list_small_page_size_page_20📈 view plot
🚷 view threshold
94.45 ms
(+0.74%)Baseline: 93.75 ms
98.44 ms
(95.94%)
🐰 View full continuous benchmarking report in Bencher

@Floris272
Copy link
Contributor Author

@Floris272 how much work would it be to export it to a .zip? I think that's probably ideal, otherwise let's make sure the CSV output dir always exists

Didn't take much work, made export directory static and added it to the project, after the zip has been created all .csv files will be deleted in csv_dumps

@Floris272 Floris272 requested a review from stevenbal October 14, 2025 10:49
@Floris272 Floris272 requested a review from stevenbal October 21, 2025 14:15
Copy link
Collaborator

@stevenbal stevenbal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some stuff related to running the command in docker, forgot to test this previously

bin/dump_data.sh Outdated
psql -c "\copy $table TO '$CSV_OUTPUT_DIR/$table.csv' WITH CSV HEADER"
done

zip -j "$ZIP_FILE" "$CSV_OUTPUT_DIR"/*.csv
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to test this, but inside the container this won't run currently because the zip command is not found
/dump_data.sh: line 106: zip: command not found

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed to tar

@Floris272 Floris272 requested a review from stevenbal October 24, 2025 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create export scripts to output CSV files

3 participants