-
Notifications
You must be signed in to change notification settings - Fork 13
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
Support renameable datasets and WK API v9 #1231
base: master
Are you sure you want to change the base?
Conversation
@@ -13,10 +13,15 @@ For upgrade instructions, please check the respective _Breaking Changes_ section | |||
[Commits](https://github.com/scalableminds/webknossos-libs/compare/v0.16.2...HEAD) | |||
|
|||
### Breaking Changes | |||
- Remote datasets don't have a display_name property anymore. To change the name of a dataset use the `name` property. |
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.
Can we make that more graceful, i.e. put in a display_name
property that just proxies the name
property and issues a deprecation warning?
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.
Sure.
@@ -119,7 +119,7 @@ def create( | |||
cls, | |||
task_type_id: str, | |||
project_name: str, | |||
dataset_name: Union[str, RemoteDataset], | |||
dataset_id: Union[str, RemoteDataset], |
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.
This is also a breaking change, no?
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.
Yes I missed that, I will add it in the changelog.
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.
Could you also still accept dataset_name
with disambiguation and deprecation warning?
@@ -639,7 +679,31 @@ def _parse_remote( | |||
|
|||
context_manager = nullcontext() | |||
|
|||
return context_manager, dataset_name, organization_id, sharing_token | |||
if dataset_id is None: |
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.
This looks like the same code in lines 611-627. Does it make sense to extract in a function?
@@ -2675,10 +2744,12 @@ def _initialize_layer_from_properties(self, properties: LayerProperties) -> Laye | |||
def get_remote_datasets( | |||
organization_id: Optional[str] = None, | |||
tags: Optional[Union[str, Sequence[str]]] = None, | |||
name: Optional[str] = None, | |||
folder_id: Optional[str] = None, |
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.
I think a Folder
object would be better.
Description:
Issues:
Todos:
Make sure to delete unnecessary points or to check all before merging: