Skip to content

B7: concat, subset, query and split names #141

Backlog

Description

@Claptar

Part of #149.

wave 2 · 0.17.12 · size M · starts after: B4 (both edit core/concat.py and core/subset.py)

Goal. concat, subset and split match anndata on the paths the fuzzer reached, and labels and queries fail with a refusal, not a traceback.

Owns: core/concat.py, core/subset.py (name files), core/query.py, util/names.py

Approach:

  • concat keeps text columns' na-value; an outer join pads dense X and layers as anndata does (see Decisions) and pads var columns for the genes an input lacks.
  • --label '' is refused.
  • Name files are read as utf-8-sig, and names that matched nothing are reported.
  • Query operands are folded iteratively; too deep a nesting is a QueryError.
  • split labels keep Unicode letters and digits and are cut to fit a file name, with unique_names adding the suffix.

Findings

Ref Sev Finding Where
F203 M concat drops the na-value attribute of text obs columns core/concat.py:692
F204 M concat --join outer pads dense X/layers with 0 where anndata pads with NaN core/concat.py:1868
F205 M Outer-join concat --merge first drops var columns anndata keeps (padded) core/concat.py:2038
F206 M --obs-query of ~1,000 terms fails with 'maximum recursion depth exceeded' core/query.py:258
F207 M A names file with a UTF-8 BOM silently drops its first name from subset --obs/--var (an uncovered path, not a regression of the CSV fix) core/subset.py:97
F208 L concat --label '' is silently ignored core/concat.py:2007
F209 L split dies on a label over the filename limit util/names.py:22
F210 L split names non-ASCII labels wrongly; all-non-ASCII becomes NA util/names.py:22

Done when one PR on fix/b7 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