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

Adding unit testing section #1621

Merged
merged 17 commits into from
Nov 23, 2022
Merged

Conversation

clatapie
Copy link
Contributor

@clatapie clatapie commented Nov 9, 2022

Closes #1536

@clatapie clatapie linked an issue Nov 9, 2022 that may be closed by this pull request
@github-actions github-actions bot added the Documentation Documentation related (improving, adding, etc) label Nov 9, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Nov 9, 2022

Please add one of the following labels to add this contribution to the Release Notes 👇

@clatapie clatapie self-assigned this Nov 9, 2022
@codecov
Copy link

codecov bot commented Nov 9, 2022

Codecov Report

Merging #1621 (6d23a75) into main (8850205) will decrease coverage by 0.09%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1621      +/-   ##
==========================================
- Coverage   82.84%   82.74%   -0.10%     
==========================================
  Files          44       44              
  Lines        7151     7151              
==========================================
- Hits         5924     5917       -7     
- Misses       1227     1234       +7     

@clatapie clatapie marked this pull request as ready for review November 9, 2022 17:06
doc/source/contribution_and_api/unit_testing.rst Outdated Show resolved Hide resolved
doc/source/contribution_and_api/unit_testing.rst Outdated Show resolved Hide resolved
doc/source/contribution_and_api/unit_testing.rst Outdated Show resolved Hide resolved
doc/source/contribution_and_api/unit_testing.rst Outdated Show resolved Hide resolved
doc/source/contribution_and_api/unit_testing.rst Outdated Show resolved Hide resolved
doc/source/contribution_and_api/unit_testing.rst Outdated Show resolved Hide resolved
doc/source/contribution_and_api/unit_testing.rst Outdated Show resolved Hide resolved
doc/source/contribution_and_api/unit_testing.rst Outdated Show resolved Hide resolved
doc/source/contribution_and_api/unit_testing.rst Outdated Show resolved Hide resolved
Copy link
Member

@RobPasMue RobPasMue left a comment

Choose a reason for hiding this comment

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

It's looking good. Can't add more than @germa89's comments =)

doc/source/contribution_and_api/unit_testing.rst Outdated Show resolved Hide resolved
doc/source/contribution_and_api/unit_testing.rst Outdated Show resolved Hide resolved
clatapie and others added 5 commits November 11, 2022 15:52
Copy link
Member

@RobPasMue RobPasMue left a comment

Choose a reason for hiding this comment

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

LGTM in general! Some minor comments. Leaving final review to @germa89 (since he is the PyMAPDL boss =P)

doc/source/contribution_and_api/unit_testing.rst Outdated Show resolved Hide resolved
doc/source/contribution_and_api/unit_testing.rst Outdated Show resolved Hide resolved
doc/source/contribution_and_api/unit_testing.rst Outdated Show resolved Hide resolved
doc/source/contribution_and_api/unit_testing.rst Outdated Show resolved Hide resolved
doc/source/contribution_and_api/unit_testing.rst Outdated Show resolved Hide resolved
doc/source/contribution_and_api/unit_testing.rst Outdated Show resolved Hide resolved
doc/source/contribution_and_api/unit_testing.rst Outdated Show resolved Hide resolved
doc/source/contribution_and_api/unit_testing.rst Outdated Show resolved Hide resolved
clatapie and others added 2 commits November 14, 2022 18:08
Co-authored-by: Roberto Pastor Muela <roberto.pastormuela@ansys.com>
Co-authored-by: Roberto Pastor Muela <roberto.pastormuela@ansys.com>
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.

Hi Camile

I have left some comments in the PR, most of them are grammar based. Others are based on the following suggestions:

  • Add all the links to links.rst and then reference it from there as explained in Adding links.rst to docs #1506
  • Explain a bit more about how to couple your tests with the existing ones. i.e. explain what are fixtures.
  • Reference any document, text, image, or whatever thing you do copy from somewhere else.

With the proposed changes, you will have to add these links to links.rst:

.. _pytest: pytest.org
.. _pymapdl_tests: https://github.com/pyansys/pymapdl/tree/main/tests
.. _codecov: https://github.com/codecov
.. _pytest_usage: https://docs.pytest.org/en/7.2.x/how-to/usage.html#specifying-which-tests-to-run
.. _article_good_unit_test: https://stackoverflow.com/questions/61400/what-makes-a-good-unit-test 
.. _mapdl_fixture: https://github.com/pyansys/pymapdl/blob/fb5fb8b6201253f1bd56bdabee60a29abee8c7d8/tests/conftest.py#L254
.. _pymapdl_test_math: https://github.com/pyansys/pymapdl/blob/main/tests/test_math.py
.. _pymapdl_user_guide_math: https://mapdl.docs.pyansys.com/user_guide/math.html

doc/source/contribution_and_api/unit_testing.rst Outdated Show resolved Hide resolved
doc/source/contribution_and_api/unit_testing.rst Outdated Show resolved Hide resolved
doc/source/contribution_and_api/unit_testing.rst Outdated Show resolved Hide resolved
doc/source/contribution_and_api/unit_testing.rst Outdated Show resolved Hide resolved
doc/source/contribution_and_api/unit_testing.rst Outdated Show resolved Hide resolved
doc/source/contribution_and_api/unit_testing.rst Outdated Show resolved Hide resolved
doc/source/contribution_and_api/unit_testing.rst Outdated Show resolved Hide resolved
doc/source/contribution_and_api/unit_testing.rst Outdated Show resolved Hide resolved
doc/source/contribution_and_api/unit_testing.rst Outdated Show resolved Hide resolved
doc/source/contribution_and_api/unit_testing.rst Outdated Show resolved Hide resolved
@germa89
Copy link
Collaborator

germa89 commented Nov 17, 2022

Pinging @maromer0 for learning purposes.

Please Manu have a look at this PR and start to get familiarized with how the documentation is written using RST.

clatapie and others added 4 commits November 18, 2022 09:46
Co-authored-by: German <28149841+germa89@users.noreply.github.com>
Co-authored-by: German <28149841+germa89@users.noreply.github.com>
@germa89 germa89 requested a review from PipKat November 22, 2022 08:24
clatapie and others added 2 commits November 22, 2022 15:22
Co-authored-by: Kathy Pippert <84872299+PipKat@users.noreply.github.com>
Co-authored-by: Kathy Pippert <84872299+PipKat@users.noreply.github.com>
clatapie and others added 2 commits November 22, 2022 16:46
Co-authored-by: Kathy Pippert <84872299+PipKat@users.noreply.github.com>
@RobPasMue
Copy link
Member

@germa89 you have to approve so that we can merge =)

@RobPasMue RobPasMue enabled auto-merge (squash) November 23, 2022 09:13
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.

LGTM.

@RobPasMue RobPasMue merged commit b4c1acf into main Nov 23, 2022
@RobPasMue RobPasMue deleted the doc/adding-unit-testing-informations branch November 23, 2022 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Documentation related (improving, adding, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add info about unit testing in the contributing section
4 participants