Comparing main...fix-tip-ordering-bug · jbloomlab/tree-annotated-plot · GitHub
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jbloomlab/tree-annotated-plot
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: jbloomlab/tree-annotated-plot
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: fix-tip-ordering-bug
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 5 files changed
  • 1 contributor

Commits on May 6, 2026

  1. fix tip ordering for untyped Altair shorthand axes (0.2.1)

    Charts whose strain axis used positional shorthand without a type
    suffix — `alt.Y("strain")` instead of `alt.Y("strain:N")` — silently
    rendered in data order instead of tree-tip order. The field-extraction
    helper called `to_dict()` on the bare channel, which raises when the
    shorthand has no explicit type because Altair needs a chart-data
    context to infer it. The blanket `except Exception` returned `None`,
    the live-object walker found no match, and the sort override was
    silently skipped.
    
    Replace the to_dict-based reader with one that inspects `_kwds`
    directly, handles plain-str fields, untyped/typed/aggregate shorthand,
    and the `FieldName(SchemaBase)` wrapper that `from_dict` introduces;
    raise on unrecognized shapes instead of swallowing them.
    
    Add a structural fail-fast tripwire: count strain-axis encodings on
    the spec walk and on the live-object walk, and raise on any mismatch.
    Catches both this bug and any future divergence between the two
    surfaces.
    
    Consolidate the two near-identical live-object walkers (sort
    application and axis suppression) into a single read-only generator
    yielding live channel objects; the call site in `_build` applies sort
    and (conditionally) axis suppression at each yielded channel and
    counts hits for the tripwire. Removes ~70 lines of duplicated
    traversal logic.
    
    Tests: 11 new unit and end-to-end tests covering typed/untyped/
    explicit/aggregate shorthand, the from_dict-roundtripped wrapper,
    value-only encodings (legitimate None), unparseable shorthand
    (raises), non-channel objects (raises), tip ordering for untyped
    shorthand on x and y, and the tripwire firing when the live walker
    misses a strain encoding the spec walker found.
    jbloom committed May 6, 2026
    Configuration menu
    Copy the full SHA
    51ed868 View commit details
    Browse the repository at this point in the history
Loading