Skip to content

Commit

Permalink
Make set_metadata() modify objects in-place
Browse files Browse the repository at this point in the history
  • Loading branch information
jwodder committed Mar 11, 2021
1 parent 056f4fc commit 72c4673
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/design/python-api-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Designs for an improved Python API
* TO DO: Add an argument for controlling whether to create a directory under `target_dir` with the same name as the Dandiset ID?

* Methods of the `DraftDandiset` class (a subclass of `RemoteDandiset` used only for mutable draft versions):
* `set_metadata(metadata: DandisetMeta) -> DraftDandiset`returns the new, modified object
* `set_metadata(metadata: DandisetMeta) -> None`modifies instance in-place
* Methods for uploading an individual asset:
* `upload_file(filepath: Union[str, Path], metadata: BareAssetMeta, show_progress=True, existing="refesh", validation="require") -> RemoteAsset`
* `iter_upload_file(filepath: Union[str, Path], metadata: BareAssetMeta, existing="refesh", validation="require") -> Iterator[UploadProgressDict]`
Expand Down Expand Up @@ -105,7 +105,7 @@ Designs for an improved Python API
* `version_id: str`
* `get_metadata() -> RemoteAssetMeta`
* `get_raw_metadata() -> dict` — useful when the metadata is invalid
* `set_metadata(metadata: BareAssetMeta) -> RemoteAsset`returns the new, modified object
* `set_metadata(metadata: BareAssetMeta) -> None`modifies instance in-place
* `delete() -> None`
* `download(filepath: str, show_progress=True, chunk_size=...) -> ???`
* `iter_download(filepath: str, chunk_size=...) -> Iterator[DownloadProgressDict]`
Expand Down

0 comments on commit 72c4673

Please sign in to comment.