diff --git a/CHANGELOG.md b/CHANGELOG.md index 0dc6ef8..4088e44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.3.0] - 2026-05-19 + ### Added - `prune_chart_to_tree` (default `False`): when on, chart rows whose @@ -14,6 +16,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 drawing. CLI form: `--prune-chart-to-tree / --no-prune-chart-to-tree`. ([#6](https://github.com/jbloomlab/tree-annotated-plot/issues/6)) +- `-h` is accepted as a short alias for `--help` on the + `tree-annotated-plot` CLI. + +### Changed + +- Minimum supported Python lowered from 3.13 to 3.11. CI still + runs on 3.13. ## [0.2.2] - 2026-05-09 diff --git a/README.md b/README.md index 7157d08..3e52520 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ See [https://jbloomlab.github.io/tree-annotated-plot/](https://jbloomlab.github. ## Installation -Released on [PyPI](https://pypi.org/project/tree-annotated-plot/). Requires Python 3.13+. +Released on [PyPI](https://pypi.org/project/tree-annotated-plot/). Requires Python 3.11+. ```bash pip install tree-annotated-plot diff --git a/docs/index.md b/docs/index.md index eaa36d2..255f036 100644 --- a/docs/index.md +++ b/docs/index.md @@ -27,7 +27,7 @@ sit on by default (left for y-axis, bottom for x-axis). ## Installation Released on [PyPI](https://pypi.org/project/tree-annotated-plot/). -Requires Python 3.13+. +Requires Python 3.11+. ```bash pip install tree-annotated-plot @@ -36,7 +36,7 @@ pip install tree-annotated-plot To pin a specific version: ```bash -pip install tree-annotated-plot==0.0.1 +pip install tree-annotated-plot==0.3.0 ``` To install the bleeding edge directly from the diff --git a/pyproject.toml b/pyproject.toml index 74e12ec..385f11b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,15 +4,17 @@ build-backend = "hatchling.build" [project] name = "tree-annotated-plot" -version = "0.2.2" +version = "0.3.0" description = "Annotate the axis of an Altair / Vega-Lite plot with a phylogenetic tree." readme = "README.md" -requires-python = ">=3.13" +requires-python = ">=3.11" license = { file = "LICENSE" } authors = [{ name = "Jesse Bloom", email = "jbloom@fredhutch.org" }] classifiers = [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Operating System :: OS Independent", "Topic :: Scientific/Engineering :: Bio-Informatics", @@ -52,7 +54,7 @@ packages = ["src/tree_annotated_plot"] dev-mode-dirs = ["src"] [tool.black] -target-version = ["py313"] +target-version = ["py311"] [tool.ruff] -target-version = "py313" +target-version = "py311" diff --git a/src/tree_annotated_plot/cli.py b/src/tree_annotated_plot/cli.py index b45c99c..7039885 100644 --- a/src/tree_annotated_plot/cli.py +++ b/src/tree_annotated_plot/cli.py @@ -263,6 +263,7 @@ def _stack_config_options(command: Any) -> Any: "Save the result as HTML / JSON / PNG / SVG / PDF " "(format is dispatched on --output's extension)." ), + context_settings={"help_option_names": ["-h", "--help"]}, ) @click.option( "--tree", diff --git a/tests/test_cli.py b/tests/test_cli.py index 43148d1..2723c5a 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -27,6 +27,14 @@ def test_help_lists_data_options() -> None: assert "--output" in result.output +def test_short_help_flag_is_alias_for_long() -> None: + """`-h` should produce identical output to `--help`.""" + long_form = _runner().invoke(main, ["--help"]) + short_form = _runner().invoke(main, ["-h"]) + assert short_form.exit_code == 0 + assert short_form.output == long_form.output + + def test_help_lists_auto_generated_options() -> None: """A handful of PlotConfig-derived options should appear in --help.""" result = _runner().invoke(main, ["--help"])