c-proof / pyglider

glider software
https://pyglider.readthedocs.io/
Apache License 2.0
17 stars 24 forks source link

raise error if no valid timebase specified #139

Closed callumrollo closed 1 year ago

callumrollo commented 1 year ago

alternative solution to #137. Forces user to specify a timebase

codecov[bot] commented 1 year ago

Codecov Report

Base: 77.49% // Head: 78.31% // Increases project coverage by +0.81% :tada:

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

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #139 +/- ## ========================================== + Coverage 77.49% 78.31% +0.81% ========================================== Files 7 7 Lines 1271 1282 +11 ========================================== + Hits 985 1004 +19 + Misses 286 278 -8 ``` | [Impacted Files](https://codecov.io/gh/c-proof/pyglider/pull/139?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=c-proof) | Coverage Δ | | |---|---|---| | [pyglider/seaexplorer.py](https://codecov.io/gh/c-proof/pyglider/pull/139/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=c-proof#diff-cHlnbGlkZXIvc2VhZXhwbG9yZXIucHk=) | `81.45% <100.00%> (+2.52%)` | :arrow_up: | | [tests/test\_seaexplorer.py](https://codecov.io/gh/c-proof/pyglider/pull/139/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=c-proof#diff-dGVzdHMvdGVzdF9zZWFleHBsb3Jlci5weQ==) | `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=c-proof). 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=c-proof)

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

callumrollo commented 1 year ago

This commit adds tests for a timebase that doesn't match any of the variables and for if the timebase has been dropped from the yaml. In both cases, we check the error string for the expected error message.

callumrollo commented 1 year ago

@jklymak is this ready to merge with the added test?

jklymak commented 1 year ago

Note I think that we should force timebase for slocums as well.