Skip to content

Quantity (RealwithUnit) unit converter using pint module #734

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

Merged
merged 21 commits into from
Sep 26, 2022

Conversation

hpohekar
Copy link
Collaborator

@hpohekar hpohekar commented Aug 18, 2022

Source code - quantity.py
Test cases - test_quantity.py
Pint is added in install requirements in setup.py

RealWithUnits class is renamed to Quantity.

Description of unit names and symbol is available on following link -
https://github.com/hgrecco/pint/blob/master/pint/default_en.txt

Pint module documentation is available on following link -
https://pint.readthedocs.io/en/0.19/index.html

@hpohekar hpohekar linked an issue Aug 18, 2022 that may be closed by this pull request
@seanpearsonuk
Copy link
Collaborator

@mkundu1 tests are failing in both @hpohekar and @prmukherj 's PR.

Running API codegen
Unable to find image 'ghcr.io/pyansys/pyfluent:latest' locally
latest: Pulling from pyansys/pyfluent
Digest: sha256:fd0fd01135e7b19e471990f5dbaf173ed11a8453bb0af301d7f0286bff48d5ca
Status: Downloaded newer image for ghcr.io/pyansys/pyfluent:latest
89795f6c0debabd55a3a5ae8af8b59073c03874db39d19006242adf0636d84bb
503253dc9983c5f259cdc870566ecc8a54a3baf9b0cc9ecc655efea33031bac5
Traceback (most recent call last):
File "/home/runner/work/pyfluent/pyfluent/codegen/allapigen.py", line 8, in
tuigen.generate()
File "/home/runner/work/pyfluent/pyfluent/codegen/tuigen.py", line 345, in generate
TUIGenerator(meshing=True).generate()
File "/home/runner/work/pyfluent/pyfluent/codegen/tuigen.py", line 313, in generate
info = PyMenu(self._service, self._main_menu.path).get_static_info()
File "/home/runner/work/pyfluent/pyfluent/src/ansys/fluent/core/services/datamodel_tui.py", line 216, in get_static_info
response = self._service.get_static_info(request)
File "/home/runner/work/pyfluent/pyfluent/src/ansys/fluent/core/services/error_handler.py", line 15, in func
raise RuntimeError(ex.details()) from None
RuntimeError
make: *** [Makefile:30: api-codegen] Error 1
Error: Process completed with exit code 2.

Laurence has posted new docker images.

@hpohekar hpohekar force-pushed the feat/quantity_unit_converter branch 2 times, most recently from 77a2447 to bb324b2 Compare August 23, 2022 04:53
@hpohekar hpohekar force-pushed the feat/quantity_unit_converter branch from bb324b2 to aa6bbf1 Compare August 23, 2022 09:09
@hpohekar hpohekar force-pushed the feat/quantity_unit_converter branch from aa6bbf1 to 538f36c Compare August 23, 2022 12:14
@seanpearsonuk
Copy link
Collaborator

@hpohekar you can merge this now if you're ready

@hpohekar
Copy link
Collaborator Author

hpohekar commented Sep 6, 2022

@hpohekar you can merge this now if you're ready

The c++ side unit conversion testing is not completed yet.

@hpohekar hpohekar marked this pull request as ready for review September 26, 2022 07:12
@hpohekar hpohekar merged commit e4146ab into main Sep 26, 2022
@hpohekar hpohekar deleted the feat/quantity_unit_converter branch September 26, 2022 07:14
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.

Proposal for units support for real entries
4 participants