<!--
SPDX-FileCopyrightText: 2024 Helmholtz-Zentrum Dresden - Rossendorf (HZDR)

SPDX-License-Identifier: CC-BY-SA-4.0
-->

# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.5.0] - 2026-10-16

### Added

- A first iteration of a command line analysis tool (`metabolator`) with limited
  analysis capabilities.
- Documentation pages built with Sphinx.

### Changed

- Tests are now run using both the latest Python release and the oldest supported
  Python version.
- The package does not specify a Python version upper limit any more as this is not in
  line with current packaging guidelines. Instead, tested, known-to-work versions are
  now specified via trove classifiers.
- Large-scale refactoring of the `metabolator.cli` and `metabolator.app` modules,
  extracting functionality shared between CLI and web app.
- Refactoring of `metabolator.model` to more effectively utilize the facilities of the
  lmfit model class.

### Removed

- CI/CD: Remove deployment of the development instance which was shut down.

### Fixed

- Fix the erroneously colored buttons in the interactive plots.

## [0.4.0] - 2025-10-21

### Added

- A button to visualize the selected heat range, i.e. add vertical markers in the plot.
- A "Save Analysis" button to add the current analysis to the downloadable Excel file
- The analysis now includes a plot for the metabolic load itself.
- The downloadable Excel file with the analysis results now also contains the data which
  can be used to plot the curves shown in the UI, i.e. the original measurement data in
  the time and enthalpy domain, as well as the fitted curves.
- The parameter `rₗ`, i.e. the growth rate on the logistic curve, is now reported.
- METABOLATOR now reports its own version based on the Git reference it is using.
- The METABOLATOR web application can now be started using the command
  `metabolator-web`.

### Changed

- Simplified the fitting routine. It used to narrow the fitting region to find the best
  possible fit. Now, the selected time range is fitted in its entirety. This makes the
  procedure much faster.
- Simplified the four point method used to determine the starting values for the fit.
- If the four point method fails, a fallback method is used to find starting values.
- The parameter `r₀` was renamed to `rₘ` to signify the growth rate of the Monod
  equation.
- Growth rates are now reported in `1/h`, rather than `1/s`.
- The fitting module is now based on lmfit's `Model` class.
- When plotting in the time domain, the time is now shown in hours rather than seconds.
- The downloadable Excel file only contains analyses that were previously added by
  pressing the new "Save Analysis" button, rather than all ran analyses.
- The labels on buttons and in the plot are now more intuitive and distinguish better
  between measured data and fitting results.
- The "Manual" link in the header now links to a page on the HZDR website rather than
  downloading a PDF.
- The dependency on Poetry was removed. METABOLATOR can now be used and developed with
  only a Python installation (Python, venv, Pip).

### Fixed

- The fitting results are now reported on the selected interval on which they were
  actually calculated.
- Negative measured values at the start of the curve are now excluded and enthalpy is
  calculated only after excluding the negative values. This prevents the occurrence of
  negative values in the enthalpy plot.
- An off-by-one error in the `curve_start` method was fixed.

## [0.3.0] - 2024-10-10

### Added

- Datasets can now be loaded from DOI/URL which is implemented in the `remote_data`
  module.
- The software version and a "Contribute" link are now shown in the footer.
- Search links to find datasets on Rodare and Zenodo are now shown in the header text.

### Changed

- The UI layout was changed to accomodate for the new remote data functionality.
  In the course of this change, large parts of the `ThermalAnalysisApp` class were
  refactored.

## [0.2.0] - 2024-09-19

### Added

- Download link for a manual in PDF format.

### Changed

- Large update to the UI, moving away from the grid layout.
- The function `plot_fitting` in `metabolator.plots` was renamed to
  `plot_fitting_enthalpy`.
- The function `plot_fitting_time` in `metabolator.plots` now takes an additional
  `title` parameter.

### Fixed

- Non-optimal fitting intervals are now caught and don't cause the app to get stuck any
  more.
- If the fitting procedure fails due to bad selected range or offsets, this is now
  correctly reported back to the user and doesn't make the app get stuck any more.
- Actually use the ranges determined by the four point method in the fitting process.
  Previously, starting values from the four point method were used but the range was
  applied and then overwritten.
- The `Pmax` of a fit is now correctly reported on the fitted curve rather than the
  measured curve.

## [0.1.1] - 2024-08-26

### Fixed

- The fitted curve in the time domain is now aligned with the original data.

### Changed

- Updated the domain of the HZDR service to be <https://metabolator.hzdr.de>.
- Updated the citation suggestion.

## [0.1.0] - 2024-07-11

Initial release of the METABOLATOR analysis tool.
