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

test: check all commands are submitted #3501

Merged
merged 14 commits into from
Oct 25, 2024

Conversation

germa89
Copy link
Collaborator

@germa89 germa89 commented Oct 21, 2024

Description

Run all the commands with fake arguments until right the point before submitting the command to the MAPDL instance.

I thought this PR would be for nothing, but I did actually catch several non-matching signatures and a totally mess up command. So... Pretty happy.

Notes

There are several (16) ignored commands because they are overwritten in the subclasses. The output is here:


============================================================================ PyMAPDL Pytest short summary =============================================================================
[FAILED] Test_MAPDL_commands.test_command[aplot] - E       ValueError: invalid literal for int() with base 10: '*GET,__floatparameter__,AREA,,COUNT,,,,,,,'
[FAILED] Test_MAPDL_commands.test_command[cfopen] - E           Run CFOPEN as ``non_interactive``
[FAILED] Test_MAPDL_commands.test_command[cmatrix] - E           Run `CMAT` as ``non_interactive``.
[FAILED] Test_MAPDL_commands.test_command[create] - E           Create a function within python or run as non_interactive
[FAILED] Test_MAPDL_commands.test_command[end] - E           Create a function within python or run as non_interactive
[FAILED] Test_MAPDL_commands.test_command[eplot] - E       ValueError: invalid literal for int() with base 10: '*GET,__floatparameter__,ELEM,,COUNT,,,,,,,'
[FAILED] Test_MAPDL_commands.test_command[geometry] - E           TypeError: <ansys.mapdl.core.mapdl_geometry.Geometry object at 0x17abf93f0> is not a callable object
[FAILED] Test_MAPDL_commands.test_command[input] - E           TypeError: MapdlGrpc.input() takes from 1 to 6 positional arguments but 12 were given
[FAILED] Test_MAPDL_commands.test_command[kplot] - E       ValueError: invalid literal for int() with base 10: '*GET,__floatparameter__,KP,,COUNT,,,,,,,'
[FAILED] Test_MAPDL_commands.test_command[lgwrite] - E           AssertionError: assert 'arg3' in LGWRITE,arg0,arg1,,arg2
[FAILED] Test_MAPDL_commands.test_command[lplot] - E       ValueError: invalid literal for int() with base 10: '*GET,__floatparameter__,LINE,,COUNT,,,,,,,'
[FAILED] Test_MAPDL_commands.test_command[lsread] - E           Run 'LSREAD' in ``non_interactive``.
[FAILED] Test_MAPDL_commands.test_command[mwrite] - E               self.run('(F20.12)')
[FAILED] Test_MAPDL_commands.test_command[nplot] - E       ValueError: invalid literal for int() with base 10: '*GET,__floatparameter__,NODE,,COUNT,,,,,,,'
[FAILED] Test_MAPDL_commands.test_command[sys] - E           AssertionError: assert 'arg0' in ''
[FAILED] Test_MAPDL_commands.test_command[vplot] - E       ValueError: invalid literal for int() with base 10: '*GET,__floatparameter__,VOLU,,COUNT,,,,,,,'
[FAILED] Test_MAPDL_commands.test_command[vwrite] - E               self.run('(F20.12)')

Issue linked

NA

Checklist

@germa89 germa89 requested a review from a team as a code owner October 21, 2024 14:32
@germa89 germa89 requested review from clatapie and pyansys-ci-bot and removed request for a team October 21, 2024 14:32
@ansys-reviewer-bot
Copy link
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 dependencies maintenance General maintenance of the repo (libraries, cicd, etc) enhancement Improve any current implemented feature labels Oct 21, 2024
@germa89 germa89 changed the title test/check all commands are submitted test: check all commands are submitted Oct 21, 2024
Copy link

codecov bot commented Oct 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.33%. Comparing base (e8248a3) to head (4797042).
Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3501   +/-   ##
=======================================
  Coverage   82.33%   82.33%           
=======================================
  Files          57       57           
  Lines       10007    10007           
=======================================
  Hits         8239     8239           
  Misses       1768     1768           

@germa89 germa89 self-assigned this Oct 22, 2024
@germa89 germa89 requested a review from koubaa October 22, 2024 07:53
@germa89
Copy link
Collaborator Author

germa89 commented Oct 22, 2024

Codecov upload seems broken because:

image

@germa89
Copy link
Collaborator Author

germa89 commented Oct 25, 2024

@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 enabled auto-merge (squash) October 25, 2024 11:43
@germa89 germa89 disabled auto-merge October 25, 2024 11:44
@germa89 germa89 enabled auto-merge (squash) October 25, 2024 11:45
@germa89 germa89 merged commit 88b8f14 into main Oct 25, 2024
61 checks passed
@germa89 germa89 deleted the test/check-all-commands-are-submitted branch October 25, 2024 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies enhancement Improve any current implemented feature maintenance General maintenance of the repo (libraries, cicd, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants