Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated emmocheck to ahead to latest formulation of units #809

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

jesper-friis
Copy link
Collaborator

@jesper-friis jesper-friis commented Nov 24, 2024

Description

Updated emmocheck to ahead to latest formulation of units

Note: this PR is already in use when testing the development version of EMMO. When merging this PR, please update the pip install EMMOntoPy statement in https://github.com/emmo-repo/EMMO/blob/master/.github/workflows/ci_emmocheck.yml

Type of change

  • Bug fix.
  • New feature.
  • Documentation update.
  • Test update.

Checklist

This checklist can be used as a help for the reviewer.

  • Is the code easy to read and understand?
  • Are comments for humans to read, not computers to disregard?
  • Does a new feature has an accompanying new test (in the CI or unit testing schemes)?
  • Has the documentation been updated as necessary?
  • Does this close the issue?
  • Is the change limited to the issue?
  • Are errors handled for all outcomes?
  • Does the new feature provide new restrictions on dependencies, and if so is this documented?

Comments

Copy link

codecov bot commented Nov 24, 2024

Codecov Report

Attention: Patch coverage is 40.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 72.72%. Comparing base (de542a3) to head (8ea482c).

Files with missing lines Patch % Lines
emmopy/emmocheck.py 40.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #809      +/-   ##
==========================================
- Coverage   72.90%   72.72%   -0.18%     
==========================================
  Files          18       18              
  Lines        3790     3799       +9     
==========================================
  Hits         2763     2763              
- Misses       1027     1036       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -500,7 +508,7 @@ def test_quantity_dimension(self):
issubclass(cls, self.onto.ISQDimensionlessQuantity)
)

def test_dimensional_unit(self):
def test_dimensional_unit_rc2(self):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we have two tests? Shuold we not just stick to one?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because EMMO changed since 1.0.0-rc2.

test_dimensional_unit() works for current version of EMMO.
test_dimensional_unit_rc2() works for previous version of EMMO.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I only had updated the test to the latest version of EMMO without keeping a copy for the earlier version, you would probably not have commented on it. This is how most development handle changes in their dependencies. If you use an old version of EMMO, you simply test it with an older version of EMMOntoPy.

To make the latest version of EMMOntoPy handle multiple versions of EMMO, it is not sufficient to rename the tests differently, we need a whole new formalisation to (preferably in a declarative way) specify what versions of EMMO each test is valid for. I added issue #821 for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants