Skip to content

Conversation

germa89
Copy link
Collaborator

@germa89 germa89 commented Aug 5, 2025

Description

Breaking down the DPFResult class to smaller pieces for maintainability.

Issue linked

Related to #1300 and the next plotting PR.

Checklist

germa89 added 4 commits August 5, 2025 10:16
…dule

- Updated import paths for COMPONENTS and DPFResult from
  ansys.mapdl.core.reader.result to ansys.mapdl.core.reader.core.
- This change aligns with the new module structure and ensures
  consistency across the test suite.
@Copilot Copilot AI review requested due to automatic review settings August 5, 2025 08:57
@germa89 germa89 requested a review from a team as a code owner August 5, 2025 08:57
@germa89 germa89 self-assigned this Aug 5, 2025
@germa89 germa89 enabled auto-merge (squash) August 5, 2025 08:57
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 refactors the DPFResult class to improve maintainability by splitting it into smaller, more focused modules. The refactoring separates data access methods from plotting functionality and introduces new type definitions.

Key changes:

  • Split the large DPFResult class into multiple modules (core.py, data.py, plotting.py, types.py, constants.py)
  • Created a new unified DPFResult class that inherits from specialized data and plotting classes
  • Moved type definitions and constants to dedicated modules for better organization

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/test_result.py Updated import statements to use new module structure
src/ansys/mapdl/core/reader/types.py New module defining type aliases for the reader module
src/ansys/mapdl/core/reader/plotting.py New module containing plotting functionality with placeholder implementation
src/ansys/mapdl/core/reader/data.py New module containing data access methods moved from the original DPFResult class
src/ansys/mapdl/core/reader/core.py Renamed DPFResult to DPFResultCore and moved constants/types to separate modules
src/ansys/mapdl/core/reader/constants.py New module containing constants previously defined in core.py
src/ansys/mapdl/core/reader/__init__.py Updated to create unified DPFResult class from specialized components

@github-actions github-actions bot added the enhancement Improve any current implemented feature label Aug 5, 2025
@codecov
Copy link

codecov bot commented Aug 5, 2025

Codecov Report

❌ Patch coverage is 74.31694% with 47 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.35%. Comparing base (514cfae) to head (cfece85).
⚠️ Report is 5 commits behind head on main.

❌ Your patch status has failed because the patch coverage (74.31%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4144      +/-   ##
==========================================
+ Coverage   91.30%   91.35%   +0.05%     
==========================================
  Files         189      193       +4     
  Lines       15698    15722      +24     
==========================================
+ Hits        14333    14363      +30     
+ Misses       1365     1359       -6     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@germa89
Copy link
Collaborator Author

germa89 commented Aug 5, 2025

@pyansys-ci-bot LGTM.

Copy link
Contributor

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

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 96e6cad into main Aug 5, 2025
47 of 48 checks passed
@germa89 germa89 deleted the refactor/splitting-result-file branch August 5, 2025 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improve any current implemented feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants