Skip to content

Conversation

@ferbetanzo
Copy link
Contributor

@ferbetanzo ferbetanzo commented Oct 7, 2025

Now that we are able to import models in python (#2581) we can enable the roundtrip checks in the validate fixture of the hugr-py tests.

I have also added a couple more models to check when writing, mainly JSON with compression and BINARY with no compression. This adds around 5 seconds of running time to the hugr-py tests.

And I've separated the test_envelope.py::test_envelope test case into test_envelope_binary (parametrized for each EnvelopeFormat and compression) and test_envelope_text.

@ferbetanzo ferbetanzo requested a review from a team as a code owner October 7, 2025 13:54
@ferbetanzo ferbetanzo requested a review from mark-koch October 7, 2025 13:54
@codecov
Copy link

codecov bot commented Oct 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.02%. Comparing base (f3cfff4) to head (42282be).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2613      +/-   ##
==========================================
- Coverage   83.71%   83.02%   -0.70%     
==========================================
  Files         261      256       -5     
  Lines       52631    48158    -4473     
  Branches    47372    42899    -4473     
==========================================
- Hits        44058    39981    -4077     
+ Misses       6183     6133      -50     
+ Partials     2390     2044     -346     
Flag Coverage Δ
python 88.85% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Comment on lines 184 to 185
# Encoding formats to test, indexed by the format name as used by
# `hugr convert --format`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like the compressed ones you added are not included in hugr convert --format? Could you update this comment accordingly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Modified the comments to add some more clarity.

@ferbetanzo ferbetanzo requested a review from mark-koch October 9, 2025 12:09
@ferbetanzo ferbetanzo enabled auto-merge October 9, 2025 12:20
@ferbetanzo ferbetanzo disabled auto-merge October 9, 2025 12:20
Copy link
Contributor

@mark-koch mark-koch left a comment

Choose a reason for hiding this comment

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

Thanks!

@ferbetanzo ferbetanzo added this pull request to the merge queue Jan 15, 2026
Merged via the queue into main with commit 9c6f95f Jan 15, 2026
29 checks passed
@ferbetanzo ferbetanzo deleted the test/validate-more-formats branch January 15, 2026 15:30
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.

3 participants