Skip to content

Add --bpo and --section flags to "blurb add". #312

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

Conversation

larryhastings
Copy link
Contributor

No description provided.

@larryhastings
Copy link
Contributor Author

Thanks for the suggestion, Mariatta!

Copy link
Member

@matrixise matrixise left a comment

Choose a reason for hiding this comment

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

I did a comment about the section parameter, but for me, it's nice.
just one question, the "section" represents the sections from bpo ?

@@ -93,7 +93,7 @@
#.. section: IDLE
#.. section: Tools/Demos
#.. section: C API

{section}
Copy link
Member

Choose a reason for hiding this comment

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

why don't you keep the same principle with the .. bpo: {bpo}? at this line, you already have a constructed section.
You build the section at that line https://github.com/python/core-workflow/pull/312/files#diff-1bd652c5f766ddebec6cd6dc8f27b3b1R927

Do you make the construction before because you don't want to have a conditional template? is it right?

@matrixise
Copy link
Member

in my workflow, I could use that

blurb add --bpo=(git rev-parse --abbrev-ref HEAD | sed -e 's/bpo-//')

so, I am happy with that solution and we can add some alias for the several sections...

alias blurbadddoc="blurb add --bpo=(git rev-parse --abbrev-ref HEAD | sed -e 's/bpo-//') --section=Documentation"

Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

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

Works well! Needs a sync with master as blurb 1.0.8 has since been released.

init_tmp_with_template()
if section:
if section not in sections:
error("blurb add --section argument " + repr(section) + " is not a valid section!")
Copy link
Member

Choose a reason for hiding this comment

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

How about printing the valid sections when this fails?

Suggested change
error("blurb add --section argument " + repr(section) + " is not a valid section!")
error("blurb add --section argument " + repr(section) + " is not a valid section! Use one of:\n" + "\n".join(sections))

For example:

$ python blurb.py add --bpo 123 --section aaa
Error: blurb add --section argument 'aaa' is not a valid section! Use one of:
Security
Core and Builtins
Library
Documentation
Tests
Build
Windows
macOS
IDLE
Tools/Demos
C API

@hugovk

This comment was marked as outdated.

@hugovk

This comment was marked as outdated.

1.0.8
~~~~~

- Added the ``--bpo`` and ``--section`` flags to
Copy link
Member

Choose a reason for hiding this comment

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

Does it make sense to use the bpo abbreviation, or would it be better as issue now?

@hugovk
Copy link
Member

hugovk commented Mar 28, 2024

This will need recreating for the new repo at https://github.com/python/blurb.

I've opened python/blurb#6 for this.

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.

7 participants