Skip to content

Stoner 0.12.0a5

Pre-release
Pre-release

Choose a tag to compare

@gb119 gb119 released this 30 Oct 19:31
· 10 commits to devel since this release

Stoner 0.12.0a5 introduces fitting accessors, registered model shortcuts and consistent column selection.

Changes

  • Fit through Data.fit: d.fit(model, ...) defaults to lmfit, d.fit.linear(...) selects a registered model, and explicit lmfit, curve_fit, odr, differential_evolution and polyfit methods retain their existing algorithm options and return values. Coordinate selectors are x and y, matching Data.plot.
  • Fit collections through folder.each.fit, including model shortcuts. Preserve member ordering, result and metadata handling, and existing serial/thread/process controls. Custom shortcut definitions are transferred to workers without changing their global registries; unsupported serialisation has an explicit diagnostic and cleans up the operation's pool.
  • Add the snake_case model registry and integrate registration into @make_model. Support explicit class/factory registration, named decorators and deliberate replacement, with read-only discovery and model-name completion. Canonical shortcuts include bloch_grueneisen and fuchs_sondheimer; existing model imports remain available.
  • Add Stoner.enums.FitOutput for the six common output choices while retaining supported strings and existing algorithm-specific results.
  • Move fit annotations to data.plot.annotate_fit(...), including text-only formatting. Migrate internal fitting consumers, documentation, sample code and analysis scripts to the accessor APIs, and add detailed fitting/registration/folder guides.
  • Consolidate column-role/schema resolution. Column selectors return all matches at the first successful stage: exact header, whole-header glob or literal substring, then regex. Use find_col(..., first=True) for a deliberately single result. Scalar consumers reject ambiguous selections; multi-predictor and multi-response fitting remain supported. Native pandas lookup is unchanged.
  • Fix differential-evolution statistics with named X-column selectors and shared fitting preparation with scalar integer Y-column selectors. Retain numerical and real SQUID-fixture regression coverage.

Compatibility and requirements

Python 3.12 or newer and stonerplots 1.9.8 or newer remain required; dependencies are unchanged from 0.12.0a4. The new fitting accessors reject legacy xcol/ycol keywords: replace them with x/y. Direct Data fitting methods retain their old keywords and remain available without new deprecation warnings; a removal release has not been selected. Fit annotations now use Data.plot.annotate_fit.

Validation

Release source: 4faff759a4d856bb038ed3ff7cae097da5776935.

Local Windows Python 3.14 validation passed 1,759 tests excluding network/OCR, plus the network fitting example separately. All 84 documentation examples passed. The final cached Sphinx build matched the reviewed warning baseline with no unexpected warnings or removed API objects; rendered migration/reference pages and fitting link targets were checked. Analysis scripts were syntax-checked and audited, not run against laboratory data. Physical instrument compatibility was not newly established.

Hosted release-commit checks:

All required release-commit gates passed. Each full Linux Python 3.12–3.14/macOS Python 3.14 matrix cell passed 1,762 tests; lower dependencies passed 1,761 with one expected skip. No gate was waived.

Publication

  • PyPI wheel and sdist are public. The public wheel passed installed-package resource/numerical/plotting checks and new fitting accessor, FitOutput, folder-shortcut and decorated-model probes outside the source checkout.
  • PyPI/Conda deployment passed, including the installed Conda import/version test. noarch/stoner-0.12.0a5-py_0.conda is present in the public phygbu main-channel index.
  • Release documentation CI passed. The maintainer activated Read the Docs; build 35532428 passed on the exact release SHA. Versioned documentation is public and verified: 12 pages, 113 fitting links/fragments, six images and 17 fitting inventory targets. Rendered guides were inspected, and the fitting example PNG/hires PNG/PDF match the retained release cache. Sphinx reported 37 non-fatal warnings, including duplicate API descriptions and third-party footnotes; two duplicate-object counts exceed the stored Linux baseline. No checked fitting link or image was broken.
  • Coverage checks on the release source passed. Zenodo archived the immutable tag as DOI 10.5281/zenodo.23817189.