Skip to content

[WIP] add get_segments_for_agglomerate to RemoteAnnotation #1351

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
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

valentin-pinkau
Copy link
Member

@valentin-pinkau valentin-pinkau commented Aug 11, 2025

Description:

This PR enables the libs to get the segments for a proofread agglomerate.

import webknossos as wk
def get_segments_for_agglomerate(annotation_id: str, agglomerate_id: int) -> Optional[List[int]]:
  """
  Returns the segments for the given agglomerate or None if the agglomerate was not edited in this annotation.
  """
  with wk.webknossos_context(
      token="YOUR_TOKEN", url="WK_URL"
  ):
    remote_annotation = wk.Annotation.open_remote(annotation_id)
    return remote_annotation.get_segments_for_agglomerate(agglomerate_id)

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 Aug 11, 2025
Copy link

github-actions bot commented Aug 11, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
9330 7863 84% 80% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
webknossos/webknossos/annotation/annotation.py 79% 🟢
webknossos/webknossos/client/api_client/models.py 100% 🟢
webknossos/webknossos/client/api_client/tracingstore_api_client.py 50% 🟢
TOTAL 76% 🟢

updated for commit: 0c02521 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