Skip to content

feat: modulo[wip]#222

Open
tlambert03 wants to merge 4 commits intomainfrom
modulo
Open

feat: modulo[wip]#222
tlambert03 wants to merge 4 commits intomainfrom
modulo

Conversation

@tlambert03
Copy link
Member

@joshmoore, here's the beginning of a modulo type

from ome_types.model import OME, modulo

m = modulo.ModuloAnnotation()
m.value.modulos.modulo_along_c = modulo.Modulo(
    type=modulo.ModuloType.ANGLE, start=0, end=360
)

ome = OME()
ome.structured_annotations.append(m)

print(ome.to_xml())
<OME xmlns="http://www.openmicroscopy.org/Schemas/OME/2016-06" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openmicroscopy.org/Schemas/OME/2016-06 http://www.openmicroscopy.org/Schemas/OME/2016-06/ome.xsd">
  <StructuredAnnotations>
    <XMLAnnotation xmlns:ns2="openmicroscopy.org/omero/dimension/modulo" ID="Annotation:0" xsi:type="ns2:ModuloAnnotation">
      <ns2:Value>
        <Modulo>
          <ns3:ModuloAlongC xmlns:ns3="http://www.openmicroscopy.org/Schemas/Additions/2011-09" Type="angle" Start="0" End="360"/>
        </Modulo>
      </ns2:Value>
    </XMLAnnotation>
  </StructuredAnnotations>
</OME>

as you can see, the namespaces are still a bit messed up... but it's a start

@codspeed-hq
Copy link

codspeed-hq bot commented Sep 24, 2023

CodSpeed Performance Report

Merging #222 will not alter performance

Comparing modulo (b3912e5) with main (6f3c6ee)

Summary

✅ 9 untouched benchmarks

@joshmoore
Copy link
Collaborator

This is great, thanks, @tlambert03! As I mentioned on Zulip, https://github.com/ome/bioformats/blob/bc1fcddd5329d900853d55c6f8378e9235a26a53/components/formats-api/src/loci/formats/Modulo.java#L39 is probably the best definition of truth for the moment. But if you have any other questions, @jburel, @dgault, @sbesson, and @melissalinkert can hopefully help us out.

@joshmoore
Copy link
Collaborator

seealso: ome/omero-cli-transfer#74

@codecov
Copy link

codecov bot commented Dec 28, 2023

Codecov Report

Attention: 47 lines in your changes are missing coverage. Please review.

Comparison is base (6f3c6ee) 86.75% compared to head (b3912e5) 79.55%.

Files Patch % Lines
src/ome_types/model/modulo.py 0.00% 46 Missing ⚠️
src/ome_types/_mixins/_collections.py 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #222      +/-   ##
==========================================
- Coverage   86.75%   79.55%   -7.20%     
==========================================
  Files          24       25       +1     
  Lines        1200     1252      +52     
==========================================
- Hits         1041      996      -45     
- Misses        159      256      +97     

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

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