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

Rewrite Trajectory Converter Tests #119

Closed ascibisz closed 1 year ago

ascibisz commented 2 years ago

Problem

The trajectory converter tests test huge chunks of data, which makes it difficult to identify what's going on when on e fails. Ticket #98

Solution

What I did to solve this problem

Change summary:

Note: my linear algebra knowledge is limited, so please look closer at test_mcell_converter because I tried to write tests to test the functionality of McellConverter._get_euler_angles() and some other related functions and they pass, but I certainly could be doing something naive that isn't actually testing sufficiently.

codecov-commenter commented 2 years ago

Codecov Report

Base: 90.56% // Head: 91.74% // Increases project coverage by +1.17% :tada:

Coverage data is based on head (d255180) compared to base (b303ede). Patch coverage: 99.80% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #119 +/- ## ========================================== + Coverage 90.56% 91.74% +1.17% ========================================== Files 97 97 Lines 3531 3996 +465 ========================================== + Hits 3198 3666 +468 + Misses 333 330 -3 ``` | [Impacted Files](https://codecov.io/gh/simularium/simulariumio/pull/119?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [...iumio/tests/converters/test\_physicell\_converter.py](https://codecov.io/gh/simularium/simulariumio/pull/119/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c2ltdWxhcml1bWlvL3Rlc3RzL2NvbnZlcnRlcnMvdGVzdF9waHlzaWNlbGxfY29udmVydGVyLnB5) | `96.66% <98.11%> (-3.34%)` | :arrow_down: | | [simulariumio/md/md\_converter.py](https://codecov.io/gh/simularium/simulariumio/pull/119/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c2ltdWxhcml1bWlvL21kL21kX2NvbnZlcnRlci5weQ==) | `95.87% <100.00%> (+7.21%)` | :arrow_up: | | [simulariumio/readdy/readdy\_converter.py](https://codecov.io/gh/simularium/simulariumio/pull/119/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c2ltdWxhcml1bWlvL3JlYWRkeS9yZWFkZHlfY29udmVydGVyLnB5) | `100.00% <100.00%> (+2.04%)` | :arrow_up: | | [simulariumio/tests/conftest.py](https://codecov.io/gh/simularium/simulariumio/pull/119/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c2ltdWxhcml1bWlvL3Rlc3RzL2NvbmZ0ZXN0LnB5) | `100.00% <100.00%> (ø)` | | | [...ariumio/tests/converters/test\_cytosim\_converter.py](https://codecov.io/gh/simularium/simulariumio/pull/119/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c2ltdWxhcml1bWlvL3Rlc3RzL2NvbnZlcnRlcnMvdGVzdF9jeXRvc2ltX2NvbnZlcnRlci5weQ==) | `100.00% <100.00%> (ø)` | | | [...ulariumio/tests/converters/test\_mcell\_converter.py](https://codecov.io/gh/simularium/simulariumio/pull/119/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c2ltdWxhcml1bWlvL3Rlc3RzL2NvbnZlcnRlcnMvdGVzdF9tY2VsbF9jb252ZXJ0ZXIucHk=) | `100.00% <100.00%> (ø)` | | | [simulariumio/tests/converters/test\_md\_converter.py](https://codecov.io/gh/simularium/simulariumio/pull/119/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c2ltdWxhcml1bWlvL3Rlc3RzL2NvbnZlcnRlcnMvdGVzdF9tZF9jb252ZXJ0ZXIucHk=) | `100.00% <100.00%> (ø)` | | | [...lariumio/tests/converters/test\_medyan\_converter.py](https://codecov.io/gh/simularium/simulariumio/pull/119/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c2ltdWxhcml1bWlvL3Rlc3RzL2NvbnZlcnRlcnMvdGVzdF9tZWR5YW5fY29udmVydGVyLnB5) | `100.00% <100.00%> (ø)` | | | [...lariumio/tests/converters/test\_readdy\_converter.py](https://codecov.io/gh/simularium/simulariumio/pull/119/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c2ltdWxhcml1bWlvL3Rlc3RzL2NvbnZlcnRlcnMvdGVzdF9yZWFkZHlfY29udmVydGVyLnB5) | `100.00% <100.00%> (ø)` | | | [...ariumio/tests/converters/test\_smoldyn\_converter.py](https://codecov.io/gh/simularium/simulariumio/pull/119/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c2ltdWxhcml1bWlvL3Rlc3RzL2NvbnZlcnRlcnMvdGVzdF9zbW9sZHluX2NvbnZlcnRlci5weQ==) | `100.00% <100.00%> (ø)` | | | ... and [10 more](https://codecov.io/gh/simularium/simulariumio/pull/119/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | | 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 at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.