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

feat: Register unit without updating config files #282

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

hpohekar
Copy link
Collaborator

@hpohekar hpohekar commented Jun 19, 2024

Register unit without updating yaml file.

    >>> from ansys.units import register_unit
    >>> register_unit(unit="Q", composition="N m", factor=1)
    >>> ureg = UnitRegistry()
    >>> ureg.Q
    _name: Q
    _dimensions: {'MASS': 1.0, 'LENGTH': 2.0, 'TIME': -2.0}
    _composition: N m
    _factor: 1
    _si_units: kg m^2 s^-2
    _si_scaling_factor: 1.0
    _si_offset: 0.0

@github-actions github-actions bot added testing Anything related to tests enhancement New features or code improvements labels Jun 19, 2024
@hpohekar hpohekar changed the title feat: Register unit feat: Register unit without updating config files Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features or code improvements testing Anything related to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant