Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/actions-89859d2685
Browse files Browse the repository at this point in the history
  • Loading branch information
hpohekar authored Aug 13, 2024
2 parents 9c82910 + 93b1f01 commit dcaced0
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:
cancel-in-progress: true

env:
MAIN_PYTHON_VERSION: '3.9'
MAIN_PYTHON_VERSION: '3.10'
DOCUMENTATION_CNAME: 'units.docs.pyansys.com'
LIBRARY_NAME: 'ansys-units'
LIBRARY_NAMESPACE: 'ansys.units'
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.9', '3.10', '3.11']
python-version: ['3.10', '3.11', '3.12']
steps:
- uses: ansys/actions/build-wheelhouse@v6.0
with:
Expand All @@ -76,7 +76,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.9', '3.10', '3.11']
python-version: ['3.10', '3.11', '3.12']
fail-fast: false
steps:
- uses: ansys/actions/tests-pytest@v6.0
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ To reach the project support team, email `pyansys.core@ansys.com <pyansys.core@a
Installation
------------

The ``ansys.units`` package supports Python 3.9 through Python 3.11 on Windows
The ``ansys.units`` package supports Python 3.10 through Python 3.12 on Windows
and Linux.


Expand Down
2 changes: 1 addition & 1 deletion doc/source/getting_started/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Installation
============

The ``ansys-units`` package supports Python 3.9 through Python 3.11 on Windows
The ``ansys-units`` package supports Python 3.10 through Python 3.12 on Windows
and Linux.

Install the package
Expand Down
8 changes: 4 additions & 4 deletions src/ansys/units/cfg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,11 @@ base_units:
si_offset: 273.15
F:
type: TEMPERATURE
si_scaling_factor: 0.55555555555
si_scaling_factor: 0.5555555555555555
si_offset: 459.67
R:
type: TEMPERATURE
si_scaling_factor: 0.55555555555
si_scaling_factor: 0.5555555555555555
si_offset: 0
delta_K:
type: TEMPERATURE_DIFFERENCE
Expand All @@ -184,11 +184,11 @@ base_units:
si_offset: 0
delta_F:
type: TEMPERATURE_DIFFERENCE
si_scaling_factor: 0.55555555555
si_scaling_factor: 0.5555555555555555
si_offset: 0
delta_R:
type: TEMPERATURE_DIFFERENCE
si_scaling_factor: 0.55555555555
si_scaling_factor: 0.5555555555555555
si_offset: 0

# Derived Units
Expand Down
10 changes: 9 additions & 1 deletion tests/test_quantity.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def test_temp_subtraction():

t5 = Quantity(10.0, "delta_F")
t6 = t5 - t4
assert t6 == Quantity(-25.60000000495262, "F")
assert t6 == Quantity(-25.600000000000023, "F")


def test_pow():
Expand Down Expand Up @@ -668,3 +668,11 @@ def test_error_messages():
def test_value_as_string():
with pytest.raises(TypeError):
q = Quantity("string", "m")


def test_C_to_F():
ureg = UnitRegistry()
five_c = Quantity(value=5.0, units=ureg.C)
converted = five_c.to(ureg.F)
assert converted.value == 41.0
assert converted.units._name == "F"

0 comments on commit dcaced0

Please sign in to comment.