Skip to content

B0: Hotfix: convert on fresh installs #88

Closed

Description

@Claptar

Part of #87.

wave 0 · 0.17.3 if still untagged, else 0.17.4 · size S · starts after: nothing

Goal. Make adata convert work whatever typer or click resolves, and catch undeclared imports in CI from now on.

Owns: cli.py (_given only), tests/test_docs_are_accurate.py, .github/workflows/tests.yml

Approach:

  • In _given, compare ctx.get_parameter_source(name) by .name ("DEFAULT", or None). Don't import click, and don't add click as a dependency: that would trigger F005.
  • Remove the click import from the docs-accuracy test (F147), or test against typer's own classes.
  • Add a CI job that installs into a clean venv from a fresh resolution (no lock), runs a smoke adata convert, and checks that importing adata pulls in no pandas, scipy, pyarrow or anndata (F148).

Findings

Ref Sev Finding Where
F004 H Every adata convert crashes on a fresh install: cli.py imports click, and typer 0.26 and later no longer installs it src/adata/cli.py:564
F005 H With click installed next to typer 0.26 or later, every convert is refused with a false 'cannot be combined with --inplace, --all, … src/adata/cli.py:569
F147 L The docs-accuracy suite imports click, which is undeclared, and checks click's classes, so it cannot run against the typer a fresh install … tests/test_docs_are_accurate.py:16
F148 L CI never runs the base install, so an eager import of pandas, scipy, pyarrow or anndata in src would pass every test .github/workflows/tests.yml:47

Done when one PR on fix/b0 closes this, with a regression test against an oracle for every finding, and docs and changelog in the same PR.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions