Skip to content

Releases: andrewrosss/multicommand

1.0.0

26 Mar 06:23
Compare
Choose a tag to compare
Bump version: 0.1.1 → 1.0.0

0.1.1

08 Jun 07:46
Compare
Choose a tag to compare
  • 🎉 Create documentation website 🎉
  • Migrate package to use src/ layout
  • Add pre-commit as a dev dependency
  • Update black to newer version

0.1.0

24 May 04:26
Compare
Choose a tag to compare
  • Make sure to always initialize a root index parser (if one doesn't already exist) so that multicommand.create_parser(...) always returns a useable ArgumentParser (instead of raising an exception).

    This way multicommand.create_parser(...) can be called on a package that has no parsers, and will still behave sensibly.

  • Check that found parsers are actually (sub-classes of) ArgumentParser, skip them if they aren't.

  • Fix bug in _requires_subparsers

  • Improve help for subcommands

0.0.8

09 Apr 05:26
Compare
Choose a tag to compare
  • Fix: Fix prog=... for intermediate index parsers. Prior to this these parsers would only show the command name (sys.argv[0]) and the last parser's name, but none of the intermediate parser's names, which meant the usage string was wrong.
  • Update: Add a license (MIT)
  • Update: Change registry data structure from List[Tuple[PurePath, ArgumentParser]] -> OrderedDict[PurePath, Dict[str, ArgumentParser]]

0.0.7

06 Apr 04:51
Compare
Choose a tag to compare

Documentation release

0.0.6

05 Apr 04:28
Compare
Choose a tag to compare
  • Update: Refactored multicommand.py to simplify the structure of the create_parser(...) function. Moreover, the keys in the parser registry (OrderedDict) are now pathlib.PurePath objects instead of tuples. The motivation for this change was because the registry keys (Tuple[str, ...] objects) were already basically being treated like pathlib.Path objects and it made the registry key manipulation easier to read and understand.
  • Update: pyproject.toml (added keywords)

0.0.5

04 Apr 04:45
Compare
Choose a tag to compare
  • Update: load_parsers now uses pkg.__name__ when loading parsers into the parser registry (OrderedDict). Prior to this, the value commands was hardcoded meaning that for multicommand to work the subpackage housing all of the parsers had to be called mypkg.<blah>.commands.
  • Update: Documentation
    • General housekeeping: Fixed typos, fixed broken links, added PyPI badge, etc.

0.0.4

03 Apr 07:56
Compare
Choose a tag to compare
  • Fix: Fixed the scenario where "intermediate" commands were not defined. When that happened multicommand wouldn't have intermediate parsers to link terminal parsers to the root parser.

    Specifically, if there was say a single command defined as: commands/mytopic/mycommand/mysubcommand.py (with appropriate __init__.py files) multicommand would crash, because the index parsers required to exist "between" the parser defined in mysubcommand.py and the root parser (created by multicommand) weren't getting created, and the application would crash.

This release also adds a very basic README and a simple example demonstrating the basic usage of multicommand.

0.0.3

02 Apr 06:33
Compare
Choose a tag to compare
  • Update: Forward parser config on subparser creation
  • Update: Add custom prog=... when linking parsers to accurately reflect the expected command invocation
  • Maintenance: Add comments, clean up type hints, update pyproject.toml

0.0.2

01 Apr 05:38
Compare
Choose a tag to compare

Hello, World!