Skip to content

use pytest temporary dir factory to write some of the test hdf5 files and move all fixed hdf5 sample data files to tests/data#117

Merged
valeriupredoi merged 35 commits intomainfrom
add_opaque_sample_data
Oct 10, 2025
Merged

use pytest temporary dir factory to write some of the test hdf5 files and move all fixed hdf5 sample data files to tests/data#117
valeriupredoi merged 35 commits intomainfrom
add_opaque_sample_data

Conversation

@valeriupredoi
Copy link
Collaborator

@valeriupredoi valeriupredoi commented Oct 8, 2025

Description

The opaque dataset tests produce three HDF5 sample datasets that are currently git orphaned, I am adding them to version control; it'd be really nice if we collected all these sample datasets in a eg tests/sample_data directory, rather than have them float around inside the main tests test dir - created #118 for that.

Using pytest's tmp dir factory to temporarily store those files, and not have them under version control.

Closes #118

Before you get started

Checklist

  • This pull request has a descriptive title and labels
  • This pull request has a minimal description (most was discussed in the issue, but a two-liner description is still desirable)
  • Unit tests have been added (if codecov test fails)
  • Any changed dependencies have been added or removed correctly (if need be)
  • If you are working on the documentation, please ensure the current build passes
  • All tests pass

@codecov
Copy link

codecov bot commented Oct 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.05%. Comparing base (8a44c01) to head (d0fbf70).
⚠️ Report is 152 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #117   +/-   ##
=======================================
  Coverage   74.05%   74.05%           
=======================================
  Files          11       11           
  Lines        2598     2598           
  Branches      406      406           
=======================================
  Hits         1924     1924           
  Misses        565      565           
  Partials      109      109           

☔ 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.

@kmuehlbauer
Copy link
Collaborator

@valeriupredoi As I understood #108, we do not want to git ingest new data files, but instead create them while testing.

@kmuehlbauer
Copy link
Collaborator

I thought, pytest is cleaning this up. Maybe we should make sure to correctly configure this with pytest.

@valeriupredoi
Copy link
Collaborator Author

Ah I thought there was something fishy about those files 🐟 I'll put them in a pytest's tmp dir then, will pop the changes here tomorrow 👍🍺

@valeriupredoi valeriupredoi changed the title add opaque HDF5 sample datasets to git tree use pytest temporary dir factory to write some of the test hdf5 files Oct 9, 2025
@bnlawrence
Copy link
Collaborator

Insofar as these are the ones that I just created, and they are expected to be only ephemeral, this looks good to me. I take it this is the first of many (taking care that we don't remove all those where we are sure that what was created is no longer the same as what would be created now)?

@valeriupredoi
Copy link
Collaborator Author

taking care that we don't remove all those where we are sure that what was created is no longer the same as what would be created now

sorry, Bryan, I completely lost you there! I'll open a new PR to move the already existing and committed hdf5 files to a sample_data dir, as per #118 if that's what you meant 🍺

@valeriupredoi
Copy link
Collaborator Author

valeriupredoi commented Oct 9, 2025

offline convo with @bnlawrence : store all the >1 year old HDF5 test files, have the newer ie a couple months or younger files be produced on the fly while the test is running (like here)

@valeriupredoi
Copy link
Collaborator Author

valeriupredoi commented Oct 9, 2025

@valeriupredoi
Copy link
Collaborator Author

GH is hosed, more work tomorrow 🍺

@valeriupredoi valeriupredoi changed the title use pytest temporary dir factory to write some of the test hdf5 files use pytest temporary dir factory to write some of the test hdf5 files and move all fixed hdf5 sample data files to tests/data Oct 10, 2025
@valeriupredoi valeriupredoi merged commit b673557 into main Oct 10, 2025
6 checks passed
@valeriupredoi valeriupredoi deleted the add_opaque_sample_data branch October 10, 2025 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Collect all HDF5 sample datasets into a tests/sample_data dir

3 participants