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

Added doctests #207

Merged
merged 4 commits into from
Jun 24, 2020
Merged

Added doctests #207

merged 4 commits into from
Jun 24, 2020

Conversation

BvB93
Copy link
Collaborator

@BvB93 BvB93 commented Jun 18, 2020

Implementation of #177.

Bas van Beek and others added 3 commits June 18, 2020 21:25
* Fixed an incorrect exception in `_Settings.__missing__`
* Fixed a number of incorrect Sphinx domains
* Clarified a few docstrings
@BvB93 BvB93 added the Tests Updated the unit-tests label Jun 18, 2020
@BvB93 BvB93 self-assigned this Jun 18, 2020
@BvB93 BvB93 linked an issue Jun 18, 2020 that may be closed by this pull request

import os

collect_ignore = [os.path.join('src', 'qmflows', 'settings.py')]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ignore .../settings.py, as it has issues failing the doctests due to inheriting a few faulty plams.Settings-related docstring.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ignore .../settings.py, as it has issues failing the doctests due to inheriting a few faulty plams.Settings-related docstring.

Thanks for let me know

@codecov-commenter
Copy link

codecov-commenter commented Jun 18, 2020

Codecov Report

Merging #207 into master will increase coverage by 0.70%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #207      +/-   ##
==========================================
+ Coverage   81.94%   82.64%   +0.70%     
==========================================
  Files          39       39              
  Lines        1855     1855              
  Branches      235      235              
==========================================
+ Hits         1520     1533      +13     
+ Misses        265      251      -14     
- Partials       70       71       +1     
Impacted Files Coverage Δ
src/qmflows/backports.py 86.66% <ø> (ø)
src/qmflows/cp2k_utils.py 89.78% <ø> (ø)
src/qmflows/packages/package_wrapper.py 91.66% <ø> (+27.08%) ⬆️
src/qmflows/packages/packages.py 82.46% <ø> (ø)
src/qmflows/settings.py 90.90% <ø> (ø)
src/qmflows/test_utils.py 84.00% <ø> (ø)
src/qmflows/utils.py 93.54% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 14f6c58...054cb6e. Read the comment docs.

@BvB93 BvB93 marked this pull request as ready for review June 18, 2020 19:31
@BvB93 BvB93 requested a review from felipeZ June 18, 2020 19:31
Copy link
Contributor

@felipeZ felipeZ left a comment

Choose a reason for hiding this comment

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

Apart from the fact that I just don't understand the role of the ... it is always great to test the examples in the documentation


import os

collect_ignore = [os.path.join('src', 'qmflows', 'settings.py')]
Copy link
Contributor

Choose a reason for hiding this comment

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

Ignore .../settings.py, as it has issues failing the doctests due to inheriting a few faulty plams.Settings-related docstring.

Thanks for let me know

@@ -30,11 +30,17 @@ class _NullContextBackup(AbstractContextManager):
Used as a stand-in for a normal context manager, when a particular
block of code is only sometimes used with a normal context manager:

.. testsetup:: python

>>> cm = ...
Copy link
Contributor

Choose a reason for hiding this comment

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

what is the meaning of thoese 3 dots there?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah good catch, that line of code is actually completely redundant.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed in 054cb6e.

@BvB93 BvB93 merged commit 6b5cbf7 into master Jun 24, 2020
@BvB93 BvB93 deleted the test branch June 24, 2020 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tests Updated the unit-tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add doctests
3 participants