-
-
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
base: main
Are you sure you want to change the base?
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. |
@@ -38,7 +38,7 @@ <h3>📜🤖 Blurb it again?</h3> | |||
<select id="section" name="section" class="form-control form-inline" required> | |||
<option></option> | |||
<option>Security</option> | |||
<option>Core and Builtins</option> | |||
<option>Core_and_Builtins</option> |
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.
Would it be good to use underscores in the option value and spaces in the human-readable text?
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 "/".