simularium / simulariumio

Python package that converts simulation outputs to the format consumed by the Simularium viewer website
Apache License 2.0
5 stars 3 forks source link

Jagged list for agent data #140

Closed ascibisz closed 1 year ago

ascibisz commented 1 year ago

Problem

It'd be nice if a user with custom data could provide jagged lists to AgentData instead of only numpy arrays Link to ticket

Solution

Added AgentData.from_lists(), which takes in a dict of agent data including potentially jagged lists and returns an AgentData object. I also added a few tests for this new functionality.

Type of change

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 96.96% and project coverage change: +0.08 :tada:

Comparison is base (eafb92e) 91.74% compared to head (9863a5b) 91.83%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #140 +/- ## ========================================== + Coverage 91.74% 91.83% +0.08% ========================================== Files 100 101 +1 Lines 4205 4287 +82 ========================================== + Hits 3858 3937 +79 - Misses 347 350 +3 ``` | [Impacted Files](https://codecov.io/gh/simularium/simulariumio/pull/140?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [simulariumio/data\_objects/agent\_data.py](https://codecov.io/gh/simularium/simulariumio/pull/140?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c2ltdWxhcml1bWlvL2RhdGFfb2JqZWN0cy9hZ2VudF9kYXRhLnB5) | `89.23% <95.00%> (+0.75%)` | :arrow_up: | | [simulariumio/tests/test\_agents\_from\_lists.py](https://codecov.io/gh/simularium/simulariumio/pull/140?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c2ltdWxhcml1bWlvL3Rlc3RzL3Rlc3RfYWdlbnRzX2Zyb21fbGlzdHMucHk=) | `100.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.