Skip to content

Releases: StagPython/StagPy

v0.20.1: Release 0.20.1

04 Sep 14:42
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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

v0.15.0: Release 0.15.0

16 Sep 13:22
Compare
Choose a tag to compare
Radial profiles API changes:
- sdat.rprof and step.rprof are replaced by step.rprofs
- items of rprofs are (values, rad, meta) named tuples
- extra rprof variables are accessible with the same API as regular
  variables
- rprofs.bounds, rprofs.centers, and rprofs.walls offer access to radial
  coordinates
- rprof.get_rprof and the redges extra variable are dropped

Time series API changes:
- time items of tseries are (values, time, meta) named tuples
- extra time variables are accessible with the same API as regular
  variables
- tseries.tslice replaces sdat.tseries_between, tstart and tend kwargs are
  no longer necessary and have been removed
- tseries.time offers access to time coordinate
- time_series.get_time_series is dropped
- time_series.compstat returns the computed values instead of dumping a
  file

Geometry API changes:
- geom.X_coord are replaced with geom.X_centers and geom.X_walls in
  every direction for a better distinction between these two positions
- geom.X_mesh are dropped as keeping in memory every combination of
  walls and centers position is unecessary and consumes a lot of memory
- the extra layer that was added in the horizontal direction is removed

New features:
- implement repr for Step objects
- _StepsView has a new rprofs_averaged attribute
- the new Step.time property is robust against missing time series
- new primordial layer field "prim"

Changes:
- conf.field.interpolate is now False by default to avoid giving the
  impression that the run is more resolved than it is

Internal improvements:
- computation of EXTRA variables is cached
- eliminate the UNDETERMINED unit value, cache stuff with the
  crop descriptor
- remove the InchoateFiles context manager
- use more modern PEP517 tools to produce releases
- remove the stagpy-git link in user space

Bug fixes:
- a bug in StagYY (fixed) led to incorrect file numbers in the xdmf
  file; StagPy learned to work around that issue
- various documentation improvements
- fix axes boundaries on zoomed time series
- reduce padding between field subfigures
- handle recent T_code addition in StagYY output
- fix reading of Yang grid and fields
- location of fields in field.plot_scalar is correct in most cases
  (vz is still off as it lack the extra surface point)

Compatibility:
- drop Python 3.5 support, use f-strings where relevant
- add Python 3.9 support
- bump dependencies
- StagYY legacy output with magic < 9 is no longer supported