Skip to content

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
@github-actions
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🐍

@valentin-pinkau
Copy link
Member Author

closed in favor of #1361

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