Skip to content

Commit b6b8072

Browse files
chore: Use units release >= 0.7.0 (#4296)
This pull request includes updates to the dependency on `ansys-units`, documentation, and new test coverage for physical quantities. The most important changes involve updating the `ansys-units` version to ensure compatibility and adding a new test to validate quantity dimensions. ### Dependency Updates: * Updated the `ansys-units` dependency in `pyproject.toml` to require version `>=0.7.0,<1.0` instead of `>=0.6.dev1,<1.0`. This ensures compatibility with the latest stable release. ### Documentation Changes: * Updated the changelog to reflect the requirement for `ansys-units` version `>=0.8.dev0`. ### Test Additions: * Added a new test, `test_quantity_dimensions_subscription`, in `tests/test_physical_quantities.py` to validate the dimensions of the `VELOCITY` variable from the `VariableCatalog`. This ensures correctness in handling physical quantity dimensions. --------- Co-authored-by: pyansys-ci-bot <[email protected]>
1 parent 829684a commit b6b8072

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Use units release >= 0.7.0

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ dependencies = [
2121
"ansys-api-fluent>=0.3.36",
2222
"ansys-platform-instancemanagement~=1.1",
2323
"ansys-tools-filetransfer>=0.1,<0.3",
24-
"ansys-units>=0.6.dev1,<1.0",
24+
"ansys-units>=0.7.0,<1.0",
2525
"defusedxml>=0.7.1",
2626
"deprecated>=1.2.18",
2727
"docker>=7.1.0",

tests/test_physical_quantities.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,3 +177,12 @@ def test_use_variable_catalog_offline():
177177
assert vector_data_symmetry.shape == (2018, 3)
178178
assert round(vector_data_symmetry[1009][0], 5) == 0.0023
179179
assert round(vector_data_symmetry[1009][1], 5) == 1.22311
180+
181+
182+
def test_quantity_dimensions_subscription():
183+
from ansys.units.variable_descriptor import VariableCatalog as vc
184+
185+
vel = vc.VELOCITY
186+
assert vel.name == "velocity"
187+
assert vel.dimension["TIME"] == -1.0
188+
assert vel.dimension["LENGTH"] == 1.0

0 commit comments

Comments
 (0)