Skip to content

Allow users to add custom units #58

@rju

Description

@rju

Wee are developing multiple special languages (domain-specific languages (DSLs)) for configuration, bio-geo-chemical models and testing for model code which use mostly SI units, but in certain areas also use other custom units. These DSLs use therefore units to ensure safety and perform necessary unit conversions if necessary. When moving from the early prototypes in Java to Python, as this language is more widely used in science, we came across your cf_units library which almost fits our purpose. The only missing part are custom units. You already added ppm and dB yourself. However, we want to be able to add arbitrary units to the system.

To test whether this is possible, we already created a fork over at Codeberg and could contribute it to your code base. If it is sufficient in quality as a contribution.

https://codeberg.org/prefec2/cfunits/src/branch/add-special-units

In our example we also added a small script to showcase the usage called cf_test.py

Sorry for not using the correct template for feature requests. I could not find them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions