Changelog#
This document catalogs the changes to decree-tree.
Some versions have been released, others not.
Unreleased#
In progress…
v0.4.0#
This release includes several enhancements, bug fixes, and documentation improvements, including but not limited to:
Fixed the attribute check for a populated parser in
run(). This avoids rebuilding the parser on every call even when it had already been configured.Ensured that an empty namespace can be passed to the
optionsparameter inpreprocess_options().Changed
repr_kwargs()to raiseRuntimeErrorrather thanKeyErrorwhen unexpected keyword argument keys are detected.Added a
raise_exceptionparameter toremove_child(). By default the method silently does nothing when the named child does not exist. Passingraise_exception=TruecausesInvalidNameto be raised instead.Updated
ModifiedArgumentParserto useIterableinstead ofSequencein the type signature ofparse_known_args(), matching an update to the upstreamargparsetype annotations.Documented MRO ordering requirements for mixin classes. Placing a mixin after
DecreeTreein the MRO (e.g.class MyCommand(DecreeTree, MyMixin)) is not supported, asDecreeTreerelies on cooperative inheritance in ways that prevent mixins in that position from contributing behaviour reliably. Mixins should be placed beforeDecreeTree(e.g.class MyCommand(MyMixin, DecreeTree)), which is also the conventional Python ordering for mixins.Split the CI test job into a matrix of per-interpreter jobs, using separate images for each supported Python version rather than using a single multi-python container for invoking
tox.Simplified the tox configuration by using wildcard environment patterns, reducing the number of explicit environment listings in
pyproject.toml.Added dependency locking to development and CI environments.
poetry.lockandpylock.tomlare now committed to the repository, ensuring reproducible dependency resolution across local development and CI runs.Configured trusted publishing of the package to PyPI and TestPyPI using OIDC. Separate CI jobs handle tag-triggered releases to PyPI and branch-triggered releases to TestPyPI, each authenticating with a GitLab-issued OIDC token rather than a stored credential.
Added automated documentation publishing via CI. Documentation is built and pushed to the documentation site on every commit to the default branch and on every version tag. After each push, a downstream pipeline in the documentation repository is triggered automatically to deploy the updated content.
Added automated release creation for version tags. A dedicated CI job creates a GitLab release for each tag, including a changelog excerpt drawn from the main docs and links to the documentation site and the PyPI package page.
Added Cobertura XML coverage reports and JUnit test result files as CI artifacts, enabling per-line coverage display in merge request diffs and test-result visualization within GitLab.
Disabled publish jobs in pipelines running in forked repositories. Jobs that push packages or documentation are guarded by a namespace check and do not run outside the originating project, preventing accidental publication attempts from forks.
Synchronized with v0.3.0 of the elasmocalc-copier-template. This included restructuring
pyproject.tomlto align with updated template conventions, adding aconftest.pyfor shared test configuration, updating.gitignorepatterns, and refreshing other project scaffolding files.Updated development package dependency versions.
Several other minor code, test, CI, and documentation improvements.
v0.3.0#
This release includes several enhancements, bug fixes, and documentation improvements, including but not limited to:
Changed the interplay of subcommands and other command line options and arguments. Now a particular subcommand will only allow either its subcommands (and help option) or its own and inherited arguments and options. This avoids situations where arguments or options are specified and ignored, and improves help output.
Defined a custom argument parser class:
ModifiedArgumentParser. At present, its only difference from its parent in argparse is that itparse_known_args()now errors on unrecognized arguments. This ensures that help usage statements for unexpected arguments are as specific as possible for the chosen subcommand. A different parser class can be substituted by specifyingargument_parser_classdirectly or via an argument torun().Implemented the
debug_print()method for optionally printing debug information. Printing is controlled bydebug_tracing, and can be specified as an argument torun(). Internally,debug_tracingis propagated to children viaset_debug_tracing().Defined
exec_obj_opt, which facilitates renaming of the hidden option indicating the selected subcommand. This can help avoid name clashes. This attribute is propagated via the newset_options()method.Added a flag to
parser_options()to indicate whether its the options are applied to a subparser or a top-level parser.Defined
repr_kwargs()to control the arguments displayed in the output from__repr__().Split
configure_parser()fromconfigure_parser()to improve separation of concerns.Transitioned
pyproject.tomlto use a PEP-621 style. Poetry is still used for defining developmental dependencies.Included coverage summary in local developmental test output.
Fixed some linting and test failures, including in docstrings.
Updated, expanded, and clarified documentation, particularly for configuration, development, and command nesting.
Added support for documentation source code links based on the sphinx.ext.linkcode extension.
This version was manually pushed to PyPI and the documentation site, as the CI pipeline was still under development.
v0.2.0#
This release includes several substantial refactorings and enhancements, including but not limited to:
Renamed
TreeContainerclass toTree, changed it to use a generic type var, and moved its definition to a separate module.Renamed
DecreeTreemethods to consistently refer to the parent or child, retaining helper methodsadd()andget()inDecreeTree.Clarified that
add_arguments()modifies its parser argument, not directly a class or instance variable.Ensured that
run()can be executed from non-root commands in the assembled tree.Improved arguments to
__init__(), along with creating__str__()and__repr__()methods. This removes theprog_or_nameargument to__init__(), replacing it withnameandprog_is_name.Changed the
summary()method into thestructureproperty and improved its output.Created the
AbstractDTclass to facilitate abstractDecreeTreeinheritance.Removed
decreeDecreeclass from the top level of package import.Changed the inheritance behavior of commands, including from abstract parent classes and manual tree association, and the
inheritclass initialization argument.Enhanced customization of parsers with
parser_options()andsubparsers_options().Improved typing throughout the package, with a goal of clear documentation and IDE hinting.
Greatly expanded the test suite, reaching greater than 90% coverage.
Created extensive documentation, including embedded tests.
Started use of GitLab CI for testing and package building.
Lowered the minimum version required for the typing-extensions package.
This version was manually pushed to PyPI and the documentation site, as the CI pipeline was still under development.
v0.1.0#
The first working version of the tool. Still in a developmental state, this version was not released as a package.
v0.0.0#
The initial commit, tagged for posterity.