-
Notifications
You must be signed in to change notification settings - Fork 139
ci: add InProcess testing module #4185
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
Conversation
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.
Pull Request Overview
This PR adds a testing framework for the MAPDL InProcess interface, which allows testing Python code execution within MAPDL. The framework provides a test runner that executes MAPDL commands in batch mode and validates Python command functionality.
- Introduces
MapdlInProcessRunner
class for executing MAPDL commands with Python integration - Adds pytest fixture for InProcess testing with version and environment checks
- Provides basic test cases to verify Python command execution within MAPDL
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4185 +/- ##
==========================================
- Coverage 91.20% 87.66% -3.54%
==========================================
Files 193 193
Lines 15719 15719
==========================================
- Hits 14336 13780 -556
- Misses 1383 1939 +556 🚀 New features to boost your workflow:
|
@valallansys this should gives you a nice headstart for InProcess testing. It should be noticed that you should set the env variable |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
MacOS does not support MAPDL, so we do not have to test it. What was the issue? I saw your last commit and I dont know if the error was comming from the MAPDL env var or from the additional switches... |
for more information, see https://pre-commit.ci
5055eda
to
9b326f0
Compare
Deleting the additional switches was a mistake, the error came from the env argument. But we didn't need it as we set the en var in the init |
@valallansys how are you doing with this? do you need any support? |
@germa89 The PR should be all good for merge |
Good for me I meant, we still need someone to review and approve |
@pyansys-ci-bot LGTM. |
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.
* ci: add MapdlInProcessRunner and related tests for Python execution in MAPDL * chore: adding changelog file 4185.miscellaneous.md [dependabot-skip] * fix: remove redundant import of ON_LOCAL in test fixture * fix: correct condition for skipping InProcess tests based on environment variable * Update tests/test_inprocess.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix: streamline subprocess execution in MapdlInProcessRunner * fix: correct condition for skipping InProcess tests based on environment variable * fix: add support for additional switches in subprocess execution * fix: improve command execution in MapdlInProcessRunner and update test assertions * fix: update skip message for InProcess tests to improve clarity * fix: enhance MapdlInProcessRunner with virtual environment detection and output handling * fix: enhance requirement checking and add virtual environment tests * fix: keep only tests from mapdl, from pymapdl and check python path with fix without python env * ci: auto fixes from pre-commit.com hooks. for more information, see https://pre-commit.ci * fix: update MapdlInProcessRunner to include version parameter and adjust environment handling * fix: Set venv to the one we're using for pymapdl * ci: auto fixes from pre-commit.com hooks. for more information, see https://pre-commit.ci * fix: add mapdl_inprocess parameter to test_start_python_from_pymapdl function to avoid running the function in MAPDL < 25.2 * chore: adding changelog file 4185.maintenance.md [dependabot-skip] * fix: Test correction for Windows * ci: auto fixes from pre-commit.com hooks. for more information, see https://pre-commit.ci --------- Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: valallansys <valentin.allard@ansys.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Description
Adding framework for testing MAPDL InProcess interface
Issue linked
NA
Checklist
draft
if it is not ready to be reviewed yet.feat: adding new MAPDL command
)