Skip to content

Releases: StagPython/StagPy

v0.22.0

19 Feb 00:32

Choose a tag to compare

Release 0.22.0

Improvements:
- Extend the set of time series and radial profiles known by StagPy to
  match what can be outputted by StagYY.
- Time series and rprof names now match the names outputted by StagYY.
  Previous names are still aliased by StagPy for convenience.

Bug fixes:
- The `+timelabel` option of the `field` command respects
  the configured scaling for time values.
- Time series with a varying number of columns during a run now works as
  expected, resulting in `NaN` values in the missing columns.

v0.21.1

27 Nov 14:07

Choose a tag to compare

Release 0.21.1

New features:
- support for `magic` number 12 in legacy field files

Internal:
- refactor parsing of legacy files with the new `_Cursor` type

v0.21.0

02 Nov 15:48

Choose a tag to compare

Release 0.21.0

Breaking changes:
- drop support for Python 3.9
- `Snaps` no longer inherits from `Steps`
- `Rprofs` is now an ABC implemented by both `RprofsInstant` (replacing
  the previous `Rprofs`) and `RprofsAveraged`
- `Fields` is no longer a `Mapping`
- remove `Fields.geom`, use `Step.geom` instead
- remove `ciover`, `cfover`, `advth` profiles that were highly
  problem-specific

Improvements:
- support Python 3.13, 3.14
- unexpectedly reaching the end of an xmf file now raises a `EndOfXml`
  error instead of `RuntimeError`
- tighten type annotations
- `StagyyData` is a frozen dataclass, and several of its properties are
  now cached properties
- `Steps`, `Snaps`, `StepsView`, `Step`, `Fields`, `Geometry`,
  `RprofsInstant`, `RprofsAveraged`, `Tseries, `Refstate`, and `Tracers`
  are also frozen dataclasses
- leverage `rich` to format the output of some commands

Fixes:
- `FieldXmf` and `TracersXmf` work correctly for sequential runs
- `RprofsAveraged` supports variable time steps
- plate distribution plot is fixed with matplotlib 3.10

Internal:
- respect PEP639 for license specification
- switch to src layout
- use `uv_build` as build backend
- use `uv` to publish release

v0.20.1: Release 0.20.1

04 Sep 14:42

Choose a tag to compare

New features:
- Optional `read_parameters_dat` argument to `StagyyData` allow
  disabling reading `parameters.dat`. This is intended for older runs
  of StagYY where this file would contained parameter values affected by
  internal logic.
- `core.read_parameters_dat` config option exposed this option to the
  CLI.

v0.20.0: Release 0.20.0

04 Sep 00:03

Choose a tag to compare

New features:
- add basalt, harzburgite, impactor fields

Breaking changes:
- drop support for Python 3.8
- support numpy >= 2.0

Fixes:
- discovery of output files from outside of the run directory is now
  correct
- `Tcond` field variable is now correctly supported with both legacy and
  HDF5 output

Documentation:
- installation instructions use uv instead of pip

Internal:
- use uv and just instead of tox
- various github workflow improvements
- mkdocs always generate the list of config options
- drop `setuptools_scm`, version number is set manually

v0.19.0: Release 0.19.0

13 Apr 19:24

Choose a tag to compare

Breaking changes:
- StagyyData constructor requires a Path
- there is no longer a global configuration directory
- remove global `stagpy.conf`, configuration can now be passed
  directly where relevant; the end-goal here is to offer an API
  that doesn't depend on a configuration at all but instead has
  to be fed the relevant parameters
- remove `StagyyData.scale` method and `scaling.dimensional` config
  option whose behaviour to automatically make variables dimensional
  was unreliable; `stagpy.dimensions.Scales.make_dimensional` can be
  used in scripts to leverage the existing logic
- rename `_step` module to `step`, and similarly remove underscore in
  front of several classes that are effectively part of the public API
  (`Refstate`, `StepsView`, `Tseries`, `RprofsAveraged`, `Steps`,
  `Snaps`, `Geometry`, `Fields`, `Tracers`, `Rprofs`)
- migrate documentation to https://stagpython.github.io/StagPy/
- remove `StagyyData.walk`

Improvements:
- major performance improvements in time and space when reading hdf5
  output by caching XDMF content and parsing those iteratively
- new command `stagy completions` produces shell completion scripts
- migrate documentation from Sphinx to MkDocs, along with various
  documentation improvements
- support for magic==11 in legacy binary files
- explicitly error out when magic number is too recent in legacy
  binary files
- `STAGPY_DEBUG` is enabled as long as it is set regardless of its value
- tighten a few type annotations
- stop using a few deprecated APIs

Internals:
- add workflows to deploy docs on github-pages and wheels on PyPI
- use ruff to format code instead of black and isort
- use ruff for code linting
- bump mypy, pytest, pytest-cov versions
- move pytest config to pyproject.toml

v0.18.0: Release 0.18.0

24 Nov 22:53

Choose a tag to compare

Improvements:
- various small improvements to startup time of CLI
- CLI options are grouped in help message (loam 0.8)
- option names use dashes instead of underscores (loam 0.8)
- add several melting related physical variables
- replace NamedTuples with dataclasses
- simplified installation instructions

Fixes:
- fix plots with `magma_oceans_mode` enabled but `evolving_magma_oceans`
  disabled
- matplotlib styles are only loaded when using the CLI, not in scripts
- remove unnecessary tests (e.g. redundant with mypy)

Packaging:
- drop support for Python 3.7
- add support for Python 3.11 and 3.12
- `setuptools_scm` is no longer a runtime dependency
- bump dependency versions (runtime and dev environments)

Removal:
- cached_property (Python 3.8) replaces CachedReadOnlyProperty
- `field.interpolate` option produced misleading plots, it has been removed

Internals:
- package configuration lives entirely in `pyproject.toml`
- use tox 4
- remove Makefile

v0.17.0: Release 0.17.0

27 Mar 23:14

Choose a tag to compare

Features:
- stagpy is now fully type annotated and statically checked with mypy.
  Several typing bugs were solved in the process.
- new velocity, acceleration and heat_production scales
- new field_header and field_istep parsers, the legacy fields parser API
  is simplified accordingly
- filters over _StepsView now compose instead of superceding each other
- ParsingErrors are now raised when parsing ill-formed xdmf files
- NoGeomError is raised when no geometry information is available for
  a Step
- NoRefstateError is raised when refstate cannot be found
- NoTimeError is raised when step.time cannot be found
- field.plot_iso can take a field argument to plot instead of the
  requested field, akin to field.plot_scalar

Improvements:
- NamedTuples are used instead of the older API namedtuple
- processing.stream_function returns a Field instead of an array
- processing.*_rprof returns Rprof instances instead of arrays
- time series processing functions return Tseries instead of arrays

Compatibility:
- drop Python 3.6 support, add 3.10
- bump several dependencies versions

Fixes:
- _Scales.length takes air thickness into account
- interpolate vector fields to cell centers in plot_scalar
- no longer use deprecated options of pandas.read_csv

Internals:
- use tox4 and tox-gh for CI
- use setup.cfg instead of setup.py, remove MANIFEST.in

v0.16.0: Release 0.16.0

14 Nov 20:55

Choose a tag to compare

Refactor of `plates` module:
- This module now exposes a useful public API
- `detect_plates` and `detect_plates_vzcheck` are merged in one routine
  `detect_plates`
- New command line arguments `--vzratio`, `+-distribution` and
  `+-nbplates` allow the user to switch on the use of `vzabs` when
  detecting plate limits, plotting of plate size distribution, and
  plotting of number of plates as a function of time
- The new `+-continents` argument switches the detection of continents
  and the related decorations on plots
- `-o/--plot` now works in a similar way to eponym options of `field`,
  `rprof`, and `time` subcommands. The `plates` subcommand plots the
  requested surface diagnostics. The later can be surface fields,
  fields, or `"dv2"` (which is `d(vphi)/dphi`)
- Most features are usable in cartesian geometry

New features:
- Fields (such as `snaps[n].fields['T']`) are now namedtuples with
  two items: `values` and `metadata`, akin to `rprofs` and `tseries`
  objects
- `plot.isolines` option allows setting the values at which isolines
  are plotted when doing a field plot

Improvements:
- `h5py`-raised `OSErrors` don't always have information about the
  faulty file, this is patched by appending its path in some contexts
- `_Fields.__contains__` fails on unknown field names instead of returning
  `False`

Documentation:
- Addition of the `plates` module API
- Example of accessing and plotting tracers data
- Several small fixes

Internals:
- Update sphinx configuration
- Pin documentation dependencies
- Update readthedocs configuration
- Github actions replace travis

v0.15.1: Release 0.15.1

12 Oct 19:19

Choose a tag to compare

New features:
- StagPy has a DOI through Zenodo

Documentation:
- update cookbook to v0.15
- `@crop` objects are properly documented
- fix numerous internal references

Bug fixes:
- geom.r_walls is now properly built when using hdf5 output
- misc module is no longer part of the public API