Skip to content

fix: problem with the load_table method#3745

Merged
kmkoshy merged 13 commits intomainfrom
3305-problem-with-the-load_table-method
Feb 17, 2025
Merged

fix: problem with the load_table method#3745
kmkoshy merged 13 commits intomainfrom
3305-problem-with-the-load_table-method

Conversation

@kmkoshy
Copy link
Copy Markdown
Contributor

@kmkoshy kmkoshy commented Feb 14, 2025

Description

Please provide a brief description of the changes made in this pull request.
mapdl behavior of *TREAD when column number is more than 2 is that it takes the first row as column header.

There are two possible scenarios :

  1. Where the column header is defined in the text file. (Problem with the load_table method. #3305)
  2. Where the column header is not defined. (we currently handle it internally in pymapdl copying the first row again).

fix attempted by introducing a keyword arg col_header to handle case with col_header.
when col_header=True do not go through the logic of copying the first row again. (which is why we see the issue in 3305).
update dim accordingly.

from #3305 updating the load_table cmd with the keyword arg col_header:True should fix the issue.
mapdl.load_table('acc_data', acceleration_data, 'time',col_header=True)

Issue linked

Please mention the issue number or describe the problem this pull request addresses.
#3305

Checklist

@kmkoshy kmkoshy requested a review from a team as a code owner February 14, 2025 15:02
@kmkoshy kmkoshy linked an issue Feb 14, 2025 that may be closed by this pull request
4 tasks
@ansys-reviewer-bot
Copy link
Copy Markdown
Contributor

Thanks for opening a Pull Request. If you want to perform a review write a comment saying:

@ansys-reviewer-bot review

@github-actions github-actions bot added the bug Issue, problem or error in PyMAPDL label Feb 14, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.25%. Comparing base (b39d487) to head (9ea8312).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3745      +/-   ##
==========================================
- Coverage   88.27%   88.25%   -0.03%     
==========================================
  Files         187      187              
  Lines       14705    14708       +3     
==========================================
- Hits        12981    12980       -1     
- Misses       1724     1728       +4     

@kmkoshy kmkoshy changed the title fix for issue 3305 fix/problem with the load_table method (3305) Feb 14, 2025
@kmkoshy kmkoshy self-assigned this Feb 14, 2025
@kmkoshy kmkoshy changed the title fix/problem with the load_table method (3305) fix: problem with the load_table method (3305) Feb 14, 2025
@kmkoshy kmkoshy changed the title fix: problem with the load_table method (3305) fix: problem with the load_table method Feb 17, 2025
@kmkoshy kmkoshy changed the title fix: problem with the load_table method fix:problem with the load_table method Feb 17, 2025
@kmkoshy kmkoshy changed the title fix:problem with the load_table method fix-problem with the load_table method Feb 17, 2025
@kmkoshy kmkoshy changed the title fix-problem with the load_table method fix:problem with the load_table method Feb 17, 2025
@kmkoshy kmkoshy changed the title fix:problem with the load_table method fix: problem with the load_table method Feb 17, 2025
@germa89 germa89 mentioned this pull request Feb 17, 2025
4 tasks
Copy link
Copy Markdown
Collaborator

@germa89 germa89 left a comment

Choose a reason for hiding this comment

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

thank you @kmkoshy a lot for doing this PR. I really appreciate the time you took for this.

Overall it is great, good docs, good tests,... no big suggestions. Just styling changes.

(By the way, I did add some tests which do not add anything on top your PR, but I did them for myself to understand how the tables works, so I thought it will be good idea to include them in the test set)

Again, great work. Thank you a lot!

Comment thread src/ansys/mapdl/core/mapdl_extended.py
Co-authored-by: German <28149841+germa89@users.noreply.github.com>
@kmkoshy kmkoshy merged commit 9cf7c8e into main Feb 17, 2025
@kmkoshy kmkoshy deleted the 3305-problem-with-the-load_table-method branch February 17, 2025 12:26
@kmkoshy
Copy link
Copy Markdown
Contributor Author

kmkoshy commented Feb 17, 2025

Thank you @germa89 for the review and suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue, problem or error in PyMAPDL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Problem with the load_table method.

3 participants