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

gh-101100: Test only Doc/ files in nit-picky mode #103019

Merged
merged 1 commit into from
Mar 25, 2023

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Mar 24, 2023

Follow on from #102513.

To fix #102513 (comment).

The problem is that the https://github.com/Ana06/get-changed-files action gives an error if there's a filename with a space, for example, a news file such as Misc/NEWS.d/next/Core and Builtins/2023-03-17-12-09-45.gh-issue-100982.Pf_BI6.rst.

The error suggests using another format:

Error: One of your files includes a space. Consider using a different output format or removing spaces from your filenames. Please submit an issue on this action's GitHub repo.

We can get in CSV or JSON format instead:

But that would require some refactoring, as we need to touch the list of files.

The quick fix is to filter for files in the Doc/ directory, to only consider those:

It would of course be good to check the NEWS files, but it's less urgent than fixing the CI and unblocking other PRs!

Demo

hugovk#45 is a PR that modifies a Doc/ file plus a Misc/NEWS.d/next/Core and Builtins/ file, and the "Docs / Docs" CI check fails, as expected.

hugovk#44 is the same but also has this change, and "Docs / Docs" passes.

@AlexWaygood
Copy link
Member

Makes sense as a short-term fix!

Copy link
Member

@CAM-Gerlach CAM-Gerlach left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @hugovk for the quick fix!

@hugovk hugovk merged commit 87adc63 into python:main Mar 25, 2023
@encukou
Copy link
Member

encukou commented Mar 27, 2023

We can get in CSV or JSON format instead

IMO, the best fix would be to avoid spaces in CPython sources, so we can use simpler (though less generally correct) tooling.
Here's the blurb issue for it: python/core-workflow#186

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

Successfully merging this pull request may close these issues.

5 participants