Skip to content

feat: Expose BorrowArray in hugr-py #2425

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 14, 2025
Merged

feat: Expose BorrowArray in hugr-py #2425

merged 2 commits into from
Jul 14, 2025

Conversation

tatiana-s
Copy link
Contributor

Closes #2406

@tatiana-s tatiana-s requested a review from a team as a code owner July 9, 2025 14:34
@tatiana-s tatiana-s requested a review from lmondada July 9, 2025 14:34
Copy link

codecov bot commented Jul 9, 2025

Codecov Report

Attention: Patch coverage is 81.13208% with 10 lines in your changes missing coverage. Please review.

Project coverage is 82.00%. Comparing base (1ba9ef6) to head (4890cc0).
Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
hugr-py/src/hugr/std/collections/borrow_array.py 81.13% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2425      +/-   ##
==========================================
- Coverage   82.00%   82.00%   -0.01%     
==========================================
  Files         246      247       +1     
  Lines       45766    45819      +53     
  Branches    41502    41502              
==========================================
+ Hits        37532    37575      +43     
- Misses       6218     6228      +10     
  Partials     2016     2016              
Flag Coverage Δ
python 85.33% <81.13%> (-0.06%) ⬇️

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.

return tys.TypeBound.Linear


# Note that only borrow array values with no elements borrowed should be emitted.
Copy link
Contributor

@lmondada lmondada Jul 10, 2025

Choose a reason for hiding this comment

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

I wonder if there is any way this could be asserted in this code or tested below, maybe not? For me, not being familiar with this code, this comment makes me wonder what the restrictions mean concretely in the kind of code that I would be allowed to write. Might just be my ignorance though, so feel free to ignore :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this is something that should be handled in the future in some form (#2437)

@tatiana-s tatiana-s added this pull request to the merge queue Jul 14, 2025
Merged via the queue into main with commit fdb675f Jul 14, 2025
25 checks passed
@tatiana-s tatiana-s deleted the ts/borrow-array-py branch July 14, 2025 07:58
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.

Expose borrow_array through hugr-py
2 participants