-
Notifications
You must be signed in to change notification settings - Fork 124
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
Fix missing arguments in inquire #754
Conversation
Changed title. Avoid slashes in title. When we merge the commit history we'll see the PR and can look for more details, but it should be (mostly) human readable. |
Some thoughts...I think this issue highlights one of the main issues with PyMAPDL: We're trying to bridge the gap between python commands and MAPDL commands and sometimes a command (like >>> out = mapdl.inquire('APDLPARM', 'ROUTINE')
>>> out
/tmp/ansys/some_directory Instead, what we should just use: >>> mapdl.directory
/tmp/ansys/some_directory Instead, what we should do here is submit a PR tha changes our API from: mapdl.prep7()
mapdl.k()
mapdl.inquire(...) To a new implementation: For MAPDL "commands" mapdl.cmd.prep7()
mapdl.cmd.k()
mapdl.cmd.inqure() then it's clear when we add non MAPDL-like features: >>> mapdl.paramters.routine
'PREP7'
>>> mapdl.paramters.routine = 'POST1'
>>> mapdl.post_processing.plot_nodal_displacement() Or new solution methods: >>> mapdl.solution.static_solution(...)
>>> mapdl.solution.modal_solution(...) Or new basic attributes: >>> mapdl.directory
/tmp/ansys/some_directory This way we can have two APIs, users can choose which one they want to implement. We would do this as a breaking change with the release of Issues with a refactorAlternatively, we keep @germa89, come up with a prototype for this if you want to go this approach. The biggest issue with the aforementioned approach is it is a huge breaking change and we might not want to go down that route. Then again, the current implementation is starting to get quite bloated; we should have an API that makes sense. Perhaps we leave ConclusionFor the time being, let's keep the PyMAPDL commands as close to their original implementations as possible; I'm fine with you changing the order of the |
Co-authored-by: Alex Kaszynski <[email protected]>
Hi Alex Thank you for the insightful discussion. I believe PyMAPDL should have the capability to replicate APDL using python as driver. In the future, a higher level API should be provided (as you mentioned, the two API view). Whether this should be built as a separate library or as an evolution of PyMAPDL, that remains to be discussed and I believe it will take some time to be decided (many considerations need to be made). In my opinion, using another library makes more sense, since in that way, you can keep PyMAPDL as close as possible to APDL, and another library can be developed for the more pythonic users. If this new library should be a completely new library or it should bring some of the Workbench Mechanical API capabilities is something that needs to be discussed as well. In the meantime, to keep it as close to APDL, I'm refactoring all the calls to Thank you again. |
@akaszynski @germa89 there might be a way to do it without breaking anything we currently have where we could add a new where and the new object has a property of course the name [1] |
It's indeed an ugly name. We generally just expose the
I agree with creating this, or a separate API. Changing the existing API would be a breaking change that I would prefer to avoid. A lower level "command" class that just abstracts the Ansys parametric design language is already a base class, we could just add a light wrapper around that and call it something like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good to go. I'm rerunning the CI due to a flaky failure; merge when green and rerun if needed.
Resolve #753 by exposing more
/INQUIRE
capabilities to PyMAPDL./INQUIRE
to match MAPDL's argument order.