Skip to content

Conversation

ferbetanzo
Copy link

@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
Copy link

codecov bot commented Oct 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.07%. Comparing base (4379a0f) to head (3226904).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2613      +/-   ##
==========================================
- Coverage   83.32%   83.07%   -0.26%     
==========================================
  Files         256      255       -1     
  Lines       50491    48420    -2071     
  Branches    46014    43943    -2071     
==========================================
- Hits        42074    40225    -1849     
- Misses       6065     6102      +37     
+ Partials     2352     2093     -259     
Flag Coverage Δ
python 91.53% <ø> (ø)

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
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!

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.

2 participants