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

CI: make docstring checks "instantaneous" #57878

Closed

Conversation

dontgoto
Copy link
Contributor

@dontgoto dontgoto commented Mar 18, 2024

This PR reduces the check_code.sh docstrings runtime to under 10 seconds.

The key changes are in validate_pep8_for_examples, which was refactored to call the pep8 CLI once with a list of files to analyse. The functions in the call stack above were changed to handle lists instead of single objects as well. I also added a new test since the prefix parameter was not properly tested before.

Let me know if you'd rather see this split into multiple PRs.

I'd also wait until #57879 is merged as there will be quite a few merge conflicts.

Unrelated code checks seem to be failing here and in other PRs.

…nce' into improve_docstring_check_performance
…nce' into improve_docstring_check_performance
…nce' into improve_docstring_check_performance
…ck_reduce_pep8_calls

# Conflicts:
#	scripts/tests/test_validate_docstrings.py
@dontgoto
Copy link
Contributor Author

@datapythonista
Copy link
Member

Sorry @dontgoto, this is now conflicting. Results look very impressive, thanks for the work on this. If you can split it in different PRs that would be great, it'll make reviewing easier.

@dontgoto dontgoto closed this Mar 19, 2024
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.

2 participants