Skip to content

Conversation

gdubicki
Copy link
Contributor

Instead of declaring types in the docstrings let's use PEP 484 type hints. Thanks to the sphinx-autodoc-typehints extension they will be added to the docs but also work as static types to add type safety to this library.

Also add a GitHub Action doc building test to avoid getting commits like 6c8c3a8 that are breaking docs building (https://readthedocs.org/projects/pypuppetdb/builds/13531565/) getting into the master branch.

@coveralls
Copy link

coveralls commented Apr 17, 2021

Coverage Status

Coverage increased (+0.05%) to 84.581% when pulling adbf868 on gdubicki:type_hints into bc9be84 on voxpupuli:master.

when building docs by treating warnings
as errors (like readthedocs does).
and remove the :type entries from their docstrings
thanks to the sphinx-autodoc-typehints extension.

Also complete their docstrings for their constructors
and the static creation methods.
"WARNING: more than one target found for cross-reference
'facts': pypuppetdb.api.QueryAPI.facts, pypuppetdb.types.Node.facts"

See https://stackoverflow.com/a/67137409/2693875.
even though it's a RC1 as of now
@codecov
Copy link

codecov bot commented Nov 22, 2021

Codecov Report

❌ Patch coverage is 96.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 85.03%. Comparing base (3a247ae) to head (2eee541).
⚠️ Report is 231 commits behind head on master.

Files with missing lines Patch % Lines
pypuppetdb/types.py 96.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #210      +/-   ##
==========================================
+ Coverage   84.96%   85.03%   +0.07%     
==========================================
  Files          14       14              
  Lines         918      929      +11     
==========================================
+ Hits          780      790      +10     
- Misses        138      139       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gdubicki
Copy link
Contributor Author

gdubicki commented Jan 7, 2022

Partially done in #220.

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.

3 participants