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

Fix union when we've already got a non-single-run data collection #261

Merged
merged 2 commits into from Dec 8, 2021

Conversation

takluyver
Copy link
Member

@daviddoji relayed an error with code like this:

run = open_run(prop, run_nums[0])
for run_num in run_nums[1:]:
    run = run.union(open_run(proposal, run_num))

After the first .union(), the DataCollection object is not a single run. Calling .union() the second time failed because it tried to get self.run_metadata(). This should fix it by always checking .is_single_run before calling .run_metadata().

cc @kakhahmed

@takluyver takluyver added the bug Something isn't working label Dec 7, 2021
@takluyver takluyver added this to the 1.10 milestone Dec 7, 2021
@kakhahmed
Copy link

Thanks for the fix, didn't think of that situation.

LGTM

@takluyver
Copy link
Member Author

Thanks!

@takluyver takluyver merged commit 04a6598 into master Dec 8, 2021
@takluyver takluyver deleted the fix-union-again branch December 8, 2021 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants