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

Merged
merged 19 commits into from
Feb 4, 2025

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 18.75000% with 26 lines in your changes missing coverage. Please review.

Project coverage is 72.45%. Comparing base (a64ffe3) to head (ed28f35).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
emmopy/emmocheck.py 18.75% 26 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #809      +/-   ##
==========================================
- Coverage   72.99%   72.45%   -0.54%     
==========================================
  Files          18       18              
  Lines        3814     3845      +31     
==========================================
+ Hits         2784     2786       +2     
- Misses       1030     1059      +29     

☔ 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

@jesper-friis jesper-friis Dec 13, 2024

Choose a reason for hiding this comment

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

The common way for software to handle changes in their dependencies is to keep the latest version in sync with the latest version of the dependencies. That is why test_dimensional_unit() is updated to the latest version of EMMO. In addition we kept a renamed copy of the test that works with EMMO up to 1.0.0-rc2.

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.

@jesper-friis jesper-friis merged commit 9a69c93 into master Feb 4, 2025
10 of 12 checks passed
@jesper-friis jesper-friis deleted the update-emmocheck2 branch February 4, 2025 08:50
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