Skip to content

Use sphinx_autodoc_typehints - #7412

Merged
adswa merged 2 commits into
datalad:maintfrom
jwodder:gh-7404
Jun 7, 2023
Merged

adswa merged 2 commits into
datalad:maintfrom
jwodder:gh-7404

Conversation

@jwodder

@jwodder jwodder commented Jun 6, 2023

Copy link
Copy Markdown
Contributor

Closes #7404.

@jwodder jwodder added semver-documentation Changes only affect the documentation, no impact on version CHANGELOG-missing When a PR's description does not contain a changelog item, yet. labels Jun 6, 2023
@github-actions github-actions Bot removed the CHANGELOG-missing When a PR's description does not contain a changelog item, yet. label Jun 6, 2023
@codecov

codecov Bot commented Jun 6, 2023

Copy link
Copy Markdown

Codecov Report

Patch coverage has no change and project coverage change: +0.13 🎉

Comparison is base (9c91ff9) 88.10% compared to head (c4172d8) 88.23%.

Additional details and impacted files
@@            Coverage Diff             @@
##            maint    #7412      +/-   ##
==========================================
+ Coverage   88.10%   88.23%   +0.13%     
==========================================
  Files         327      327              
  Lines       44692    44692              
==========================================
+ Hits        39374    39435      +61     
+ Misses       5318     5257      -61     

see 17 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@yarikoptic

Copy link
Copy Markdown
Member

could you give an example on how it works -- i.e. shot of documentation before/after?
does it detect/warn about "conflicts" or incongruencies (type hint says one and docstring already says smth different), or what does it do -- replaces or leaves original?

@jwodder

jwodder commented Jun 6, 2023

Copy link
Copy Markdown
Contributor Author

@yarikoptic

Before

Screen Shot 2023-06-06 at 10 46 16

After

Screen Shot 2023-06-06 at 10 44 20

If the docstring already contains type information, the docstring takes precedence; there is no warning.

@yarikoptic

yarikoptic commented Jun 6, 2023

Copy link
Copy Markdown
Member

hm, RTD doesn't report on builds ... and seems to not build for PRs even though enabled. Following the docs I "resynced the hook" (under https://readthedocs.org/dashboard/datalad/integrations/92281/). Let's see if helps.

edit: that did the trick. #7413 already has RTD reporting status back.

@yarikoptic yarikoptic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it is a good thing.

@adswa
adswa merged commit 560dc91 into datalad:maint Jun 7, 2023
@yarikoptic-gitmate

Copy link
Copy Markdown
Collaborator

PR released in 0.18.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver-documentation Changes only affect the documentation, no impact on version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Investigate/use sphinx-autodoc-typehints

4 participants