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

use pyansys-units instead of pint #706

Open
kmahajan-cadfem opened this issue Sep 8, 2023 · 5 comments
Open

use pyansys-units instead of pint #706

kmahajan-cadfem opened this issue Sep 8, 2023 · 5 comments
Assignees
Labels
enhancement New features or code improvements

Comments

@kmahajan-cadfem
Copy link
Contributor

📝 Description of the feature

  • pyansys-units is trying to simplify the unit usage in pyansys libraries
  • it would be better to use it instead of pint

💡 Steps for implementing the feature

  • implement same class in current units file with appropriate class using pyansys-units
  • check all other reference to pint and replace them
  • remove pint as dependency

🔗 Useful links and references

No response

@kmahajan-cadfem kmahajan-cadfem added the enhancement New features or code improvements label Sep 8, 2023
@RobPasMue
Copy link
Member

RobPasMue commented Sep 9, 2023

Hi @kmahajan-cadfem ! Thanks for opening this issue.

We will definitely consider switching to our in-house units package as soon as we can. As you may understand, the development of this Python package (i.e. ansys-geometry-core or PyAnsys Geometry, as you prefer to call it) started earlier than the pyansys-units project, and Pint served our needs at the time.

Sticking with Pint would also make sense since it is an extensively used open-source Python library. Thus the decision is not trivial - but we will definitely consider it!

Again, thanks for opening this issue. We will keep everybody posted here and open the forum to discussion! Feedback from users is highly appreciated.

@kmahajan-cadfem
Copy link
Contributor Author

@RobPasMue,
following is just an outsider view of the whole pyansys effort

I am aware that each BU has its own choices and also since it is open source library it hat its own dependencies.

if you think of a workflow that has to go through every step of the simulation,

  • geometry creation/manipulation,
  • meshing.
  • setup,
  • solve,
  • post-processing
  • maybe report generation.
  • data management and persistence

if we think from user perspective it would be better to be compliant with all other pyansys modules

I know pretty well that we are still in cradle, but its better to change things in cradle.

cc: @akaszynski

@RobPasMue
Copy link
Member

RobPasMue commented Sep 10, 2023

That's precisely the reason why we should consider moving to pyansys-units @kmahajan-cadfem. And I am totally in line with your suggestion. Users of PyAnsys libraries will want to use other PyAnsys libraries in combination and we have to ease that process.

As of know, only PyFluent is using pyansys-units (because it was part of their package in the beginning).

There are two options here, with pros and cons:

  • We drop Pint support in favor of pyansys-units: this has the advantage of fitting right in with other PyAnsys libraries such as PyFluent. However, users that have past experience with Pint will be left out - and it is an extensively used library in the open-source world.
  • We adapt pyansys-units to accept inputs coming from Pint as well: this might be more complicated (I am not aware of the implementation of pyansys-units) but users will benefit from using the objects they prefer. The more complicated part would be implementing it - but it's not that big of a deal - and ensuring consistency.

@RobPasMue
Copy link
Member

Also, we could be the ones adapting to support both packages, that's no big deal either in my opinion. And internally, we stick to pyansys-units.

@RobPasMue RobPasMue self-assigned this Sep 11, 2023
@RobPasMue
Copy link
Member

I'll start working on this as soon as I can - thanks again @kmahajan-cadfem for opening the issue!

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
Projects
None yet
Development

No branches or pull requests

2 participants