poseidon-framework / poseidon-hs

A toolset to work with modular genotype databases in the Poseidon format
https://poseidon-framework.github.io/#/trident
MIT License
7 stars 2 forks source link

Added a newtype `JannoFile` for `[JannoRow]` #232

Closed nevrome closed 1 year ago

nevrome commented 1 year ago

Here's an implementation of the idea shared in #229

codecov-commenter commented 1 year ago

Codecov Report

Base: 70.96% // Head: 70.93% // Decreases project coverage by -0.03% :warning:

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

: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 @@ ## master #232 +/- ## ========================================== - Coverage 70.96% 70.93% -0.03% ========================================== Files 18 18 Lines 2211 2216 +5 Branches 245 245 ========================================== + Hits 1569 1572 +3 - Misses 397 399 +2 Partials 245 245 ``` | [Impacted Files](https://codecov.io/gh/poseidon-framework/poseidon-hs/pull/232?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=poseidon-framework) | Coverage Δ | | |---|---|---| | [src/Poseidon/CLI/Forge.hs](https://codecov.io/gh/poseidon-framework/poseidon-hs/pull/232?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=poseidon-framework#diff-c3JjL1Bvc2VpZG9uL0NMSS9Gb3JnZS5ocw==) | `61.60% <66.66%> (ø)` | | | [src/Poseidon/Janno.hs](https://codecov.io/gh/poseidon-framework/poseidon-hs/pull/232?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=poseidon-framework#diff-c3JjL1Bvc2VpZG9uL0phbm5vLmhz) | `82.09% <78.26%> (-0.23%)` | :arrow_down: | | [src/Poseidon/Package.hs](https://codecov.io/gh/poseidon-framework/poseidon-hs/pull/232?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=poseidon-framework#diff-c3JjL1Bvc2VpZG9uL1BhY2thZ2UuaHM=) | `74.67% <85.71%> (+0.06%)` | :arrow_up: | | [src/Poseidon/CLI/List.hs](https://codecov.io/gh/poseidon-framework/poseidon-hs/pull/232?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=poseidon-framework#diff-c3JjL1Bvc2VpZG9uL0NMSS9MaXN0Lmhz) | `80.88% <100.00%> (ø)` | | | [src/Poseidon/CLI/Summarise.hs](https://codecov.io/gh/poseidon-framework/poseidon-hs/pull/232?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=poseidon-framework#diff-c3JjL1Bvc2VpZG9uL0NMSS9TdW1tYXJpc2UuaHM=) | `67.74% <100.00%> (ø)` | | | [src/Poseidon/CLI/Survey.hs](https://codecov.io/gh/poseidon-framework/poseidon-hs/pull/232?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=poseidon-framework#diff-c3JjL1Bvc2VpZG9uL0NMSS9TdXJ2ZXkuaHM=) | `90.21% <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=poseidon-framework). 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=poseidon-framework)

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

nevrome commented 1 year ago

Right - my biggest concern is that JannoFile doesn't really capture the meaning. It's just an arbitrary list of JannoRows. I considered naming it JannoSet, but a set has no order. JannoList is already in use. Do you have a suggestion?

I replaced all instances of [JannoRow] to make sure that it becomes harder to accidentally run into the issue I describe in #229. But I understand that it looks a bit weird at times, not least because of the type name.

stschiff commented 1 year ago

Yes, the name isn't perfect. You could have used JannoMonoid, but that's not a name you want everywhere. What about JannoRows?

nevrome commented 1 year ago

JannoRows is simple and clear. I love it. Will use that. Thanks!