Skip to content

Conversation

germa89
Copy link
Collaborator

@germa89 germa89 commented Aug 19, 2025

Description

Adding framework for testing MAPDL InProcess interface

Issue linked

NA

Checklist

@Copilot Copilot AI review requested due to automatic review settings August 19, 2025 15:00
@germa89 germa89 requested a review from a team as a code owner August 19, 2025 15:00
@github-actions github-actions bot added the CI/CD Related with CICD, Github Actions, etc label Aug 19, 2025
Copy link
Contributor

@Copilot Copilot AI left a 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.

@github-actions github-actions bot added CI/CD Related with CICD, Github Actions, etc and removed CI/CD Related with CICD, Github Actions, etc labels Aug 19, 2025
Copy link

codecov bot commented Aug 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.41%. Comparing base (b3a026c) to head (47da5e7).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4185      +/-   ##
==========================================
+ Coverage   91.39%   91.41%   +0.02%     
==========================================
  Files         193      193              
  Lines       15715    15720       +5     
==========================================
+ Hits        14362    14370       +8     
+ Misses       1353     1350       -3     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions github-actions bot added CI/CD Related with CICD, Github Actions, etc and removed CI/CD Related with CICD, Github Actions, etc labels Aug 19, 2025
@germa89
Copy link
Collaborator Author

germa89 commented Aug 19, 2025

@valallansys this should gives you a nice headstart for InProcess testing. It should be noticed that you should set the env variable TEST_INPROCESS to true.

@github-actions github-actions bot added CI/CD Related with CICD, Github Actions, etc and removed CI/CD Related with CICD, Github Actions, etc labels Aug 19, 2025
@github-actions github-actions bot added CI/CD Related with CICD, Github Actions, etc and removed CI/CD Related with CICD, Github Actions, etc labels Aug 19, 2025
@github-actions github-actions bot added CI/CD Related with CICD, Github Actions, etc and removed CI/CD Related with CICD, Github Actions, etc labels Aug 19, 2025
@github-actions github-actions bot added CI/CD Related with CICD, Github Actions, etc and removed CI/CD Related with CICD, Github Actions, etc labels Aug 19, 2025
@github-actions github-actions bot added the CI/CD Related with CICD, Github Actions, etc label Aug 22, 2025
@valallansys valallansys force-pushed the ci/adding-inprocess-testing branch from a0411f6 to c6445a3 Compare August 22, 2025 14:56
@github-actions github-actions bot added CI/CD Related with CICD, Github Actions, etc and removed CI/CD Related with CICD, Github Actions, etc labels Aug 22, 2025
@valallansys
Copy link
Contributor

Tests are failing on windows (locally). It seems to be an issue with the arguments given to subprocess.run.
test_start_python_from_pymapdl is not failing
@germa89 any ideas ?

…function to avoid running the function in MAPDL < 25.2
@github-actions github-actions bot added CI/CD Related with CICD, Github Actions, etc and removed CI/CD Related with CICD, Github Actions, etc labels Aug 28, 2025
@github-actions github-actions bot added CI/CD Related with CICD, Github Actions, etc and removed CI/CD Related with CICD, Github Actions, etc labels Aug 28, 2025
@valallansys
Copy link
Contributor

Tests are failing on windows (locally). It seems to be an issue with the arguments given to subprocess.run. test_start_python_from_pymapdl is not failing @germa89 any ideas ?

This is corrected, tests are passing on both linux and windows. @germa89 would you like to try locally on macos ?

@germa89
Copy link
Collaborator Author

germa89 commented Sep 2, 2025

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...

@valallansys valallansys force-pushed the ci/adding-inprocess-testing branch from 5055eda to 9b326f0 Compare September 2, 2025 13:28
@github-actions github-actions bot added CI/CD Related with CICD, Github Actions, etc and removed CI/CD Related with CICD, Github Actions, etc labels Sep 2, 2025
@valallansys
Copy link
Contributor

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...

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

@germa89
Copy link
Collaborator Author

germa89 commented Sep 29, 2025

@valallansys how are you doing with this? do you need any support?

@github-actions github-actions bot added CI/CD Related with CICD, Github Actions, etc and removed CI/CD Related with CICD, Github Actions, etc labels Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD Related with CICD, Github Actions, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants