ansys/pyansys-geometry

use pyansys-units instead of pint

Opened this issue ยท 5 comments

๐Ÿ“ 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

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.

@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

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.

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.

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