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

Allow duplicate cut IDs in a CutSet (CutSet is list-like instead of dict-like) #1279

Merged
merged 3 commits into from
Jan 31, 2024

Conversation

pzelasko
Copy link
Collaborator

Despite the title, this is not a breaking API change.

CutSet (and other sets) supported int and str based indexing almost since the start, but int-based indexing was inefficient (it just iterated the dict). Now position based indexing will be more efficient since it's the main usage pattern that I observed.

In addition, this change allows having duplicated cut IDs in the CutSet. Ever since we started introduced lazy manifests, this duplicated IDs were actually implicitly allowed, only as long as the manifest was lazy, since we only checked it for eager manifests. I've seen several use cases now where duplicated IDs are either expected, or at least not harmful - this pops us quite often in anything involving infinite cut sets. I'd rather have duplication checks being explicit in cases where they are required.

@pzelasko pzelasko added this to the v1.20.0 milestone Jan 31, 2024
@pzelasko pzelasko merged commit 455b20e into master Jan 31, 2024
10 checks passed
@pzelasko pzelasko deleted the feature/duplicate-cut-ids-allowed branch January 31, 2024 19:18
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.

None yet

1 participant