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

Add version subcommand #29

Merged
merged 3 commits into from
Oct 12, 2024
Merged

Add version subcommand #29

merged 3 commits into from
Oct 12, 2024

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Oct 11, 2024

Make it easier to find the version by adding common options.

Before

blurb --version
Error: Unknown subcommand: --version
Run 'blurb help' for help.blurb -v
Error: Unknown subcommand: -v
Run 'blurb help' for help.blurb version
Error: Unknown subcommand: version
Run 'blurb help' for help.blurb help
blurb version 1.2.2.dev8

Management tool for CPython Misc/NEWS and Misc/NEWS.d entries.

Usage:
    blurb [subcommand] [options...]

Available subcommands:

  add        Add a blurb (a Misc/NEWS.d/next entry) to the current CPython repo.
  export     Removes blurb data files, for building release tarballs/installers.
  help       Print help for subcommands.
  merge      Merge all blurbs together into a single Misc/NEWS file.
  populate   Creates and populates the Misc/NEWS.d directory tree.
  release    Move all new blurbs to a single blurb file for the release.
  test       Run unit tests.  Only works inside source repo, not when installed.

If blurb is run without any arguments, this is equivalent to 'blurb add'.

After

blurb --version
blurb version 1.2.2.dev8blurb -v
blurb version 1.2.2.dev8blurb version
blurb version 1.2.2.dev8

@hugovk hugovk added the enhancement New feature or request label Oct 11, 2024
Copy link
Member

@ezio-melotti ezio-melotti left a comment

Choose a reason for hiding this comment

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

Codecov says the print is not covered by tests despite the line you added in the tox.ini. Should a simple test ran through pytest be added too?

src/blurb/blurb.py Outdated Show resolved Hide resolved
src/blurb/blurb.py Outdated Show resolved Hide resolved
src/blurb/blurb.py Outdated Show resolved Hide resolved
Co-authored-by: Ezio Melotti <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
@hugovk
Copy link
Member Author

hugovk commented Oct 11, 2024

Codecov says the print is not covered by tests despite the line you added in the tox.ini. Should a simple test ran through pytest be added too?

Yes, we only have coverage through pytest. Sure, I can add a simple test case.

Copy link
Member

@ezio-melotti ezio-melotti left a comment

Choose a reason for hiding this comment

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

Thanks!

@hugovk hugovk merged commit a95b471 into python:main Oct 12, 2024
12 checks passed
@hugovk hugovk deleted the add-version branch October 12, 2024 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants