Teester / entityshape

An api to compare a wikidata item with an entityschema
GNU General Public License v3.0
5 stars 3 forks source link

Fix bug where E438 won't evaluate correctly #39

Closed Teester closed 1 month ago

Teester commented 1 month ago

Necessity was calculated incorrectly when a shape had only 1 expression as there was no expressions key in the shape, just a single expression key. This takes that into account.

Also added a test for this issue

sonarcloud[bot] commented 1 month ago

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 90.17%. Comparing base (0d13754) to head (4b74794).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/Teester/entityshape/pull/39/graphs/tree.svg?width=650&height=150&src=pr&token=hYiDYYS8VA&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mark+Tully)](https://app.codecov.io/gh/Teester/entityshape/pull/39?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mark+Tully) ```diff @@ Coverage Diff @@ ## master #39 +/- ## ========================================== + Coverage 90.08% 90.17% +0.09% ========================================== Files 6 6 Lines 958 967 +9 ========================================== + Hits 863 872 +9 Misses 95 95 ``` | [Files](https://app.codecov.io/gh/Teester/entityshape/pull/39?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mark+Tully) | Coverage Δ | | |---|---|---| | [comparejsonld.py](https://app.codecov.io/gh/Teester/entityshape/pull/39?src=pr&el=tree&filepath=comparejsonld.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mark+Tully#diff-Y29tcGFyZWpzb25sZC5weQ==) | `96.53% <100.00%> (+0.07%)` | :arrow_up: | | [test\_schemas.py](https://app.codecov.io/gh/Teester/entityshape/pull/39?src=pr&el=tree&filepath=test_schemas.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mark+Tully#diff-dGVzdF9zY2hlbWFzLnB5) | `98.47% <100.00%> (+0.03%)` | :arrow_up: | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/Teester/entityshape/pull/39?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mark+Tully). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mark+Tully) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/Teester/entityshape/pull/39?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mark+Tully). Last update [0d13754...4b74794](https://app.codecov.io/gh/Teester/entityshape/pull/39?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mark+Tully). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mark+Tully).