Skip to content

Commit

Permalink
Merge pull request #439 from rartino/additions-to-property-definitions
Browse files Browse the repository at this point in the history
Property definitions adjustment + inclusion of GNU Units definitions.units
  • Loading branch information
rartino authored Dec 22, 2022
2 parents 4dd13b5 + 5cf103f commit f330d40
Show file tree
Hide file tree
Showing 6 changed files with 8,982 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
exclude: &exclude_files >
(?x)^(
tests/inputs/various-whitespace.filter|
tests/inputs/fuzzystring-leading-trailing-spaces.filter
tests/inputs/fuzzystring-leading-trailing-spaces.filter|
units/definitions.units
)$

- repo: https://github.com/Lucas-C/pre-commit-hooks
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,22 @@ The [develop branch of the repository](https://github.com/Materials-Consortia/OP
API and client implementations are encouraged to support the latest release or pre-release of the specification.
If this is a pre-release, implementations are also encouraged to support the latest stable release.

## Licensing of the unit definitions database `definition.units`

The OPTIMADE standard refers to a specific version of the `definition.units` database included with the source distribution of GNU Units.
This file is included in the OPTIMADE repository under the subdirectory [units](units).
The file is licensed separately from other files in the repository: it is available under the GNU General Public License (GPL).
Full information on how the file is licensed is available in the [header of the file](units/definitions.units) and the license file included in that directory, [COPYING](units/COPYING).

The following does not constitute legal advice; however, we believe implementations under other licenses can use this file if:

- The file is distributed separated from other source files in a way that makes it clear that it is part of the GNU Units software and is licensed under the GPL.
(For example, as done in this repository: in a separate subdirectory with its own readme and license files.)

- The software reads the file during program execution, e.g., at startup (as opposed to, e.g., having the file compiled or linked into a binary program distributed to end users).

Alternatively, the software using the file could itself be licensed in a way compatible with the GNU GPL.

## How to cite

If you use OPTIMADE to access or host data, we kindly ask that you cite our paper:
Expand Down
10 changes: 9 additions & 1 deletion optimade.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1810,6 +1810,14 @@ A Property Definition MUST be composed according to the combination of the requi

**REQUIRED keys:**

- :field:`property-format`: String.
Specifies the minor version of the property definition format used.
The string MUST be of the format "MAJOR.MINOR", referring to the version of the OPTIMADE standard that describes the format in which this property definition is expressed.
The version number string MUST NOT be prefixed by, e.g., "v".
In implementations of the present version of the standard, the value MUST be exactly :field-val:`1.2`.
A client MUST disregard the property definition if the field is not a string of the format MAJOR.MINOR or if the MAJOR version number is unrecognized.
This field allows future versions of this standard to support implementations keeping definitions that adhere to older versions of the property definition format.

- :field:`property-uri`: String.
A static URI identifier that is a URN or URL representing the specific version of the property.
It SHOULD NOT be changed as long as the property definition remains the same, and SHOULD be changed when the property definition changes.
Expand Down Expand Up @@ -2082,7 +2090,7 @@ The physical unit of a property, the embedded items of a list, or values of a di
- If the property refers to a physical quantity that is dimensionless (often also referred to as having the dimension 1) or refers to a dimensionless count of something (e.g., the number of protons in a nucleus) the field MUST have the value :val:`dimensionless`.
- If the property refers to an entity for which the assignment of a unit would not make sense, e.g., a string representing a chemical formula or a serial number the field MUST have the value :val:`inapplicable`.

A standard set of unit symbols for OPTIMADE is taken from version 3.09 of the (separately versioned) unit database :val:`definition.units` included with the `source distribution <http://ftp.gnu.org/gnu/units/>`__ of `GNU Units <https://www.gnu.org/software/units/>`__ version 2.21.
A standard set of unit symbols for OPTIMADE is taken from version 3.15 of the (separately versioned) unit database :val:`definition.units` included with the `source distribution <http://ftp.gnu.org/gnu/units/>`__ of `GNU Units <https://www.gnu.org/software/units/>`__ version 2.22.
If the unit is available in this database, or if it can be expressed as a compound unit expression using these units, the value of :field:`x-optimade-unit` SHOULD use the corresponding (compound) string symbol and a corresponding definition referring to the same symbol be given in the field :field:`standard`.

A compound unit expression based on the GNU Units symbols is created by a sequence of unit symbols separated by a single multiplication :val:`*` symbol.
Expand Down
Loading

0 comments on commit f330d40

Please sign in to comment.