Releases: darksim33/Pyneapple
v1.7.0
Release Summary: v1.5.6 → v1.7.0
Overview
This summary covers four major releases with significant enhancements to Pyneapple's capabilities, including logger implementation, TOML support, IVIM results improvements, and comprehensive IO functionality.
📦 Version 1.7.0 (Latest) - IO Update
Major Features
-
- Complete HDF5 data storage and export functionality
- Transform ResultDicts to Arrays before HDF5 export
- Support for 3D and 4D data structures
- Switched from scipy.sparse to
sparselibrary for N-D support - Dict import capabilities
- Comprehensive test suite
-
NIfTI Support
- NIfTI helper functions for medical imaging
- Refactored results saving for NIfTI format
- Comprehensive test suite with preparation helpers
-
NNLS Enhancements
- Cutoff handling and peak merging
- Improved peak handling with IVIM T1 flag
- Comprehensive results test suite
- Fixed variable array length issues
Improvements
- GPU fitter model retrieval and constraint handling (#197)
- Expanded DataExport documentation
- Added
fit_optparameter to track fitting type (pixel/segmentation/segmented/ideal) - Moved JSON and TOML operations to dedicated IO module
- Enhanced type support and hints throughout codebase
Bug Fixes
- Default
fit_optto empty string - GPU fitter constraints and imports
- NNLS model params not passed properly
- Shape calculation issues
- Missing logger output
📦 Version 1.6.2 - IVIM Results Patch
Key Changes
-
IVIM Results Refactoring
- Switched from separate S0 and f extraction to unified method
- Fixed segmented test issues
- Improved extraction logic
-
Core Fixes
- Additional small fraction issue resolved
- dimstep now always returns np.ndarray
- Parameter class invoke error fixed
- JSON to params_file conversion issues
-
Testing & Quality
- seg_args tests for mean calculations
- Updated radimgarray commit
- Removed unused methods and imports
- Pylance compatibility improvements
Documentation
- Updated class descriptions
- Fixed type hints
📦 Version 1.6.1 - TOML Parameter Support
Major Feature: TOML Support (#168)
- TOML File Format
- Added TOML parameter file import/export
- Renamed
params.jsontoparams.filefor format flexibility - TOML packages added to dependencies (
tomli,tomli-w,tomlkit)
Implementation Details
- TOML test suite
- TOML import examples
- TOML documentation
- Backward compatible with JSON files
Dependencies
tomli ^2.0.1for Python <3.11tomli-w ^1.0.0for Python <3.11tomlkit ^0.12.0for Python >=3.11
📦 Version 1.6.0 - Logger Implementation
Major Feature: Custom Logger (#167)
- Loguru Integration
- Custom logger implementation using loguru
- Replaced print statements throughout codebase
- File output support for logs
- Configurable log levels
Logger Features
- Top-level logger access
- Option to get/set log level dynamically
- File output redirection
- pytest integration (log level set to ERROR for tests)
- Logger tests added
Supporting Changes
- Added
tox.inito pyproject.toml - Linux GPUFit library (Ubuntu 22.04 LTS)
- Moved tox.ini to test directory
- kwargs passing for GPU fitter tuning
- More realistic kidney fitting values in JSON files
Bug Fixes
- LOG_LEVEL variable naming
- Removed global variables
- Stopped unwanted file output
- Model-related issues
- Missing segmented S0
🔄 Cross-Version Major Changes
Models Rework (#163, #171)
Implemented across v1.6.0-v1.6.2
-
Model Class Restructuring
- Created base fit model classes
- Moved from wrapper pattern to direct model classes
- Added model properties to dedicated model class
- IVIM model loader implementation
- Mono, Bi, and Tri exponential models
- GPU model constructor
-
Model Improvements
fit_reduced,fit_S0,fit_t1properly pass values- Renamed
reducedtofit_reducedfor clarity - Updated NNLSCV model
- Refactored
*_comment*to*description* - Added S0 model options and tests
-
Segmented Fitting
- Reworked to use two sub-parameter classes
- Fixed component handling improved
- Better S0 and fraction extraction
- Unit and integration tests added
Boundary System Rework (#178, #197)
Implemented across v1.6.1-v1.7.0
-
Individual Boundaries
- Pixel-by-pixel boundary support (
btype) - Individual bounds for fit functions
- GPU fit individual boundaries
- Boundary validity checks
- Pixel-by-pixel boundary support (
-
Structure Changes
- Reworked to altered dict structure
- Boundary order handling
- Default btype and individual bound returns
- Comprehensive test suite
-
Constraint Handling
- Fixed
constrain_typesfor individual bounds - Improved constraint returns
- Better handling of missing f and D values
- Fixed
Parameters Import Update (#109, #184)
Implemented in v1.6.0
-
Dynamic Parameter Handling
- Switched from static file-based to dynamic dict-based
- Better file structure with tables/dicts
- Model parameters from model class directly
- Capitalized boundary keys allowed
-
File Organization
- Moved file fixtures to
_files - Parameter fixtures to
_parameters - Moved parameter files from fitting to parameters directory
- Created dynamic parameter file creator
- Moved file fixtures to
Documentation Improvements (#191)
Implemented in v1.6.2
-
Comprehensive Documentation
- Detailed model descriptions
- IVIM models documentation
- NNLS description
- Example TOML files for different cases
- Fit example scripts
- Extended example descriptions
- Fixed equation expressions
-
Examples
- IVIM parameters file example
- BiExp IVIM TOML
- NNLS fitting script
- FitData IVIM example script
T1 Fitting Fix (#190, #193)
Implemented in v1.6.2
- Added
fit_t1_steamfor models - Tests for new T1 fitting with fixes
- Updated documentation with T1 STEAM option
- Removed model from Args (no longer needed)
- T1 fit check for export
Testing Infrastructure
Continuous improvements across all versions
-
Test Coverage Expansion
- pytest-mock and pytest-cov added
- Fitting tests initialized
- Boundary tests
- GPU fitter tests
- NNLS results tests
- NIfTI tests
- HDF5 tests
- Segmented fitting tests
-
Test Organization
- Moved fixtures to conftest
- Refactored mocks
- Added pytest marks (slow, gpu, ideal)
- Improved test structure
Python Version Support
- Added Python 3.13 support
- Maintained support for 3.9, 3.10, 3.11, 3.12
Code Quality Improvements
Across all versions
- Extensive type hint additions
- Black code formatting
- Ruff import organization
- Removed unused imports and methods
- Improved docstring formats
- Better error handling
- Pyright configuration
🐛 Notable Bug Fixes Summary
Data Handling
- b_values handling (array vs list)
- Shape calculations
- Array dimension handling
- Segmentation key handling with int keys
Fitting
- NNLS model params passing
- kwargs overwriting bools
- MonoExp equation order (exp(D1)*S0)
- fit_s0 addition to params2
- D1 position in first fit
Results
- NNLS results boolean parsing
- Variable array length for NNLS
- Fixed component handling
- S0 and fraction extraction
Configuration
- JSON to params_file conversion
- TOML import issues
- Parameter file path resolution
- Model selection logic
📊 Statistics
- Total Commits: 344
- Major Versions: 4 (v1.6.0, v1.6.1, v1.6.2, v1.7.0)
- Pull Requests: 10+ merged
- Major Features: 4 (Logger, TOML, IVIM Patch, IO Module)
- Major Refactorings: 3 (Models, Boundaries, Parameters)
🎯 Breaking Changes
v1.6.0
- Changed default parameter file handling from static to dynamic
- Model wrapper pattern replaced with direct model classes
Notes
- Most changes maintain backward compatibility
- Configuration file structure enhanced but old formats supported where possible
What's Changed
- update logger by @darksim33 in #166
- v1.6.0: Logger by @darksim33 in #167
- v1.6.1: add toml support by @darksim33 in #168
- v1.7.0: model rework by @darksim33 in #171
- 109-parameters-import-update by @darksim33 in #184
- Update IDEAL with some fixes by @darksim33 in #187
- Update Documentation by @darksim33 in #191
- 190-fix-t1-fitting by @darksim33 in #193
- Update Boundary Rework by @darksim33 in #196
- 178 Rework Boundaries by @darksim33 in #197
- add hdf5 support by @darksim33 in #198
- 195 add IO module by @darksim33 in #199
Full Changelog: v1.5.6...v1.7.0
v1.5.6
Added GPUfit capabilities and reworked models to look the same across CPU and GPU fitting approaches.
The fitting procedure and json parameter files were update to support new functionality. Therefore, parameter files from v1.3.1 or older are no longer supported.
The whole package structure is streamlined to better match the used fitting approaches by introducing new classes for result handling. The multi exponential wrapper was depreciated and is no longer available in favor of explizit models to match GPU fitting. (Might be reintroduced in the future.)
What's Changed
- v1.3.3: direct fitting by @darksim33 in #148
- v1.4.0: Added GPU fitting with pygpufit for CUDA GPUs by @darksim33 in #150
- v1.5.0: Full GPU integration and Model rework c092bb7
- 152-rework-fitting-models by @darksim33 in #158
- v1.5.1: moved IDEAL to branch #156 and remove files from main branch until ideal is working properly 186a7fd
- v1.5.2: updated doc with new fitting and parameter instructions and detail
- 153-update-readme @darksim33 in #159
- v1.5.3: fix typos, conditionals and fit_model issues 94979ca
- v1.5.4: fix s0 and fraction related issues for ivim 10d14b1
- v1.5.5: fix: remove reorder array since all models use the same set of parameters for ivim 2748c4d
- v1.5.6: fix: change fit_type: default is now set in the parameters file but can be overwritten during function calls 09572ea
Full Changelog: v1.3.1...v1.5.6
v1.3.1
What's Changed
- 140-reconstruction-split-ui-and-fitting by @darksim33 in #141
- v1.3.0 RadImgArray implementation and UI removal by @darksim33 in #145
- v1.3.1: results rework patch by @darksim33 in #146
Full Changelog: v1.1.1...v1.3.1
Release v1.1.1
What's Changed
- Changed Fit Results to use Custum dicts by @darksim33 in #121
- Fixed Save results bug by @darksim33 in #127
- Restructured fit_data; fixed AboutDlg Size by @darksim33 in #133
- Added load b-values option for context menu by @darksim33 in #131
- 135-ivim-fixed-parameters by @darksim33 in #136
- 137-python39-support by @darksim33 in #138
Full Changelog: v1.0.0...v1.1.1
Release v1.0
First Pyneapple Release for public repo.
Added main testing and ui properties.
Fitting for IVIM and NNLS is up and Running.
IDEAL is still work in progress.
v0.7.3
Version with new package structure, icons and clean directory
What's Changed
- Update Exp by @darksim33 in #54
- Merge pull request #54 from darksim33/main by @darksim33 in #55
- Update to previous Pull by @darksim33 in #56
- Fitting Dlg Update by @darksim33 in #58
- reg = 0 fitting fix (issue #57) by @JoJas102 in #59
- Fixed Issue #51 by @darksim33 in #63
- Fixed Fit Area Issue #62 by @darksim33 in #64
- Fixed Issue #53 by @darksim33 in #60
- Tidied up imports by @JoJas102 in #67
- Update branch by @darksim33 in #77
- 61 todo management by @JoJas102 in #79
- Scrollbar Update by @darksim33 in #86
- IDEAL Fixes by @darksim33 in #85
- 80 merge nnlsparams and nnlsregparams for consistency reasonable by @JoJas102 in #88
- Fixed Zeropadding by @darksim33 in #89
- 90 revert nnlsreg and nnls merge by @JoJas102 in #91
- 94 spring cleaning for project directory by @JoJas102 in #97
- Reworked the QFileDialogs to use the last_dir property; by @darksim33 in #96
- Pip and Poetry Update by @darksim33 in #103
New Contributors
Full Changelog: v0.7.0...v0.7.3