Skip to content
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

Command output repr #1054

Merged
merged 8 commits into from
Apr 20, 2022
Merged

Command output repr #1054

merged 8 commits into from
Apr 20, 2022

Conversation

koubaa
Copy link
Contributor

@koubaa koubaa commented Apr 20, 2022

I was using pymapdl and was annoyed at the printout from commands. I would see things like this:

>>> mapdl.prep7()
'*** ANSYS - ENGINEERING ANALYSIS SYSTEM  RELEASE 2022 R1          22.1BETA ***\n DISTRIBUTED Ansys Mechanical Enterprise                       \n\n 00000000  VERSION=WINDOWS x64   09:29:10  APR 20, 2022 CP=      0.391\n\n                                                                               \n\n\n\n ** WARNING: PRE-RELEASE VERSION OF ANSYS 22.1BETA\n  ANSYS,INC TESTING IS NOT COMPLETE - CHECK RESULTS CAREFULLY **\n\n          ***** ANSYS ANALYSIS DEFINITION (PREP7) *****'
>

with this change, the printout now looks like this:

>>> mapdl.post1()
***** ROUTINE COMPLETED *****  CP =         0.469



 *** ANSYS - ENGINEERING ANALYSIS SYSTEM  RELEASE 2022 R1          22.1BETA ***
 DISTRIBUTED Ansys Mechanical Enterprise

 00000000  VERSION=WINDOWS x64   09:45:32  APR 20, 2022 CP=      0.484





 ** WARNING: PRE-RELEASE VERSION OF ANSYS 22.1BETA
  ANSYS,INC TESTING IS NOT COMPLETE - CHECK RESULTS CAREFULLY **

          ***** ANSYS RESULTS INTERPRETATION (POST1) *****

 *** NOTE ***                            CP =       0.484   TIME= 09:45:32
 Reading results into the database (SET command) will update the current
 displacement and force boundary conditions in the database with the
 values from the results file for that load set.  Note that any
 subsequent solutions will use these values unless action is taken to
 either SAVE the current values or not overwrite them (/EXIT,NOSAVE).
>>>

@koubaa
Copy link
Contributor Author

koubaa commented Apr 20, 2022

I also took the liberty to make some minor changes to the readme

@codecov
Copy link

codecov bot commented Apr 20, 2022

Codecov Report

Merging #1054 (1f92d46) into main (a213b90) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1054      +/-   ##
==========================================
+ Coverage   71.64%   71.67%   +0.03%     
==========================================
  Files          43       43              
  Lines        6112     6115       +3     
==========================================
+ Hits         4379     4383       +4     
+ Misses       1733     1732       -1     

@koubaa koubaa requested review from germa89 and akaszynski April 20, 2022 14:59
Copy link
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.

I like it the idea. It is convenient.

I have moved the class to the command module (I feel it fit better there), and added unit tests for coverage.

Other than those minors changes, this is good to go.

tests/test_commands.py Outdated Show resolved Hide resolved
@germa89 germa89 merged commit 6a7e4f4 into main Apr 20, 2022
@germa89 germa89 deleted the command-output-repr branch April 20, 2022 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants