Skip to content

Conversation

JoeStrout
Copy link
Contributor

  1. Refactored LineAnnotation and AnnotationLayer to make use of attrs
  2. AnnotationLayer.write_annotations now raises a ValueError if you supply a bounding box to clear, and any annotations are partially or fully outside that bounds
  3. The annotations PUT endpoint silently discards any annotations not within the specified bounds.

Copy link

codecov bot commented Jan 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (303511d) to head (7d091da).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #879   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          143       143           
  Lines         6130      6135    +5     
=========================================
+ Hits          6130      6135    +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JoeStrout JoeStrout force-pushed the joe/feat_precomp_attrs branch from 41e1649 to 7d091da Compare January 29, 2025 15:22
index: VolumetricIndex
chunk_sizes: Sequence[Sequence[int]]
path: str = ""

def __init__(
Copy link
Member

Choose a reason for hiding this comment

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

The canonical way to do it is to still use attrs.define(init=True) and add an __attrs_post_innit__ that performs complex checks and re-sets variables.

@supersergiy
Copy link
Member

@JoeStrout is this still relevant to be merged or did we evolve away from that?

@JoeStrout
Copy link
Contributor Author

Ugh. Some of this is still relevant, but will conflict heavily with the refactoring we did (in another branch, now merged) converting AnnotationLayer into a VolumetricBackend.

I'll have to redo the relevant bits by hand, but at this point I should do that after merging all the other outstanding code.

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.

2 participants