biosimulators / Biosimulators_utils

Utilities for building standardized command-line interfaces for biosimulation software packages
https://docs.biosimulators.org/Biosimulators_utils
MIT License
4 stars 6 forks source link

feat: allow unary subtraction operator in SEDML validation #139

Closed jcschaff closed 1 year ago

jcschaff commented 1 year ago

What new features does this PR implement? While validating SEDML documents, the evalidate library is used to check mathematical expressions used in a SEDML document (e.g. within FunctionalRange math). This validation does not permit use of the unary subtract operator which is common and safe. This maps to the Python AST as 'USub'.

What bugs does this PR fix? This fixes the validation of several Virtual Cell models which use the unary subtract within its math. The SEDML validation encounters the use of unary subtract operator and raises a validation failure (a false-negative result).

Does this PR introduce any additional changes? No.

How have you tested this PR? added a test in test_sedml_math.py which exercises this operator.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (ac14afd) 95.79% compared to head (7abf57a) 95.79%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #139 +/- ## ======================================= Coverage 95.79% 95.79% ======================================= Files 88 88 Lines 9399 9399 ======================================= Hits 9004 9004 Misses 395 395 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `95.79% <100.00%> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biosimulators#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://app.codecov.io/gh/biosimulators/Biosimulators_utils/pull/139?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biosimulators) | Coverage Δ | | |---|---|---| | [biosimulators\_utils/sedml/math.py](https://app.codecov.io/gh/biosimulators/Biosimulators_utils/pull/139?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biosimulators#diff-Ymlvc2ltdWxhdG9yc191dGlscy9zZWRtbC9tYXRoLnB5) | `100.00% <ø> (ø)` | | | [biosimulators\_utils/\_version.py](https://app.codecov.io/gh/biosimulators/Biosimulators_utils/pull/139?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biosimulators#diff-Ymlvc2ltdWxhdG9yc191dGlscy9fdmVyc2lvbi5weQ==) | `100.00% <100.00%> (ø)` | |

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

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

jcschaff commented 1 year ago

updated software version to 0.1.178 in _version.py prior to merge so that it can be released and pushed to PyPI.