Skip to content

Comments

Use new initC compression from COSMIC and support more Python versions#187

Merged
TomWagg merged 7 commits intomainfrom
initc-io
Jan 30, 2026
Merged

Use new initC compression from COSMIC and support more Python versions#187
TomWagg merged 7 commits intomainfrom
initc-io

Conversation

@TomWagg
Copy link
Owner

@TomWagg TomWagg commented Jan 30, 2026

This will close #160 and close #185

This pull request introduces several improvements to the testing workflow, IO efficiency, and code robustness for the cogsworth package. The most significant changes include expanding Python version testing, optimizing dependency caching and installation in CI, integrating new COSMIC IO functions for better data compression, and improving error handling for file attributes.

Continuous Integration and Testing Improvements:

  • Added concurrency control to the test workflow to prevent overlapping runs and expanded Python version testing to include 3.11, 3.12, and 3.13 for broader compatibility. Also enabled pip caching for faster builds.
  • Improved system dependency installation and optimized the Agama and cogsworth installation steps in the test workflow. Added conditional downloading for large data files to reduce unnecessary network usage.

IO and Data Handling Enhancements:

  • Updated the changelog to note the use of new COSMIC initC IO functions for significantly improved data compression and expanded Python testing.
  • Replaced direct use of pandas HDF IO in cogsworth/pop.py with COSMIC's new save_initC and load_initC functions for more efficient data storage and retrieval. [1] [2] [3]

Robustness and Error Handling:

  • Improved error handling for optional HDF5 file attributes in the load method of cogsworth/pop.py, making the code more resilient to missing data.

@TomWagg TomWagg self-assigned this Jan 30, 2026
@TomWagg TomWagg added enhancement New feature or request development tests, automation, code improvements labels Jan 30, 2026
@TomWagg TomWagg merged commit 5ef1c85 into main Jan 30, 2026
3 checks passed
@TomWagg TomWagg deleted the initc-io branch January 30, 2026 22:11
@codecov
Copy link

codecov bot commented Jan 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (9cea752) to head (c18b658).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #187   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           17        17           
  Lines         2226      2227    +1     
=========================================
+ Hits          2226      2227    +1     

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

development tests, automation, code improvements enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Python 3.12 and 3.13 Use the new initC IO once Katie merges it

1 participant