|
2 | 2 |
|
3 | 3 | ## Priority 1: Critical Fixes |
4 | 4 |
|
5 | | -### 1. Fix `__init__.py` Import Issues |
6 | | - |
7 | | -Update `gen_surv/__init__.py` to include missing imports: |
8 | | - |
9 | | -```python |
10 | | -# Add these imports |
11 | | -from .aft import gen_aft_log_logistic |
12 | | -from .competing_risks import gen_competing_risks, gen_competing_risks_weibull |
13 | | -from .mixture import gen_mixture_cure, cure_fraction_estimate |
14 | | -from .piecewise import gen_piecewise_exponential |
15 | | - |
16 | | -# Update __all__ to include: |
17 | | -__all__ = [ |
18 | | - # ... existing exports ... |
19 | | - "gen_aft_log_logistic", |
20 | | - "gen_competing_risks", |
21 | | - "gen_competing_risks_weibull", |
22 | | - "gen_mixture_cure", |
23 | | - "cure_fraction_estimate", |
24 | | - "gen_piecewise_exponential", |
25 | | -] |
26 | | -``` |
27 | | - |
28 | | -### 2. Add Missing Validators |
29 | | - |
30 | | -Create validation functions in `validate.py`: |
31 | | - |
32 | | -```python |
33 | | -def validate_gen_aft_weibull_inputs(n, beta, shape, scale, model_cens, cens_par): |
34 | | - # Add validation logic |
35 | | - |
36 | | -def validate_gen_aft_log_logistic_inputs(n, beta, shape, scale, model_cens, cens_par): |
37 | | - # Add validation logic |
38 | | - |
39 | | -def validate_competing_risks_inputs(n, n_risks, baseline_hazards, betas, model_cens, cens_par): |
40 | | - # Add validation logic |
41 | | -``` |
42 | | - |
43 | | -### 3. Update CLI Integration |
44 | | - |
45 | | -Modify `cli.py` to handle all available models: |
46 | | - |
47 | | -```python |
48 | | -# Add support for competing_risks, mixture, and piecewise models |
49 | | -# Update parameter handling for each model type |
50 | | -``` |
| 5 | +- [x] **Fix `__init__.py` Import Issues** |
| 6 | + - Ensure missing imports for new generators are added and exported via `__all__`. |
51 | 7 |
|
52 | | -## Priority 2: Version Consistency |
53 | | - |
54 | | -### Update Version Numbers |
| 8 | +- [x] **Add Missing Validators** |
| 9 | + - Create validation helpers for AFT Weibull, AFT log-logistic, and competing risks generators. |
55 | 10 |
|
56 | | -1. **CITATION.cff**: Change version from "1.0.3" to "1.0.8" |
57 | | -2. **docs/source/conf.py**: Change release from '1.0.3' to '1.0.8' |
| 11 | +- [x] **Update CLI Integration** |
| 12 | + - Support competing risks, mixture cure, and piecewise exponential models. |
58 | 13 |
|
59 | | -## Priority 3: Testing and Documentation |
| 14 | +## Priority 2: Version Consistency |
60 | 15 |
|
61 | | -### Add Missing Tests |
| 16 | +- [x] **Update Version Numbers** |
| 17 | + - `CITATION.cff` and `docs/source/conf.py` now reference version 1.0.8. |
62 | 18 |
|
63 | | -Create test files: |
64 | | -- `tests/test_censoring.py` |
65 | | -- `tests/test_mixture.py` |
66 | | -- `tests/test_piecewise.py` |
67 | | -- `tests/test_summary.py` |
68 | | -- `tests/test_visualization.py` |
| 19 | +## Priority 3: Testing and Documentation |
69 | 20 |
|
70 | | -### Update Documentation |
| 21 | +- [x] **Add Missing Tests** |
| 22 | + - Added tests for censoring helpers, mixture cure, piecewise exponential, summary, and visualization. |
71 | 23 |
|
72 | | -1. Add competing risks, mixture, and piecewise models to `theory.md` |
73 | | -2. Update examples in documentation to include new models |
| 24 | +- [x] **Update Documentation** |
| 25 | + - Documented competing risks, mixture cure, and piecewise exponential models. |
74 | 26 |
|
75 | 27 | ## Priority 4: Code Quality Improvements |
76 | 28 |
|
77 | | -### Standardize Parameter Naming |
78 | | - |
79 | | -- Consistently use `covariate_cols` instead of mixing `covar` and `covariate_cols` |
80 | | -- Standardize return column names across all models |
| 29 | +- [x] **Standardize Parameter Naming** |
| 30 | + - Replaced the `covar` parameter with `covariate_range` and standardized return columns to `X0`. |
81 | 31 |
|
82 | | -### Add Type Hints |
83 | | - |
84 | | -Complete type hints for all public functions, especially in: |
85 | | -- `mixture.py` |
86 | | -- `piecewise.py` |
87 | | -- `summary.py` |
| 32 | +- [x] **Add Type Hints** |
| 33 | + - Completed type hints for public functions in `mixture.py`, `piecewise.py`, and `summary.py`. |
88 | 34 |
|
89 | 35 | ## Verification Steps |
| 36 | +- [x] `python -c "from gen_surv import gen_aft_log_logistic, gen_competing_risks"` |
| 37 | +- [x] `python -m gen_surv dataset competing_risks --n 10` |
| 38 | +- [x] `pytest -q` |
| 39 | +- [x] `python scripts/check_version_match.py` |
| 40 | +- [x] `sphinx-build docs/source docs/build` |
90 | 41 |
|
91 | | -After implementing fixes: |
92 | | - |
93 | | -1. **Test imports**: `python -c "from gen_surv import gen_aft_log_logistic, gen_competing_risks"` |
94 | | -2. **Test CLI**: `python -m gen_surv dataset competing_risks --n 10` |
95 | | -3. **Run full test suite**: `poetry run pytest` |
96 | | -4. **Check version consistency**: `python scripts/check_version_match.py` |
97 | | -5. **Build docs**: `poetry run sphinx-build docs/source docs/build` |
| 42 | +## Status |
98 | 43 |
|
99 | | -## Impact Assessment |
| 44 | +All fix recommendations have been implemented in version 1.0.8. |
100 | 45 |
|
101 | | -These fixes will: |
102 | | -- ✅ Eliminate ImportError exceptions for users |
103 | | -- ✅ Make all models accessible via public API |
104 | | -- ✅ Ensure CLI works for all supported models |
105 | | -- ✅ Improve user experience and API consistency |
106 | | -- ✅ Maintain backward compatibility |
| 46 | +Verified as of commit `7daa3e1`. |
0 commit comments