gmggroup / omf-python

Python library for working with OMF files
MIT License
79 stars 19 forks source link

[GH-50] New element: Composite Element #88

Closed fwkoch closed 5 years ago

fwkoch commented 5 years ago

The Composite Element is composed of a list of other elements. This is used for grouping spatial primitives into more complex individual objects.

Attributes may be defined on the Composite Element (these must correspond to each element - so if you have 5 elements, the attribute array must be length-5). Attributes may also be defined on each individual element.

Note - following up on the discussion here https://github.com/gmggroup/omf/issues/50 I chose to disallow nesting of multiple composite elements. I believe this is still general enough for most use cases, and it eliminates the requirement to implement arbitrarily deep nesting of composite elements when adopting OMF.

codecov-io commented 5 years ago

Codecov Report

Merging #88 into dev will increase coverage by 0.08%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev      #88      +/-   ##
==========================================
+ Coverage   96.33%   96.42%   +0.08%     
==========================================
  Files          11       12       +1     
  Lines         519      532      +13     
==========================================
+ Hits          500      513      +13     
  Misses         19       19
Impacted Files Coverage Δ
omf/__init__.py 100% <100%> (ø) :arrow_up:
omf/lineset.py 96.77% <100%> (ø) :arrow_up:
omf/base.py 95% <100%> (ø) :arrow_up:
omf/surface.py 96.15% <100%> (ø) :arrow_up:
omf/composite.py 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e46ef41...66c9d45. Read the comment docs.

dbrookes96 commented 5 years ago

Looks good. Being able to have per element data is something I didn't think about and seems quite useful.

rowanc1 commented 5 years ago

Totally agree @dbrookes96, I am really excited about this element type!