-
Notifications
You must be signed in to change notification settings - Fork 14
Read directly from remote paths, upload Dataset with reserve_manual_upload #1359
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
Open
valentin-pinkau
wants to merge
65
commits into
master
Choose a base branch
from
s3_remote_datasets
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
65 commits
Select commit
Hold shift + click to select a range
b411724
making the path optional in dataset, and layers
ba1fac5
typecheck. format. lint
20a84d0
add default for version. fix structuring
02c4685
fix more type errors
821dead
Merge branch 'master' of github.com:scalableminds/webknossos-libs int…
7b8e19b
add reserve manual upload.
87d1415
implement upload on dataset object.
8a2e741
Merge branch 'master' of github.com:scalableminds/webknossos-libs int…
1b3439d
update to api_version 11
69a6035
use enrich_path
b65135e
remove status from valid DatasetProperties
fb12c23
add default argument
004e656
always ask for included paths in dataset_info
b6b83c7
make dataset.path and layer.path optional
7b3cb28
moved dataset_properties
0ed681e
format
20b3e85
fix ruff for __init__
f9823f6
fix missing import
3804399
fix copy of attachments
8106055
fix imports
f719f79
fix import
dc51517
move layer_categories.py
ae47ced
reorder code in structuring
3a14b90
reorder is None check
9a8d31a
improve comment
c800547
move layer category
7176b0e
move imports
947ae35
no need for conversion anymore
15d8482
fix disambiguate
043a3dc
fix schema
ebbead2
wk now has lower case user emails
3500d9d
wk now has lower case user emails
5d822db
missing 7 cassettes.
5d016cc
elaborate comment about legacy field DatasetProperties.id
fm3 f31799a
add_attachment_as_copy now supports RemoteDatasets
0bae0c9
don't use RemoteDataset type
ae25d55
fix user names
b488f5e
missing one cassette
34f75f8
Merge branch 's3_remote_datasets' of github.com:scalableminds/webknos…
b41e219
separate type names and container names
be2a790
do not pass includePaths
a4b13e3
all cassettes!
d65b726
allow add_attachment_as_copy to publish attachments to remote datasets
7ff509c
Merge branch 'master' of github.com:scalableminds/webknossos-libs int…
80b18d2
update cassettes
7a6ab6e
rename manual_upload to upload_to_path*s
fm3 5239295
Adapt reserve routes to pass dataset_id in path; add new reserve_data…
fm3 8f2a182
remove default for version
bcf8c19
add publish_to_preliminary_dataset
5311b77
add announce_dataset_upload.py
56ca7c7
update docs
d510f47
Merge branch 'master' into s3_remote_datasets
valentin-pinkau 0a25507
allow moving of the data when publishing
5109ca2
Merge remote-tracking branch 'origin/s3_remote_datasets' into s3_remo…
a8489d3
use dataset updatePartial, update snapshots
fm3 2a1ffc2
Merge branch 's3_remote_datasets' of github.com:scalableminds/webknos…
fm3 20b4093
Allow saving RemoteDataset DatasetProperties changes back to server
fm3 fc56dcd
in case of symlink, directly link, no move
cc7f29d
rename
d7c1686
add env variable to __init__.py
3fed75a
move layer to link
4039eda
consolidate upload
e3f2ca6
Revert "move layer to link"
a42fe2f
format
6994821
use corrent variable
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Publish dataset to WEBKNOSSOS | ||
|
||
This example demonstrates the process of uploading a Dataset. | ||
|
||
```python | ||
--8<-- | ||
webknossos/examples/publish_to_webknossos.py | ||
--8<-- | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,32 @@ | ||||||
import webknossos as wk | ||||||
from webknossos import LayerToLink | ||||||
from webknossos.dataset.remote_folder import RemoteFolder | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
|
||||||
def main() -> None: | ||||||
# Get the folder id of the upload destination: | ||||||
folder_id = RemoteFolder.get_by_path("Datasets/").id | ||||||
|
||||||
# Open your unpublished dataset | ||||||
dataset = wk.Dataset.open("my_dataset.wkw") | ||||||
|
||||||
existing_dataset = wk.Dataset.open_remote( | ||||||
"https://webknossos.org/datasets/liconn_expid82-678f98e3010000dd017f4449/#3825,4866,795,0,1.3" | ||||||
) | ||||||
# Publish the dataset to webknossos | ||||||
# The data will be uploaded to the upload destination folder | ||||||
dataset.upload( | ||||||
new_dataset_name="my_new_dataset_name", | ||||||
folder_id=folder_id, | ||||||
layers_to_link=[ | ||||||
LayerToLink( | ||||||
existing_dataset.dataset_id, | ||||||
layer_name="image_230130b", | ||||||
new_layer_name="image", | ||||||
) | ||||||
], | ||||||
) | ||||||
|
||||||
|
||||||
if __name__ == "__main__": | ||||||
main() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
116 changes: 58 additions & 58 deletions
116
webknossos/tests/cassettes/test_annotation/test_annotation_upload_download_roundtrip.yml
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
import as wk or import directly. I wouldn't mix both.