Skip to content

Commit 49fca20

Browse files
authored
Fix trees don't behave like nx Graphs (#1241)
* Add test and debug differences in behaviour. * Update getter of NodeDict to include Nodes properties. * Update test for nx graph like behavior. * Update cassettes. * Update changelog. * Update docker compose of fossildb and cassettes.
1 parent bd8a6af commit 49fca20

36 files changed

+1687
-2516
lines changed

webknossos/Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ For upgrade instructions, please check the respective _Breaking Changes_ section
1818
- Added support for python 3.13. [#1240](https://github.com/scalableminds/webknossos-libs/pull/1240)
1919

2020
### Changed
21+
- When iterating over `Tree.nodes(data=True)` the nodes data dict was empty. To enable easier access to the data stored in each Node the properties of a Node are included in its data dict now. [#1241](https://github.com/scalableminds/webknossos-libs/pull/1241)
2122
- `Dataset.open_remote()` adds another method to disambiguate dataset_name and organization_id. [#1247](https://github.com/scalableminds/webknossos-libs/pull/1247)
2223

2324
### Fixed

webknossos/local_wk_setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
function export_vars {
22
export WK_TOKEN=1b88db86331a38c21a0b235794b9e459856490d70408bcffb767f64ade0f83d2bdb4c4e181b9a9a30cdece7cb7c65208cc43b6c1bb5987f5ece00d348b1a905502a266f8fc64f0371cd6559393d72e031d0c2d0cabad58cccf957bb258bc86f05b5dc3d4fff3d5e3d9c0389a6027d861a21e78e3222fb6c5b7944520ef21761e
33
export WK_URL=http://localhost:9000
4-
export DOCKER_TAG=master__31116
4+
export DOCKER_TAG=master__31584
55
}
66

77
function ensure_local_test_wk {

webknossos/tests/cassettes/test_annotation/test_annotation_upload_download_roundtrip.yml

Lines changed: 46 additions & 46 deletions
Large diffs are not rendered by default.

webknossos/tests/cassettes/test_annotation/test_bounding_box_roundtrip.yml

Lines changed: 31 additions & 61 deletions
Large diffs are not rendered by default.

webknossos/tests/cassettes/test_api_client/test_annotation_info.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ http_interactions:
22
- request:
33
method: GET
44
path: >-
5-
/api/v9/annotations/570ba0092a7c0e980056fe9b/info?timestamp=1738236191000
5+
/api/v9/annotations/570ba0092a7c0e980056fe9b/info?timestamp=1738247720000
66
headers:
77
host: localhost:9000
88
accept: '*/*'
@@ -22,11 +22,11 @@ http_interactions:
2222
cache-control: no-cache
2323
referrer-policy: origin-when-cross-origin, strict-origin-when-cross-origin
2424
x-permitted-cross-domain-policies: master-only
25-
date: Thu, 30 Jan 2025 11:23:10 GMT
25+
date: Thu, 30 Jan 2025 14:35:19 GMT
2626
content-type: application/json
27-
content-length: '1929'
27+
content-length: '1911'
2828
body:
2929
encoding: utf8
3030
data: >-
31-
{"modified":0,"state":"Active","isLockedByOwner":false,"id":"570ba0092a7c0e980056fe9b","name":"","description":"","viewConfiguration":null,"typ":"Explorational","task":null,"stats":{},"restrictions":{"allowAccess":true,"allowUpdate":true,"allowFinish":true,"allowDownload":true},"annotationLayers":[{"tracingId":"ae417175-f7bb-4a34-8187-d9c3b50143ae","typ":"Skeleton","name":"Skeleton","stats":{"edgeCount":28965,"nodeCount":28967,"treeCount":2,"branchPointCount":0}}],"datasetId":"570b9f4e4bb848d0885ee711","dataSetName":"2012-06-28_Cortex","organization":"Organization_X","dataStore":{"name":"localhost","url":"http://localhost:9000","isScratch":false,"allowsUpload":true,"jobsSupportedByAvailableWorkers":[],"jobsEnabled":false},"tracingStore":{"name":"localhost","url":"http://localhost:9000"},"visibility":"Internal","settings":{"allowedModes":["orthogonal","oblique","flight"],"branchPointsAllowed":true,"somaClickingAllowed":true,"volumeInterpolationAllowed":true,"mergerMode":false,"magRestrictions":{}},"tracingTime":null,"teams":[],"tags":["2012-06-28_Cortex","skeleton"],"user":{"id":"570b9f4d2a7c0e4d008da6ef","email":"[email protected]","firstName":"user_A","lastName":"last_A","isAdmin":true,"isDatasetManager":true,"isAnonymous":false,"teams":[{"id":"570b9f4b2a7c0e3b008da6ec","name":"team_X1","isTeamManager":true},{"id":"59882b370d889b84020efd3f","name":"team_X3","isTeamManager":false},{"id":"59882b370d889b84020efd6f","name":"team_X4","isTeamManager":true}]},"owner":{"id":"570b9f4d2a7c0e4d008da6ef","email":"[email protected]","firstName":"user_A","lastName":"last_A","isAdmin":true,"isDatasetManager":true,"isAnonymous":false,"teams":[{"id":"570b9f4b2a7c0e3b008da6ec","name":"team_X1","isTeamManager":true},{"id":"59882b370d889b84020efd3f","name":"team_X3","isTeamManager":false},{"id":"59882b370d889b84020efd6f","name":"team_X4","isTeamManager":true}]},"contributors":[],"othersMayEdit":false}
31+
{"modified":0,"state":"Active","isLockedByOwner":false,"id":"570ba0092a7c0e980056fe9b","name":"","description":"","viewConfiguration":null,"typ":"Explorational","task":null,"stats":{},"restrictions":{"allowAccess":true,"allowUpdate":true,"allowFinish":true,"allowDownload":true},"annotationLayers":[{"tracingId":"ae417175-f7bb-4a34-8187-d9c3b50143ae","typ":"Skeleton","name":"Skeleton","stats":{"edgeCount":28965,"nodeCount":28967,"treeCount":2,"branchPointCount":0}}],"datasetId":"570b9f4e4bb848d0885ee711","dataSetName":"2012-06-28_Cortex","organization":"Organization_X","dataStore":{"name":"localhost","url":"http://localhost:9000","allowsUpload":true,"jobsSupportedByAvailableWorkers":[],"jobsEnabled":false},"tracingStore":{"name":"localhost","url":"http://localhost:9000"},"visibility":"Internal","settings":{"allowedModes":["orthogonal","oblique","flight"],"branchPointsAllowed":true,"somaClickingAllowed":true,"volumeInterpolationAllowed":true,"mergerMode":false,"magRestrictions":{}},"tracingTime":null,"teams":[],"tags":["2012-06-28_Cortex","skeleton"],"user":{"id":"570b9f4d2a7c0e4d008da6ef","email":"[email protected]","firstName":"user_A","lastName":"last_A","isAdmin":true,"isDatasetManager":true,"isAnonymous":false,"teams":[{"id":"570b9f4b2a7c0e3b008da6ec","name":"team_X1","isTeamManager":true},{"id":"59882b370d889b84020efd3f","name":"team_X3","isTeamManager":false},{"id":"59882b370d889b84020efd6f","name":"team_X4","isTeamManager":true}]},"owner":{"id":"570b9f4d2a7c0e4d008da6ef","email":"[email protected]","firstName":"user_A","lastName":"last_A","isAdmin":true,"isDatasetManager":true,"isAnonymous":false,"teams":[{"id":"570b9f4b2a7c0e3b008da6ec","name":"team_X1","isTeamManager":true},{"id":"59882b370d889b84020efd3f","name":"team_X3","isTeamManager":false},{"id":"59882b370d889b84020efd6f","name":"team_X4","isTeamManager":true}]},"contributors":[],"othersMayEdit":false}
3232
compression: none

webknossos/tests/cassettes/test_api_client/test_build_info.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ http_interactions:
2222
access-control-max-age: '600'
2323
access-control-allow-origin: '*'
2424
x-permitted-cross-domain-policies: master-only
25-
date: Thu, 30 Jan 2025 11:23:12 GMT
25+
date: Thu, 30 Jan 2025 14:35:21 GMT
2626
content-type: application/json
2727
content-length: '415'
2828
body:
2929
encoding: utf8
3030
data: >-
31-
{"webknossos":{"name":"webknossos","ciTag":"","commitHash":"e1dd0672d5bd134d589faf6e6cbe15ad2a8fc9a2","ciBuild":"31116","scalaVersion":"2.13.14","version":"31116","sbtVersion":"1.10.1","datastoreApiVersion":"2.0","commitDate":"Mon
32-
Dec 16 14:11:22 2024
31+
{"webknossos":{"name":"webknossos","ciTag":"","commitHash":"13f8c143df4c37980e34b1ea5ed110ce9fb9374f","ciBuild":"31584","scalaVersion":"2.13.14","version":"31584","sbtVersion":"1.10.1","datastoreApiVersion":"2.0","commitDate":"Mon
32+
Jan 27 16:19:03 2025
3333
+0100"},"schemaVersion":125,"httpApiVersioning":{"currentApiVersion":9,"oldestSupportedApiVersion":5},"localDataStoreEnabled":true,"localTracingStoreEnabled":true}
3434
compression: none

webknossos/tests/cassettes/test_api_client/test_current_user_info_and_user_logged_time.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ http_interactions:
2121
cache-control: no-cache
2222
referrer-policy: origin-when-cross-origin, strict-origin-when-cross-origin
2323
x-permitted-cross-domain-policies: master-only
24-
date: Thu, 30 Jan 2025 11:23:11 GMT
24+
date: Thu, 30 Jan 2025 14:35:20 GMT
2525
content-type: application/json
2626
content-length: '682'
2727
body:
2828
encoding: utf8
2929
data: >-
30-
{"id":"570b9f4d2a7c0e4d008da6ef","email":"[email protected]","firstName":"user_A","lastName":"last_A","isAdmin":true,"isOrganizationOwner":true,"isDatasetManager":true,"isActive":true,"teams":[{"id":"570b9f4b2a7c0e3b008da6ec","name":"team_X1","isTeamManager":true},{"id":"59882b370d889b84020efd3f","name":"team_X3","isTeamManager":false},{"id":"59882b370d889b84020efd6f","name":"team_X4","isTeamManager":true}],"experiences":{"abc":5},"lastActivity":1738235973758,"isAnonymous":false,"isEditable":true,"organization":"Organization_X","novelUserExperienceInfos":{},"selectedTheme":"auto","created":1460379469000,"lastTaskTypeId":null,"isSuperUser":true,"isEmailVerified":true}
30+
{"id":"570b9f4d2a7c0e4d008da6ef","email":"[email protected]","firstName":"user_A","lastName":"last_A","isAdmin":true,"isOrganizationOwner":true,"isDatasetManager":true,"isActive":true,"teams":[{"id":"570b9f4b2a7c0e3b008da6ec","name":"team_X1","isTeamManager":true},{"id":"59882b370d889b84020efd3f","name":"team_X3","isTeamManager":false},{"id":"59882b370d889b84020efd6f","name":"team_X4","isTeamManager":true}],"experiences":{"abc":5},"lastActivity":1738247524926,"isAnonymous":false,"isEditable":true,"organization":"Organization_X","novelUserExperienceInfos":{},"selectedTheme":"auto","created":1460379469000,"lastTaskTypeId":null,"isSuperUser":true,"isEmailVerified":true}
3131
compression: none
3232
- request:
3333
method: GET
@@ -51,7 +51,7 @@ http_interactions:
5151
cache-control: no-cache
5252
referrer-policy: origin-when-cross-origin, strict-origin-when-cross-origin
5353
x-permitted-cross-domain-policies: master-only
54-
date: Thu, 30 Jan 2025 11:23:11 GMT
54+
date: Thu, 30 Jan 2025 14:35:20 GMT
5555
content-type: application/json
5656
content-length: '691'
5757
body:

webknossos/tests/cassettes/test_api_client/test_dataset_info.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ http_interactions:
2121
cache-control: no-cache
2222
referrer-policy: origin-when-cross-origin, strict-origin-when-cross-origin
2323
x-permitted-cross-domain-policies: master-only
24-
date: Thu, 30 Jan 2025 11:23:12 GMT
24+
date: Thu, 30 Jan 2025 14:35:20 GMT
2525
content-type: application/json
2626
content-length: '112'
2727
body:
@@ -51,11 +51,11 @@ http_interactions:
5151
cache-control: no-cache
5252
referrer-policy: origin-when-cross-origin, strict-origin-when-cross-origin
5353
x-permitted-cross-domain-policies: master-only
54-
date: Thu, 30 Jan 2025 11:23:12 GMT
54+
date: Thu, 30 Jan 2025 14:35:20 GMT
5555
content-type: application/json
56-
content-length: '1602'
56+
content-length: '1584'
5757
body:
5858
encoding: utf8
5959
data: >-
60-
{"id":"59e9cfbdba632ac2ab8b23b5","name":"l4_sample","dataSource":{"id":{"name":"l4_sample","team":"Organization_X"},"dataLayers":[{"name":"color","category":"color","boundingBox":{"topLeft":[3072,3072,512],"width":1024,"height":1024,"depth":1024},"resolutions":[[1,1,1],[2,2,1],[4,4,1],[8,8,2],[16,16,4]],"elementClass":"uint8","defaultViewConfiguration":{"color":[255,0,0]}},{"name":"segmentation","category":"segmentation","boundingBox":{"topLeft":[3072,3072,512],"width":1024,"height":1024,"depth":1024},"resolutions":[[1,1,1],[2,2,1],[4,4,1],[8,8,2],[16,16,4]],"elementClass":"uint32","largestSegmentId":2504697}],"scale":{"factor":[11.239999771118164,11.239999771118164,28],"unit":"nanometer"}},"dataStore":{"name":"localhost","url":"http://localhost:9000","isScratch":false,"allowsUpload":true,"jobsSupportedByAvailableWorkers":[],"jobsEnabled":false},"owningOrganization":"Organization_X","allowedTeams":[{"id":"570b9f4b2a7c0e3b008da6ec","name":"team_X1","organization":"Organization_X"}],"allowedTeamsCumulative":[{"id":"570b9f4b2a7c0e3b008da6ec","name":"team_X1","organization":"Organization_X"}],"isActive":true,"isPublic":true,"description":null,"directoryName":"l4_sample","created":1508495293789,"isEditable":true,"lastUsedByUser":1738236192619,"logoUrl":"/assets/images/mpi-logos.svg","sortingKey":1508495293789,"metadata":[{"key":"key","type":"string","value":"value"},{"key":"number","type":"number","value":42},{"key":"list","type":"string[]","value":["a","b","c"]}],"isUnreported":false,"tags":[],"folderId":"570b9f4e4bb848d0885ea917","publication":null,"usedStorageBytes":1692207513}
60+
{"id":"59e9cfbdba632ac2ab8b23b5","name":"l4_sample","dataSource":{"id":{"name":"l4_sample","team":"Organization_X"},"dataLayers":[{"name":"color","category":"color","boundingBox":{"topLeft":[3072,3072,512],"width":1024,"height":1024,"depth":1024},"resolutions":[[1,1,1],[2,2,1],[4,4,1],[8,8,2],[16,16,4]],"elementClass":"uint8","defaultViewConfiguration":{"color":[255,0,0]}},{"name":"segmentation","category":"segmentation","boundingBox":{"topLeft":[3072,3072,512],"width":1024,"height":1024,"depth":1024},"resolutions":[[1,1,1],[2,2,1],[4,4,1],[8,8,2],[16,16,4]],"elementClass":"uint32","largestSegmentId":2504697}],"scale":{"factor":[11.239999771118164,11.239999771118164,28],"unit":"nanometer"}},"dataStore":{"name":"localhost","url":"http://localhost:9000","allowsUpload":true,"jobsSupportedByAvailableWorkers":[],"jobsEnabled":false},"owningOrganization":"Organization_X","allowedTeams":[{"id":"570b9f4b2a7c0e3b008da6ec","name":"team_X1","organization":"Organization_X"}],"allowedTeamsCumulative":[{"id":"570b9f4b2a7c0e3b008da6ec","name":"team_X1","organization":"Organization_X"}],"isActive":true,"isPublic":true,"description":null,"directoryName":"l4_sample","created":1508495293789,"isEditable":true,"lastUsedByUser":1738247721289,"logoUrl":"/assets/images/mpi-logos.svg","sortingKey":1508495293789,"metadata":[{"key":"key","type":"string","value":"value"},{"key":"number","type":"number","value":42},{"key":"list","type":"string[]","value":["a","b","c"]}],"isUnreported":false,"tags":[],"folderId":"570b9f4e4bb848d0885ea917","publication":null,"usedStorageBytes":1692207513}
6161
compression: none

webknossos/tests/cassettes/test_api_client/test_datastore_list.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ http_interactions:
2121
cache-control: no-cache
2222
referrer-policy: origin-when-cross-origin, strict-origin-when-cross-origin
2323
x-permitted-cross-domain-policies: master-only
24-
date: Thu, 30 Jan 2025 11:23:11 GMT
24+
date: Thu, 30 Jan 2025 14:35:19 GMT
2525
content-type: application/json
26-
content-length: '147'
26+
content-length: '129'
2727
body:
2828
encoding: utf8
2929
data: >-
30-
[{"name":"localhost","url":"http://localhost:9000","isScratch":false,"allowsUpload":true,"jobsSupportedByAvailableWorkers":[],"jobsEnabled":false}]
30+
[{"name":"localhost","url":"http://localhost:9000","allowsUpload":true,"jobsSupportedByAvailableWorkers":[],"jobsEnabled":false}]
3131
compression: none

webknossos/tests/cassettes/test_api_client/test_generate_token_for_data_store.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ http_interactions:
2222
cache-control: no-cache
2323
referrer-policy: origin-when-cross-origin, strict-origin-when-cross-origin
2424
x-permitted-cross-domain-policies: master-only
25-
date: Thu, 30 Jan 2025 11:23:11 GMT
25+
date: Thu, 30 Jan 2025 14:35:20 GMT
2626
content-type: application/json
2727
content-length: '34'
2828
body:
2929
encoding: utf8
30-
data: '{"token":"KFZHvz4A7iVBVjpP9Hieqg"}'
30+
data: '{"token":"vl8YqmR4lVF-PKoXsP_Vwg"}'
3131
compression: none

0 commit comments

Comments
 (0)