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

Data sources on new client #830

Merged
merged 4 commits into from
Dec 17, 2024

Conversation

danielballan
Copy link
Member

Bug, found by @genematx:

In [9]: c = from_profile('local', api_key='secret')

In [10]: arr = c.write_array([1,2,3], key='arr')

In [11]: arr.data_sources()
...
TypeError: 'ArrayStructure' object is not subscriptable

We had unit-tested c['arr'].data_sources() but did not have a test covering calling data_sources() directly on the object return by write_array(...), in the case where include_data_sources=True had not been set on the client and thus the data sources needed to be fetched.

This PR adds a unit test for that case, which reproduces the bug and fails. It then adds a fix.

Checklist

  • Add a Changelog entry
  • Add the ticket number which this PR closes to the comment section

@genematx genematx merged commit e19d276 into bluesky:main Dec 17, 2024
8 checks passed
@danielballan danielballan deleted the data-sources-on-new-client branch December 17, 2024 21:59
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