Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,22 @@ 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
`chart_strain_field` value isn't a tree tip are filtered out before
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

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
10 changes: 6 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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"
1 change: 1 addition & 0 deletions src/tree_annotated_plot/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 8 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand Down