Skip to content

Conversation

@valentin-pinkau
Copy link
Member

@valentin-pinkau valentin-pinkau commented Nov 6, 2025

Description:

  • This PR adds SYMLINK transfer mode
  • Introduces a new method on RemoteAttachments: upload_attachment
  • Makes sure syncing to the remote state is applied to segmentation layers and their attachments as well
  • Makes RemoteLayers read-only in case of zarr streaming.

Todos:

Make sure to delete unnecessary points or to check all before merging:

  • Updated Changelog
  • Updated Documentation
  • Added / Updated Tests
  • Considered adding this to the Examples

@valentin-pinkau valentin-pinkau self-assigned this Nov 6, 2025
@github-actions
Copy link

github-actions bot commented Nov 6, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
10160 8487 84% 80% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
webknossos/webknossos/client/api_client/models.py 100% 🟢
webknossos/webknossos/client/api_client/wk_api_client.py 84% 🟢
webknossos/webknossos/dataset/dataset.py 76% 🟢
webknossos/webknossos/dataset/layer/abstract_layer.py 95% 🟢
webknossos/webknossos/dataset/layer/remote_layer.py 94% 🟢
webknossos/webknossos/dataset/layer/segmentation_layer/abstract_segmentation_layer.py 92% 🟢
webknossos/webknossos/dataset/layer/segmentation_layer/attachments/attachments.py 78% 🟢
webknossos/webknossos/dataset/remote_dataset.py 79% 🟢
webknossos/webknossos/dataset/transfer_mode.py 86% 🟢
TOTAL 87% 🟢

updated for commit: 500630f by action🐍

@valentin-pinkau valentin-pinkau changed the title add symlink transfer_mode. Improve RemoteAttachment upload Add symlink transfermode. Add transfermode support in RemoteAttachments. Nov 7, 2025
@valentin-pinkau valentin-pinkau changed the title Add symlink transfermode. Add transfermode support in RemoteAttachments. Add transfermode support to RemoteAttachments. Nov 7, 2025
@valentin-pinkau valentin-pinkau changed the title Add transfermode support to RemoteAttachments. Add transfer mode support to RemoteAttachments. Nov 7, 2025
@valentin-pinkau valentin-pinkau requested a review from fm3 November 7, 2025 15:17
Copy link
Member

@fm3 fm3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! Just some small suggestions.

Also, please add a changelog entry :)


@pytest.mark.skip(
reason="This won't work in CI as the paths stored in cassettes are always absolute and dependent on the system recording the cassette."
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does that mean the test is never run, unless explicitly selected by a user?

Could it run in the nightly? There are no cassettes used there, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we would need cassettes as we need the response from wk where to upload the attachment. So this is very similar to the dataset.upload case. @normanrz suggested to setup a minio and configure the wk to use it as storage. This way, we have the same paths in the CI and locally. This should be done in the near future.

"Expecting all mags from original dataset and new downsampled mag"
)
assert (
assert str(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why stringify the paths for the comparison?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because the ds_path / "segmentation" / "agglomerates" / "agglomerate_view.hdf5" becomes a (((S3Path('testoutput/zarr3_dataset_original', protocol='s3') / 'segmentation') / 'agglomerates') / 'agglomerate_view.hdf5') which is not equal to S3Path('testoutput/zarr3_dataset_original/segmentation/agglomerates/agglomerate_view.hdf5', protocol='s3')

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. I mean, maybe it should be equal, though? Is this something we control? But anyway, not as part of this PR

@valentin-pinkau valentin-pinkau requested a review from fm3 November 10, 2025 15:17
Copy link
Member

@fm3 fm3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@valentin-pinkau valentin-pinkau merged commit ee1dec0 into master Nov 10, 2025
23 checks passed
@valentin-pinkau valentin-pinkau deleted the more_transfer_mode_usage branch November 10, 2025 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants