Skip to content

DOC: Update title caps validation script to step through directories #55685

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

Closed
wants to merge 1 commit into from

Conversation

skregas
Copy link

@skregas skregas commented Oct 25, 2023

Add words that should remain capitalised:

"RangeIndex",
"SparseArray",
"SparseDtype",
"HTTP",
"XML"

Before:
when specifying a directory in the form: doc/source for the script, it would throw an error, because it was looking for only files

After:
can now enter:
script/validate_title_capitalization.py doc/source and it will traverse all the directories below it.

Add words that should remain capitalized
@skregas
Copy link
Author

skregas commented Oct 27, 2023

Regarding the checks: 3 are being cancelled. The last one, ci/circleci: test-arm, I don't know why that's failing. I updated my local repo to latest from upstream/main and ran the same test, which passed

@@ -261,14 +293,20 @@ def main(source_paths: list[str]) -> int:

number_of_errors: int = 0

for filename in source_paths:
Copy link
Member

Choose a reason for hiding this comment

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

Instead of this implementation, why you don't simply implement a function that given source_paths yields all the files to check? I think it will be much clearer than what you're doing here. The only change you'd need in this function would be to replace this line by for filename in walk_paths(source_paths):.

Also, please use pathlib instead of os.path.

I don't understand why you skip the png files. If this is to validate rst files, shouldn't we ignore everything that is not rst?

Finally, do you know if this script is being called in the CI? Or why is it not? Are all titles correct after your changes? If that's the case, can you start running it, so we make sure all titles are correct at all times.

I don't think the CI errors are related to your changes, if you update your local branch and push, the CI may become green.

@datapythonista datapythonista added Docs CI Continuous Integration labels Nov 1, 2023
@datapythonista
Copy link
Member

@skregas thanks for the work here, do you still want to continue with this PR? There is the comment above that you may want to check if that's the case

@datapythonista datapythonista changed the title Update title caps validation script to step through directories DOC: Update title caps validation script to step through directories Nov 17, 2023
@datapythonista
Copy link
Member

Closing as stale, but thanks for the work @skregas, and if you eventually want to address the comments, please let me know and I can reopen the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration Docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants