-
Notifications
You must be signed in to change notification settings - Fork 14
refactor dataset, remote_dataset, and layer #1371
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
Merged
Merged
Changes from all commits
Commits
Show all changes
120 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
f493b17
refactor dataset, remote_dataset, and layer
37c51fb
clean up
0b0478f
refactor packages. typecheck runs through
4030fbb
fixed imports
1a4b3b9
move _array
37bd096
add layer and remote_layer to mag view
905e354
rename attachments_type
f24c1fb
move download to abstract dataset
cd5bbce
move open_remote to abstract_dataset.py
6c5a6cb
remove init
eb67fb3
make magview generic over layer
3c801e2
adapt comment
a227c2e
add_layer_like now accepts RemoteLayers. remove test for adding remot…
35d26f1
update snapshots
124db09
increase chunk shape
751cb8d
add changelog
5db21cf
merge master
a6bfc84
format and lint
6389609
remove unnecessary asserts
101064f
fix magview rechunk
a110d19
remove unused method
b5de338
clean up, removing code from older iterations
fda0c92
removed None checks
3b07bca
update changelog
3d303fe
format
403883b
restore from_remote_layer method
d5e3203
use Mapping
2865995
move download_mesh to RemoteSegmentationLayer
6d33d92
move Dataset.get_remote_datasets -> RemoteDataset.list and Dataset.op…
d1771b8
use RemoteDataset.open instead of Dataset.open_remote
9a24644
fix usage of deprecated methods
6fc4009
format
4e7fd21
add backwards compatible deprecated is_foreign property on MagView
e1a6dd2
make ensure_layer compatible with remote layers
b1e878d
update changelog
b39d10d
merge master
f384549
update cassettes
7afad19
update api version to 12
c205b0f
rename
8ad9971
add upload_to_webknossos example to docs
9fcdeff
Merge branch 'master' of github.com:scalableminds/webknossos-libs int…
bcf522a
remove old link
bf61051
fix changelog
053d0f4
allow new name to be passed to LayerToLink.from_remote_layer
25c274a
add tests for upload to common storage
2187418
lint & format
d23ee1a
update cassettes
7586ae7
move _parse_remote, _disambiguate_remote, get_remote_datasets from ab…
6aa7d85
Update webknossos/Changelog.md
valentin-pinkau 2938379
add deprecation to changelog
50d2dde
Merge branch 'refactor_dataset' of github.com:scalableminds/webknosso…
21b9f26
fix changelog
2e92e8c
format and fix ensure_layer
87f02bc
add missing cassettes
d81a14b
skip upload tests
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 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 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 @@ | ||
# Upload dataset to WEBKNOSSOS | ||
|
||
This example demonstrates the process of uploading a Dataset. | ||
|
||
```python | ||
--8<-- | ||
webknossos/examples/upload_to_webknossos.py | ||
--8<-- | ||
``` |
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 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
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
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,30 @@ | ||
import webknossos as wk | ||
from webknossos import LayerToLink | ||
from webknossos.dataset.remote_folder import RemoteFolder | ||
|
||
|
||
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.RemoteDataset.open( | ||
"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.from_remote_layer( | ||
existing_dataset.get_layer("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
504 changes: 78 additions & 426 deletions
504
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.
Uh oh!
There was an error while loading. Please reload this page.