Skip to content

Remove click_default_group#506

Closed
SmileyChris wants to merge 1 commit intotwisted:trunkfrom
SmileyChris:remove-click_default_group
Closed

Remove click_default_group#506
SmileyChris wants to merge 1 commit intotwisted:trunkfrom
SmileyChris:remove-click_default_group

Conversation

@SmileyChris
Copy link
Copy Markdown
Contributor

Here's a quick take of replacing this small and old package with just what click provides out of the box.

This does change the current --help output from

Usage: towncrier [OPTIONS] COMMAND [ARGS]...

  Towncrier is a utility [...]

Options:
  --version  Show the version and exit.
  --help     Show this message and exit.

Commands:
  build*  Build a combined news file from news fragment.
  check   Check for new fragments on a branch.
  create  Create a new news fragment.

to

Usage: towncrier [OPTIONS] COMMAND [ARGS]...

  Towncrier is a utility [...]

Options:
  --draft             Render the news fragments to standard output. Don't
                      write to files, don't check versions.
  --config FILE_PATH  Pass a custom config file at FILE_PATH. Default:
                      towncrier.toml or pyproject.toml file, if both files
                      exist, the first will take precedence.
  --dir PATH          Build fragment in directory. Default to current
                      directory.
  --name TEXT         Pass a custom project name.
  --version TEXT      Render the news fragments using given version.
  --date TEXT         Render the news fragments using the given date.
  --yes               Do not ask for confirmation to remove news fragments.
  --keep              Do not ask for confirmations. But keep news fragments.
  --version           Show the version and exit.
  --help              Show this message and exit.

Commands:
  build   Build a combined news file from news fragment.
  check   Check for new fragments on a branch.
  create  Create a new news fragment.

Description

Checklist

  • Make sure changes are covered by existing or new tests.
  • For at least one Python version, make sure local test run is green.
  • Create a file in src/towncrier/newsfragments/. Describe your
    change and include important information. Your change will be included in the public release notes.
  • Make sure all GitHub Actions checks are green (they are automatically checking all of the above).
  • Ensure docs/tutorial.rst is still up-to-date.
  • If you add new CLI arguments (or change the meaning of existing ones), make sure docs/cli.rst reflects those changes.
  • If you add new configuration options (or change the meaning of existing ones), make sure docs/configuration.rst reflects those changes.

@SmileyChris
Copy link
Copy Markdown
Contributor Author

Looking at the failing tests (such as --version being overridden), it's probably better to just import the code from the library that's in use now rather than try to work around.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant