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

Refactor units #312

Merged
merged 10 commits into from
Aug 8, 2024
Merged

Refactor units #312

merged 10 commits into from
Aug 8, 2024

Conversation

jesper-friis
Copy link
Contributor

@jesper-friis jesper-friis commented Aug 8, 2024

Refactor and update the unit modules to the following structure:

  • Modules for categorising units:

    • sidimensionalunits: A module with classes categorising units according to their SI physical dimensions.
  • Modules with SI units:

    • siunits: The 7 base units and 22 derived units as well as the metric prefixes specified in the SI system.
    • prefixedsiunits: SI units made of a metric prefix and a SI base, derived or accepted unit. Examples: km, mg...
    • coherentsiunits: Coherent SI-units. Products of integer powers of the base and derived SI units. Examples: A/J, Nm, m³, ...
    • noncoherentsiunits: Non-coherent SI-units whos numerical factor in front of the product of base SI units is NOT equal to one. This include all SI-units not included in the modules above. Examples: g, mg/s...
  • Modules with non-SI units:

    • siacceptedunits: The 15 non-SI units that are accepted for use with SI.
    • siacceptedderivedunits: Non-SI units that consists an optional metric prefix followed by a product of integer powers of the base, derived and accepted SI units. The product must include at least one SI-accepted unit. Examples: km/h, kWh, MeV, etc...
    • specialunits: Non-SI special units. Examples: Day, Week, Bar, Inch, ...
    • otherunits: All other non-SI units that does not belong to any of the modules above.
  • Additional modules:

    • unclassifiedunits: Units copied from QUDT that has not yet been classified in one of the above modules.
    • deprecated: Units classes that have been deprecated - typically because of change of IRI.

Make the prefixed unit classes independent of SI to avoid inconsistencies for non-SI units with a metric prefix like kBar.

@jesper-friis jesper-friis changed the base branch from master to 1.0.0-rc1 August 8, 2024 22:04
@jesper-friis jesper-friis merged commit 8697af8 into 1.0.0-rc1 Aug 8, 2024
2 checks passed
@jesper-friis jesper-friis deleted the refactor-units branch August 8, 2024 22:12
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.

1 participant