Skip to content

feat: add STATUS enum for MAPDL state management - #4221

Merged
germa89 merged 5 commits into
mainfrom
refactor/using-enums-for-status
Sep 29, 2025
Merged

germa89 merged 5 commits into
mainfrom
refactor/using-enums-for-status

Conversation

@germa89

@germa89 germa89 commented Sep 14, 2025

Copy link
Copy Markdown
Collaborator

Description

Use enum instead of just strings.

Issue linked

NA

Checklist

Copilot AI review requested due to automatic review settings September 14, 2025 16:58
@germa89
germa89 requested a review from a team as a code owner September 14, 2025 16:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 introduces a STATUS enum to replace string literals for MAPDL state management, improving type safety and code maintainability. The changes move from magic strings like "exited", "exiting", and "OK" to well-defined enum values.

  • Adds a STATUS enum with EXITED, EXITING, and RUNNING values
  • Updates the check_status property to use enum values instead of strings
  • Improves type annotation by specifying STATUS as the return type

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/ansys/mapdl/core/mapdl_core.py
@github-actions github-actions Bot added the new feature Request or proposal for a new feature label Sep 14, 2025
@codecov

codecov Bot commented Sep 29, 2025 •

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4221      +/-   ##
==========================================
- Coverage   91.39%   91.31%   -0.08%     
==========================================
  Files         193      193              
  Lines       15715    15720       +5     
==========================================
- Hits        14362    14355       -7     
- Misses       1353     1365      +12     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@germa89

germa89 commented Sep 29, 2025

Copy link
Copy Markdown
Collaborator Author

@pyansys-ci-bot LGTM

@germa89
germa89 enabled auto-merge (squash) September 29, 2025 16:23

@pyansys-ci-bot pyansys-ci-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Approving this PR because germa89 said so in here 😬

LGTM

@germa89
germa89 merged commit 2ecca81 into main Sep 29, 2025
89 of 90 checks passed
@germa89
germa89 deleted the refactor/using-enums-for-status branch September 29, 2025 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new feature Request or proposal for a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants