Skip to content
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

feat(hugr-py): IndexDfg builder for appending operations by index #1256

Merged
merged 3 commits into from
Jul 5, 2024

Conversation

ss2165
Copy link
Member

@ss2165 ss2165 commented Jul 2, 2024

Closes #1242

More test ideas welcome!

BEGIN_COMMIT_OVERRIDE
feat(hugr-py): TrackedDfg builder for appending operations by index

END_COMMIT_OVERRIDE

@ss2165 ss2165 requested a review from a team as a code owner July 2, 2024 16:39
@ss2165 ss2165 requested review from zrho and aborgna-q and removed request for zrho July 2, 2024 16:39
Copy link

codecov bot commented Jul 2, 2024

Codecov Report

Attention: Patch coverage is 96.49123% with 2 lines in your changes missing coverage. Please review.

Project coverage is 87.01%. Comparing base (8f08b8c) to head (8fd4186).
Report is 7 commits behind head on main.

Files Patch % Lines
hugr-py/src/hugr/dfg.py 60.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1256      +/-   ##
==========================================
+ Coverage   86.98%   87.01%   +0.02%     
==========================================
  Files         102      103       +1     
  Lines       19108    19163      +55     
  Branches    17015    17015              
==========================================
+ Hits        16622    16675      +53     
- Misses       1709     1711       +2     
  Partials      777      777              
Flag Coverage Δ
python 91.29% <96.49%> (+0.13%) ⬆️

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.

Copy link
Collaborator

@aborgna-q aborgna-q left a comment

Choose a reason for hiding this comment

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

Nice!

Happy to see we are doing docs now :)

as the incoming index.

Args:
com: Command to append.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
com: Command to append.
com: Command to append.
Raises:
IndexError: If any input index is not a tracked wire.

Comment on lines 172 to 173
Args:
coms: Commands to append.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Args:
coms: Commands to append.
Args:
coms: Commands to append.
Raises:
IndexError: If any input index to a command is not a tracked wire.

Comment on lines 190 to 191
Args:
*in_wires: Wires/indices to set as outputs.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Args:
*in_wires: Wires/indices to set as outputs.
Args:
*in_wires: Wires/indices to set as outputs.
Raises:
IndexError: If an index is not a tracked wire.

@ss2165 ss2165 enabled auto-merge July 5, 2024 09:56
@ss2165 ss2165 added this pull request to the merge queue Jul 5, 2024
Merged via the queue into main with commit df9b4cc Jul 5, 2024
20 checks passed
@ss2165 ss2165 deleted the ss/py-circ branch July 5, 2024 10:00
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.

feat(hugr-py): Circuit-like builder (append to wires by index)
2 participants