-
Notifications
You must be signed in to change notification settings - Fork 25
Add custom Python operator and plugin tutorials #1890
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
base: doc/new-tutorials-section
Are you sure you want to change the base?
Add custom Python operator and plugin tutorials #1890
Conversation
…to the dpf_server tutorials
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## doc/new-tutorials-section #1890 +/- ##
=============================================================
- Coverage 84.10% 84.05% -0.05%
=============================================================
Files 91 91
Lines 10529 10529
=============================================================
- Hits 8855 8850 -5
- Misses 1674 1679 +5 |
Yes, i'll put in the PR description the tutorials that this section has. Because I actually put the "load" explanations into each tutorial |
…-capabilities/Create-custom-operators-and-plugins
576cd9f
to
627c2de
Compare
================ | ||
|
||
In Ansys 2023 R1 and later, you can create custom operators in CPython. Creating custom operators | ||
consists of wrapping Python routines in a DPF-compliant way so that you can access them in the same way |
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.
consists of wrapping Python routines in a DPF-compliant way so that you can access them in the same way | |
consists in wrapping Python routines in a DPF-compliant way so that you can access them in the same way |
|
||
- **Accessibility:** A simple script can define a basic operator plugin. | ||
|
||
- **Componentization:** Operators with similar applications can be grouped in Python plug-in packages. |
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.
plugin or plug-in?
#. Run the downloaded script for installing with optional arguments: | ||
|
||
- ``-awp_root``: Path to the Ansys root installation folder. For example, the 2023 R1 installation folder ends | ||
with ``Ansys Inc/v231``, and the default environment variable is ``AWP_ROOT231``. |
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.
Maybe update to a more recent version?
#. Run the downloaded script for uninstalling with the optional argument: | ||
|
||
- ``-awp_root``: Path to the Ansys root installation folder. For example, the 2023 R1 installation folder ends | ||
with ``Ansys Inc/v231``, and the default environment variable is ``AWP_ROOT231``. |
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.
same
---------------- | ||
|
||
Creating a basic operator plugin consists of writing a single Python script. An operator implementation | ||
derives from the :class:`CustomOperatorBase <ansys.dpf.core.custom_operator.CustomOperatorBase>` class and a call to |
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.
in
…dpf-core server-side
…-capabilities/Create-custom-operators-and-plugins
Closes #1869
Add new tutorials to the
enriching dpf capabilitiesCustom Operators and Plugins section:Tutorials added:
Preview on how it renders:
Custom Operators and Plugins section main page
Create custom operators and plugins tutorial
Create a plug-in package with multiple operators
Create a plug-in package that has third-party dependencies