-
Notifications
You must be signed in to change notification settings - Fork 2
feat: Configure angle as dimension #309
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
Changes from 21 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
4d4b86a
feat: Remove angle as dimension
hpohekar 9556b7d
feat: Remove angle as dimension 1
hpohekar 1362d5b
feat: Support Python 3.13
hpohekar 4a46495
feat: example fix
hpohekar bb3c1bf
feat: configure angle
hpohekar a1a3c22
feat: configure angle 1
hpohekar e8a2730
feat: test update 1
hpohekar 36783df
feat: test update 2
hpohekar 05cd020
feat: test update 3
hpohekar 751ec36
feat: test update 4
hpohekar da3fe17
feat: test update 5
hpohekar 8f75f05
feat: test update 6
hpohekar fb4cb48
feat: test update 7
hpohekar 30f20fe
feat: test update 8
hpohekar 1204aab
feat: test update 9
hpohekar b83d182
feat: test update 10
hpohekar 63af28b
feat: test update 11
hpohekar 36ba7c4
feat: test update 12
hpohekar fd1315a
feat: test update 13
hpohekar 10b02fa
feat: test update 14
hpohekar 7cb8044
feat: test update 15
hpohekar 5ce4abe
feat: test update 16
hpohekar f289311
feat: test update 17
hpohekar 7d086d0
feat: test update 18
hpohekar 6bb2819
feat: Contributors
hpohekar 8ab140e
feat: refactoring 1
hpohekar 51e988d
feat: refactoring 2
hpohekar 54952f0
feat: refactoring 3
hpohekar 72b68bb
feat: refactoring 4
hpohekar 2e253cf
feat: refactoring 5
hpohekar 0247775
feat: refactoring 6
hpohekar a3a00c1
feat: refactoring 7
hpohekar 50e3c94
feat: refactoring 8
hpohekar 9b8b6a0
feat: test fix 1
hpohekar 9166bbd
feat: test fix 2
hpohekar fb31f20
feat: test fix 3
hpohekar d398625
remove maintenance changes
hpohekar 0135640
Merge branch 'main' into feat/configure_angles_as_dimensions
hpohekar 28a61cf
add more tests
hpohekar 79060b3
Merge branch 'feat/configure_angles_as_dimensions' of https://github.…
hpohekar 907c371
update license
hpohekar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -56,4 +56,4 @@ repos: | |
| hooks: | ||
| - id: add-license-headers | ||
| args: | ||
| - --start_year=2023 | ||
| - --start_year=2024 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -69,7 +69,7 @@ To reach the project support team, email `[email protected] <pyansys.core@a | |
| Installation | ||
| ------------ | ||
|
|
||
| The ``ansys.units`` package supports Python 3.10 through Python 3.12 on Windows | ||
| The ``ansys.units`` package supports Python 3.10 through Python 3.13 on Windows | ||
| and Linux. | ||
|
|
||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates. | ||
| # SPDX-License-Identifier: MIT | ||
| # | ||
| # | ||
| # Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| # of this software and associated documentation files (the "Software"), to deal | ||
| # in the Software without restriction, including without limitation the rights | ||
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| # copies of the Software, and to permit persons to whom the Software is | ||
| # furnished to do so, subject to the following conditions: | ||
| # | ||
| # The above copyright notice and this permission notice shall be included in all | ||
| # copies or substantial portions of the Software. | ||
| # | ||
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| # SOFTWARE. | ||
|
|
||
| import ansys.units as pyunits | ||
|
|
||
|
|
||
| def test_degree_addition(): | ||
| degree = pyunits.Quantity(1.0, "degree") | ||
| assert not degree.dimensions | ||
| assert degree.is_dimensionless | ||
| assert degree + 1 == pyunits.Quantity(58.29577951308232, "degree") | ||
|
|
||
|
|
||
| def test_radian_addition(): | ||
| radian = pyunits.Quantity(1.0, "radian") | ||
| assert not radian.dimensions | ||
| assert radian.is_dimensionless | ||
| assert radian + 1 == pyunits.Quantity(2.0, "radian") | ||
| assert (radian + 1).to("degree") == pyunits.Quantity(114.59155902616465, "degree") | ||
|
|
||
|
|
||
| def test_unit_system_repr(): | ||
| us = pyunits.UnitSystem() | ||
| us_dict = """MASS: kg | ||
| LENGTH: m | ||
| TIME: s | ||
| TEMPERATURE: K | ||
| TEMPERATURE_DIFFERENCE: delta_K | ||
| CHEMICAL_AMOUNT: mol | ||
| LIGHT: cd | ||
| CURRENT: A | ||
| """ | ||
|
|
||
| assert repr(us) == str(us_dict) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.