Skip to content

More remote CRUD#1438

Open
normanrz wants to merge 31 commits intomasterfrom
more-remote-crud
Open

More remote CRUD#1438
normanrz wants to merge 31 commits intomasterfrom
more-remote-crud

Conversation

@normanrz
Copy link
Copy Markdown
Member

@normanrz normanrz commented Mar 16, 2026

Description:

  • Added RemoteDataset.add_layer_as_ref, RemoteLayer.add_mag_as_ref, RemoteAttachments.add_attachment_as_ref, RemoteAttachments.delete_attachment, RemoteAttachment.rename_attachment, Attachments.rename_attachments.

Issues:

Todos:

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

  • Updated Changelog
  • Updated Documentation
  • Added / Updated Tests

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly expands the remote data management capabilities of the WEBKNOSSOS CLI and underlying libraries. It streamlines workflows by allowing direct conversion and upload of image data, as well as remote downsampling and upsampling of datasets. These changes reduce the need for manual data transfers and local processing, making it easier to work with WEBKNOSSOS datasets hosted on remote servers.

Highlights

  • Enhanced CLI for Remote Operations: The webknossos convert, webknossos downsample, and webknossos upsample CLI commands now support direct interaction with remote WEBKNOSSOS servers, allowing for conversion and processing of datasets directly on the platform.
  • Direct Upload during Conversion: A new --upload flag has been added to the webknossos convert command, enabling users to convert local image stacks into WEBKNOSSOS datasets and upload them directly to a specified server in a single step.
  • Remote Dataset Composition: New API endpoints and client methods were introduced to allow for composing remote layers, magnifications, and attachments by reference, facilitating more flexible remote data management.
  • Improved Documentation and Error Handling: The documentation for CLI commands has been updated to reflect the new remote capabilities and options. Internal error handling for dataset and layer operations, particularly around magnification existence and renaming, has been refined.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • webknossos/Changelog.md
    • The webknossos convert command now accepts a --upload flag, to upload the converted dataset to WEBKNOSSOS. In that case, the target path is not required anymore. [Remote convert cli #1433]
    • The webknossos downsample and webknossos upsample commands now work with remote datasets on WEBKNOSSOS. [Remote convert cli #1433]
Activity
  • The pull request description indicates initial development and standard checks, including an unspecified 'abc' task and a fix for an issue.
  • The author has listed several standard tasks to be completed before merging, such as updating the changelog, documentation, and tests, and considering adding examples.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request significantly enhances the remote CRUD capabilities of the library, allowing users to convert and upload datasets in one step, and to downsample/upsample remote datasets directly. The documentation has been updated accordingly, which is great for usability. The refactoring to use a common open_dataset utility is a good improvement for code maintainability.

I've found a couple of potential issues:

  • A likely copy-paste error in an API client route for adding a magnification.
  • A redundant API call after renaming an attachment, which could impact performance.

Overall, this is a solid contribution with valuable new features. Addressing the mentioned points will make it even better.

@normanrz normanrz self-assigned this Mar 19, 2026
@normanrz normanrz marked this pull request as ready for review March 19, 2026 20:29
@github-actions
Copy link
Copy Markdown

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
11342 9590 85% 80% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
webknossos/webknossos/client/api_client/_abstract_api_client.py 91% 🟢
webknossos/webknossos/client/api_client/models.py 100% 🟢
webknossos/webknossos/client/api_client/wk_api_client.py 87% 🟢
webknossos/webknossos/dataset/abstract_dataset.py 93% 🟢
webknossos/webknossos/dataset/dataset.py 78% 🟢
webknossos/webknossos/dataset/layer/_init_.py 100% 🟢
webknossos/webknossos/dataset/layer/abstract_layer.py 94% 🟢
webknossos/webknossos/dataset/layer/remote_layer.py 87% 🟢
webknossos/webknossos/dataset/layer/segmentation_layer/init.py 100% 🟢
webknossos/webknossos/dataset/layer/segmentation_layer/attachments/attachments.py 85% 🟢
webknossos/webknossos/dataset/remote_dataset.py 82% 🟢
TOTAL 91% 🟢

updated for commit: fa20bef by action🐍

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.

1 participant