Skip to content

Releases: rusaitis/pypic

v0.1.3

Choose a tag to compare

@rusaitis rusaitis released this 23 Aug 13:20

Twenty-two commits of hardening since 0.1.2, driven by reading the project
the way a stranger would. Every change below was found by running the
documented commands rather than by a failing test — CI was green throughout.

Fixed

  • pypic validate crashed on 2D data. It raised TypeError: max_div_b() missing 1 required positional argument: 'd3' on any 2D dataset — the shape
    of most BATSRUS z=0 output, and of three committed fixtures. It now
    reports max |div B|: skipped (needs a 3D grid) and completes.
  • The BATSRUS .out read path was unreachable. available_fields()
    dispatched to the wrong parser and a binary .out raised
    UnicodeDecodeError; that path also skipped SI conversion and computed the
    wrong grid spacing. OpenGGCM's stagger metadata was corrected alongside it.
  • The OpenGGCM quick-start did not run, and library code printed to
    stdout.
  • Documented examples that raised when executed: plane="xy" passed
    where a PlaneSelection is required, a three-value unpack of a two-tuple
    return, Simulation.read(steps=...), and a "|u|" lookup for a quantity
    that is not registered.
  • Wrong headline claims in the docs: PI step control was advertised for
    the adaptive tracer (the shipped controller is error-norm), register_field()
    was named as the compute() extension point (it is register_recipe()), and
    the unknown_simulation error kind is spelled unknown_sim on the wire.

Added

  • Eleven names reachable straight from pypicpower_spectrum_1d/2d/3d,
    find_saddle_points, reconnection_rate, schindler_xi and friends — plus
    twenty-five more from pypic.derived and pypic.diagnostics that were
    public in their own modules but only reachable as pypic.derived.x.
  • API reference pages for pypic.io, pypic.plotting, pypic.compute,
    pypic.comparison, pypic.regrid, pypic.exceptions and pypic.schema
    seven public modules had none — plus a command-line reference covering
    every subcommand.
  • A numbered example series in examples/, from arrays to a full
    simulation.toml, run by the test suite.
  • SECURITY.md, a code of conduct, a pull-request template, and this
    changelog.

Changed

  • Name-resolution failures raise UnknownFieldError instead of a bare
    KeyError in reduce, compute and field_info. It subclasses
    KeyError, so existing handlers are unaffected.
  • FieldDataset.from_arrays accepts any Mapping, not only dict.
  • Missing-extra errors come from one guard, so the message names the missing
    modules, the feature and the install command identically every time. Install
    hints now quote the extra — pip install "pypic-plasma[zarr]" — since
    unquoted brackets are a glob in zsh.

Removed

  • The lazy extra. It installed dask, but nothing under src/ imported it;
    the chunked-loading path it was reserved for is still unwritten. It will
    come back when there is code behind it.

Full detail in CHANGELOG.md.

Install

uv add pypic-plasma                # library
uv add "pypic-plasma[plot,cli]"    # what most installs want

v0.1.2

Choose a tag to compare

@rusaitis rusaitis released this 22 Aug 17:06

Fixed

  • pypic --version failed on a bare install. The pypic console
    script is registered unconditionally, but Typer and Rich ship in the
    cli extra, so pip install pypic-plasma followed by pypic --version raised ModuleNotFoundError: No module named 'typer'.
    The command now reports what to install and exits cleanly:

    $ pypic --version
    The 'pypic' command requires typer, which ships in the cli extra.
    Install with: pip install 'pypic-plasma[cli]'
    

    Only cli-extra imports are translated — any other import failure
    still propagates, so genuine breakage is not disguised as a missing
    extra. pypic.cli:app is unchanged and still importable directly.

Using pypic as a library was never affected; import pypic works on a
bare install and always did.

Install

uv add pypic-plasma          # library
uv add "pypic-plasma[cli]"   # library + the pypic command

Full test suite: 2764 passing. Documentation:
https://rusaitis.github.io/pypic/

v0.1.1

Choose a tag to compare

@rusaitis rusaitis released this 22 Aug 16:56

First release published to PyPI. Install with:

uv add pypic-plasma        # or: pip install pypic-plasma

The distribution is named pypic-plasma; the import name is pypic.

Fixed

  • pypic --version crashed on a clean install. The CLI looked its
    version up as importlib.metadata.version("pypic"), but the
    distribution is pypic-plasma, so a fresh environment raised
    PackageNotFoundError. The server's /health probe had the same
    lookup behind a fallback and reported "unknown". Both now read
    pypic.__version__, which does not depend on the distribution name.

Internal

  • New tests/test_packaging.py pins pypic.__version__ against
    pyproject.toml and rejects any distribution-metadata lookup that
    names something other than the declared distribution.
  • CLI error assertions no longer depend on terminal colour. Typer
    force-enables rich colour under GITHUB_ACTIONS, and rich highlights
    option names, so Invalid --plane reached the assertion split across
    ANSI escapes. Thirteen tests had been failing in CI only.

Full test suite: 2761 passing. Documentation:
https://rusaitis.github.io/pypic/

Initial Release

Choose a tag to compare

@rusaitis rusaitis released this 22 Aug 16:25

Core is near complete, active development is in the applications.