-
Notifications
You must be signed in to change notification settings - Fork 17
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: Add data to dataset via object with read()
method
#540
feat: Add data to dataset via object with read()
method
#540
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By and large this looks really good. I had a couple of comments on the changes themselves, but very small things. We should bump the dataservice dependency versions for these packages, though, to make sure they get used. Also, I haven't looked at why yet, but there are some test failures.
python/lib/core/dmod/core/dataset.py
Outdated
@@ -546,8 +548,8 @@ def add_data(self, dataset_name: str, dest: str, data: Optional[bytes] = None, s | |||
A path-like string specifying a location within the dataset (e.g., file, object, sub-URL) where the data | |||
should be added. | |||
data : Optional[bytes] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very minor, but need to tweak the type for data
in the docstring.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, great catch! I missed this one! Just fixed it.
6cb51d3
to
615dbc3
Compare
615dbc3
to
7075f3b
Compare
Just rebased after #542 was merged. Lets see if the IT tests pass now. |
7075f3b
to
51275ff
Compare
Had the wrong logic in the test 😂, so it failed, correctly. Just fixed it and repushed. |
Sweet, looks like the tests are all passing now. |
Thanks, @robertbartel! |
Enable adding data via
add_data()
to existing dataset using an object with aread() -> bytes
method. Thedata
argument now accepts either a filename or something that has aread() -> bytes
method. Implementation added forObjectStoreDatasetManager
.closes #319
Additions
DatasetManager.add_data()
'sdata
argument now accepts either a filename or something that has aread() -> bytes
method. Implementation added forObjectStoreDatasetManager
.