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

Feature/issue 782 simplify units. Fixes #782. #784

Closed
wants to merge 18 commits into from

Conversation

uscholdm
Copy link
Contributor

@uscholdm uscholdm commented Dec 14, 2022

Made a bunch of changes to simplify and clean up things as described in #782 . Main changes are:

  • UnitOfMeasure is now a subclass of Magnitude
  • No more product or ratio or simple units

This is ready for a preliminary review to get early feedback and catch any mistakes.

STILL TO DO:

  • release notes
  • examples

Details

  • StandardUnit

    • Renamed CoherentUnit to StandardUnit (Coherent Unit is an altLabel)
    • Defined StandardUnit to be equivalent to a UnitOfMeasure that
      • has conversion=1
      • has itself as a standard unit
    • Added a scopeNote indicating that this captures the idea of dimension
    • New standard units
      • Add square meter as the standard AreaUnit
      • Add cubic meter as the standard VolumeUnit .
  • UnitOfMeasure

    • Defined UnitOfMeasure to be equivalent to a Magnitude that:
      • has numericValue =1 (it's not called 'unit' for nothing)
      • has itself at its unit of measure
      • has conversion=1
      • has a standard unit
    • Removed UnitOfMeasure from disjoints where incorrect or redundant
    • Moved an annotation about units from Magnitude to a better home: UnitOfMeasure
    • Removed and deprecated SimpleUnitOfMeasure
    • Removed redundant typing of BaseUnits, can be inferred from enumeration.
    • Properties
      • Made hasStandardUnit functional
      • Removed and deprecated hasBaseUnit. Use hasStandardUnit instead
  • Removed product and ratio units and magnitudes

    • Removed: ProductUnit, CoherentProductUnit, ProductMagnitude
    • Removed: RatioUnit, CoherentRatioUnit, RatioMagnitude
    • Removed uses and mentions of product and ratio unit and magnitude classes and updated definitions and annotations accordingly.
    • Percentage was redefined because it had been a subclass of RatioMagnitude which was defined in terms of RationUnit. The old definitions were inserted as blank nodes to retain same formal meaning.
  • Aspect

    • Made Aspect not a subclass of Category. Aspects such as like length, or inner diameter or cycle time do not exist for the purpose of categorizing things.
    • Made Aspect a subclass of SchemaMetaData. An aspect is a representation of a property connecting two things. It has roughly the same meaning as an OWL property.
  • Magnitude

    • Fixed erroneous definition of Magnitude
    • Added examples for Magnitude
    • Renamed Extent to Distance for naming consistency.
    • Renamed MolarQuantity to MoleQuantity for naming consistency.
    • Renamed CountingUnit to CountUnit for naming consistency.
    • Added scopeNote to hasPrecision to say the precision of a Magnitude must have the same StandardUnit as the Magnitude.

…bel)

- Define StandardUnit to be equivalent to a UnitOfMeasure that
  - has conversion=1
  - has itself as a standard unit
  - has a scopeNote indicating that this captures the idea of dimension
- UnitOfMeasure
  -  make equivalent to a Magnitude that
    - has numericValue =1 (it's not called 'unit' for nothing)
    - has itself at its unit of measure
    - has conversion=1
    - has a standard unit
  - remove unit of measure from disjoints where incorrect or redundant
  - Remove: ProductUnit, CoherentProductUnit, ProductMagnitude
  - REmove: RatioUnit, CoherentRatioUnit, RatioMagnitude

- Aspect
  - Make Aspect a not a subclass of Category.  Aspects such as like length, or inner diameter or cycle time do not exist for the purpose of categorizing things.
  - Make Aspect a subclass of SchemaMetaData. An aspect is a representation of a property connecting two things. It has roughly the same meaning as an OWL property.

-  Add scopeNote to hasPrecision to say the precision of a Magnitude must have the same StandardUnit as the Magnitude.
…itOfMeasure

- Removed uses and mentions of product and ratio unit and magnitude classes and update definitions and annotations accordingly.
- Percentage was redefined because it had been a subclass of RatioMagnitude which was defined in terms of RationUnit. The old definitions are inserted as blank nodes to retain same formal meaning.
- Fixed an erroneous definition of Magnitude and added examples
…ume units respectively.

FIxed bug - was using wrong conversion predicate.
@uscholdm uscholdm marked this pull request as draft December 14, 2022 22:10
@rjyounes rjyounes changed the title Feature/issue 782 simplify units Feature/issue 782 simplify units. Fixes #782. Feb 9, 2023
@rjyounes
Copy link
Collaborator

rjyounes commented May 2, 2023

@uscholdm Closing this PR. Keeping the branch to retain the modifications, but it will be addressed in the general units and magnitudes overhaul.

@rjyounes rjyounes closed this May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants