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)!: Override add rather than append + extend on all _DfBase #1286

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

ss2165
Copy link
Member

@ss2165 ss2165 commented Jul 9, 2024

BEGIN_COMMIT_OVERRIDE

Both add and append take commands, but append allows commands with indices in. We can therefore replace append with an add override. Makes for a more consistent interface.

Allows extend to be defined on Dfg too.

BREAKING CHANGE: 1. TrackedDfg.append removed, use add instead. 2. extend now takes *args rather than an iterable.

END_COMMIT_OVERRIDE

… `_DfBase`

They both take commands, just on TrackedDfg allows commands with indices in. Makes for a more consistent interface.

Allows `extend` to be defined on Dfg too.

BREAKING CHANGE:
    - `TrackedDfg.append` removed, use `add` instead.
    - `extend` now takes `*args` rather than an iterable.
@ss2165 ss2165 requested a review from a team as a code owner July 9, 2024 15:47
@ss2165 ss2165 requested review from croyzor and cqc-alec and removed request for croyzor July 9, 2024 15:47
Copy link

codecov bot commented Jul 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.04%. Comparing base (50d3d98) to head (3c93644).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1286   +/-   ##
=======================================
  Coverage   87.04%   87.04%           
=======================================
  Files         103      103           
  Lines       19243    19243           
  Branches    17073    17073           
=======================================
  Hits        16750    16750           
  Misses       1716     1716           
  Partials      777      777           
Flag Coverage Δ
python 91.38% <100.00%> (ø)

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.

@ss2165 ss2165 added this pull request to the merge queue Jul 10, 2024
Merged via the queue into main with commit af38154 Jul 10, 2024
21 checks passed
@ss2165 ss2165 deleted the ss/extend branch July 10, 2024 09:07
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