Commit 32f120d
Complete Model v2 wrapper implementation with shift parameters (#180)
* Complete Model v2 wrapper implementation with shift parameters (#172)
Implements comprehensive Model wrapper for jaxmodels backend with wide format
API, shift parameters, and extensive test coverage.
Key Features:
- Wide format get_mutations_df(): One row per mutation with beta_{condition}
and shift_{condition} columns (matches v1 API)
- Shift parameters automatically calculated as β_condition - β_reference
- Extended Model.fit() to expose advanced jaxmodels parameters via kwargs
(beta_clip_range, ge_kwargs, cal_kwargs, loss_kwargs)
- 24 comprehensive tests in test_model_v2.py covering all Model v2 functionality
- Updated jaxmodels_simulation_fits.ipynb to use Model wrapper API
Changes:
- multidms/model.py: Complete v2 Model wrapper implementation
- multidms/jaxmodels.py: Fixed type hints
- tests/test_model_v2.py: 24 comprehensive tests (NEW)
- tests/test_data.py: Commented out v1 Model tests
- notebooks/jaxmodels/jaxmodels_simulation_fits.ipynb: Updated to Model API
Tests: 61 passed, 1 skipped
All linting and formatting checks pass
Closes #172
Related: #173, #178, #179
* Fix CI: Exclude deprecated files from ruff linting
Add biophysical.py and model_v1_backup.py to ruff exclude list in pyproject.toml.
These are deprecated/backup files that should not block CI.
* Remove deprecated files from repository
Remove biophysical.py and model_v1_backup.py from version control as they
are no longer needed for v2 implementation. These were causing CI linting
failures and are superseded by the new jaxmodels-based Model wrapper.
Users can access v1 functionality by using multidms v1.x releases.
Changes:
- Removed multidms/biophysical.py (deprecated with ImportError)
- Removed multidms/model_v1_backup.py (backup of old implementation)
- Cleaned up pyproject.toml excludes (no longer needed)
* Optimize test_model.py for faster execution
- Replace test_model_v2.py with optimized test_model.py
- Add session-scoped data fixtures to avoid repeated creation
- Add module-scoped fitted model fixtures shared across tests
- Reduce iteration counts where sufficient (maxiter 5→3, 20→10)
- Expected ~3-4x speedup from fixture reuse and reduced iterations
- All 28 tests retained with 61 passed, 1 skipped
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
* Fix docs build errors in CI
- Fix CHANGELOG.rst link syntax (proper RST format)
- Fix jaxtyping array shape annotation (space not comma)
Fixes errors:
- "Unknown target name" in CHANGELOG.rst line 33
- "Axes should be separated with spaces, not commas" in jaxmodels.py
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
* remove unnecessary spec files, and simulated data
* remove old REFACTOR PLAN
* remove unnecessary claude commands
* update gitignore
---------
Co-authored-by: Claude <[email protected]>1 parent c927da0 commit 32f120d
File tree
20 files changed
+1275056
-2794
lines changed- multidms
- notebooks
- jaxmodels
- output
- scaled_down_parameter_output
- tests
20 files changed
+1275056
-2794
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
10 | 23 | | |
11 | 24 | | |
12 | 25 | | |
| |||
171 | 184 | | |
172 | 185 | | |
173 | 186 | | |
174 | | - | |
| 187 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
0 commit comments