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

Add enhanced pydoc-markdown pre-hook #2979

Merged
merged 2 commits into from
Aug 8, 2022
Merged

Add enhanced pydoc-markdown pre-hook #2979

merged 2 commits into from
Aug 8, 2022

Conversation

masci
Copy link
Contributor

@masci masci commented Aug 5, 2022

Related Issues

  • No issue, just the pre-commit hook was too slow

Proposed Changes:

Instead of building all the docs at every commit to ensure docs were updated, this pre-hook script will only try to build the API docs corresponding to the files actually changed, and skip the build altogether if the changed files aren't relevant for a documentation change.

How did you test it?

Just check out my branch, try changing a documented API and run pre-commit or try to actual make the commit.

Notes for the reviewer

This check makes several assumptions:

  • The source of truth about whether or not we should build docs is the search_path field inside the pydoc config files
  • For each pydoc config file, there is always one and only one entry in the search_path array

Checklist

@masci masci requested a review from a team as a code owner August 5, 2022 16:56
@vblagoje
Copy link
Member

vblagoje commented Aug 8, 2022

Tested on linux ubuntu, I assumed @masci tested it on OSX. It worked ok for the random tests I tried. Approved

@masci masci merged commit 0e8efda into master Aug 8, 2022
@masci masci deleted the massi/pydoc-md branch August 8, 2022 10:41
@tstadel tstadel added the ignore-for-release-notes PRs with this flag won't be included in the release notes. label Aug 11, 2022
@anakin87 anakin87 mentioned this pull request Sep 9, 2022
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ignore-for-release-notes PRs with this flag won't be included in the release notes. topic:tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants