-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Use underscores instead of spaces in paths #332
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm reading the code correctly, this value is retrieved here:
Lines 155 to 157 in a346755
section = data.get("section", "").strip() | |
news_entry = data.get("news_entry", "").strip() + "\n" | |
path = await util.get_misc_news_filename(issue_number, section, news_entry) |
and then used to create the filename in:
Lines 11 to 15 in a346755
async def get_misc_news_filename(issue_number, section, body): | |
date = time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime()) | |
nonce = await nonceify(body) | |
path = f"Misc/NEWS.d/next/{section}/{date}.gh-issue-{issue_number}.{nonce}.rst" | |
return path |
There is only a test for this function:
Lines 42 to 46 in a346755
async def test_get_misc_news_filename(): | |
path = await util.get_misc_news_filename( | |
issue_number=123, | |
section="Library", | |
body="Lorem ipsum dolor amet flannel squid normcore tbh raclette enim" |
The changes look OK to me, even though they don't seem to be covered by the tests. If you think it's worth it, you could add another test for get_misc_news_filename
, and possibly update its code to reject sections that include spaces.
Sure, updated! |
Updated to use underscores instead of hyphens, to match blurb, as decided during the EuroPython sprint: python/core-workflow#499 (comment) |
Is something still blocking this PR? |
Yes, python/core-workflow#499 needs merging first. |
Is something blocking python/core-workflow#499? 🙃 |
Someone to hit the big green merge button? I think it's ready. |
I've released blurb 1.2.0 that now uses underscores for the directories: https://github.com/python/blurb/releases/tag/v1.2.0 Let's give it a little bit of time for testing first, then we can mark this as ready for review/merge. |
Co-authored-by: Éric <[email protected]>
Co-authored-by: Éric <[email protected]>
This is now ready for review/merge. After it's merged and we've confirmed it's working, I'll post on Discuss to encourage people to upgrade their blurb CLI. Further down the line, we can add a pre-commit check to prevent creation of dirs with spaces. |
We already have an approval, let's merge! 🚀 |
Confirmed working: python/cpython@ |
For python/core-workflow#186.
Companion to python/core-workflow#499.
I've not tested this other than running the unit tests.
I think this is all we need for blurb-it? For example, there's already "Tools-Demos" with no "/".