Skip to content

Commit 897ceb8

Browse files
authored
Merge pull request #66 from rmnldwg/release-1.0.0.a4
Release 1.0.0.a4
2 parents 4069220 + d84f395 commit 897ceb8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+2096
-2954
lines changed

.pre-commit-config.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ repos:
1010
- id: ruff
1111
args: [ --fix ]
1212
- id: ruff-format
13-
- repo: https://github.com/asottile/pyupgrade
14-
rev: v3.16.0
15-
hooks:
16-
- id: pyupgrade
17-
args: [--py310-plus]
1813
- repo: https://github.com/compilerla/conventional-pre-commit
1914
rev: v3.3.0
2015
hooks:

CHANGELOG.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,82 @@
22

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

5+
## [1.0.0.a4] - 2025-01-23
6+
7+
### Bug Fixes
8+
9+
- Update data loading to new lydata API.
10+
- Add sampling config back to sample CLI.
11+
- Finish `data filter` command.
12+
- Correctly log number of excluded pateints in `lyproxify`.
13+
- Allow extra args in CLI cmds.
14+
- Logging during progress bar.
15+
16+
### Documentation
17+
18+
- Deactivate help of removed commands.
19+
- Link only to stable versions.
20+
- Fix intersphinx links.
21+
- Update link to schedule module.
22+
- Configure how pydantic models are displayed.
23+
- Add more info about schema.
24+
- Better explain sampling.
25+
- Add proper info to `cli_cmd()` methods.
26+
27+
### Features
28+
29+
- Add mandatory `version` field to command settings.\
30+
This will allow to differentiate between old and new configs and create
31+
the models accordingly.
32+
- Add translation of old to new model configs.
33+
- Add dynamic YAML config source.
34+
- Configure logging nicely.
35+
- Update `data enhance` command.
36+
- Update `data join` command.
37+
- Update `data filter` command.
38+
- Update `data split` command.
39+
- Capture lydata logging output.
40+
- Update YAML schema for CLIs.
41+
- Update `data lyproxify` cmd.
42+
- Allow sampling only specified params.\
43+
Via a new CLI arg named `param_names` one may restrict the parameters
44+
sampled to a named subset. In combination with the fact that any Python
45+
model may be loaded, this results in an enormously flexible sampler.
46+
- Update inv temp `schedule` cmd.
47+
- Allow providing start state to sampling func.
48+
49+
### Testing
50+
51+
- Replace subprocess calls with monkeypatch.\
52+
This allows for better debugging during test calls.
53+
- Load generated data correctly.\
54+
The synthetic data for testing already has "early" and "late" as
55+
T-stages. Thus, the mapping needed to be adapted.
56+
57+
### Build
58+
59+
- pydantic-settings >= 2.7 needed.
60+
61+
### Change
62+
63+
- Make `version` field in command settings required.
64+
- Use pydantic for subcommands.
65+
- Use loguru over default logging.
66+
- Rename `data` field to `input`.
67+
- Use pydantic for plot utils, too.
68+
- Use rich logging handler.
69+
70+
### Refac
71+
72+
- Slightly change CLI inheritances.
73+
- Sort configs alphabetically.
74+
- Make sampling more reusable.
75+
76+
### Remove
77+
78+
- Unused utility functions.
79+
- Plotting scripts except histogram/betaposterp helpers.
80+
581
## [1.0.0.a3] - 2024-11-15
682

783
### Bug Fixes

README.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
## What are these `lyscripts`?
1010

11-
This package provides convenient scripts for performing inference and learning regarding the lymphatic spread of head & neck cancer. Essentially, it provides a *command line interface* (CLI) to the [lymph](https://github.com/rmnldwg/lymph) library.
11+
This package provides convenient scripts for performing inference and learning regarding the lymphatic spread of head & neck cancer. Essentially, it provides a *command line interface* (CLI) to the [lymph](https://github.com/rmnldwg/lymph) library and the [lydata](https://github.com/rmnldwg/lydata) repository that stores lymphatic progression data.
1212

13-
We are making these "convenience" scripts public, because doing so is one necessary requirement to making our research easily and fully reproducible. There exists another repository, [lynference](https://github.com/rmnldwg/lynference), where we store the pipelines that produce(d) our published results in a persistent way. Head over there to learn more about how to reproduce our work.
13+
We are making these "convenience" scripts public, because doing so is one necessary requirement to making our research easily and fully reproducible. There exists another repository, [lynference](https://github.com/rmnldwg/lynference), where we stored the pipelines that produced our published results in a persistent way.
1414

1515
## Installation
1616

@@ -32,7 +32,7 @@ pip install .
3232

3333
This package is intended to be mainly used as a collection of Python scripts that would be scattered throughout my projects, if I didn't bundle them here. Hence, they're mostly command line tools that do basic and repetitive stuff.
3434

35-
### As a command line tool
35+
### As a Command Line Tool
3636

3737
Simply run
3838

@@ -44,8 +44,24 @@ in your terminal and let the output guide you through the functions of the progr
4444

4545
You can also refer to the [documentation] for a written-down version of all these help texts and even more context on how and why to use the provided commands.
4646

47-
### As a library
47+
### As a Library
4848

4949
Head over to the [documentation] for more information on the individual modules, classes, and functions that are implemented in this package.
5050

5151
[documentation]: https://lyscripts.readthedocs.io
52+
53+
### Configuration YAML Schema
54+
55+
Most of the CLI commands allow passing a list of `--configs` in the form of YAML files. If for a particular CLI argument no value is passed directly, the program looks for the corresponding value in the merged YAML files (if multiple files are provided, later ones may overwrite earlier ones).
56+
57+
For these YAML files we provide a unified schema containing all possible fields that any of the CLIs may accept. It is located at `schemas/ly.json` in this repository. So, one could configure e.g. VS Code to consider this schema for all `*.ly.yaml` files. Here is how that could look like in the JSON settings of VS Code:
58+
59+
```json
60+
{
61+
"yaml.schemas": {
62+
"https://raw.githubusercontent.com/rmnldwg/lyscripts/main/schemas/ly.json": "*.ly.yaml"
63+
}
64+
}
65+
```
66+
67+
Subsequently, all files ending in `.ly.yaml` will have helpful autocompletion on the allowed/expected types available.

docs/source/compute/init.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. currentmodule:: lyscripts.compute
22

3-
Precomputing Quantitites
4-
========================
3+
Model Predictions
4+
=================
55

66
.. automodule:: lyscripts.compute
77
:members:

docs/source/compute/posteriors.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Posterior State Distributions
55

66
.. automodule:: lyscripts.compute.posteriors
77
:members:
8+
:show-inheritance:
89

910
Command Help
1011
------------

docs/source/compute/prevalences.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Predict Prevalence of Involvement
55

66
.. automodule:: lyscripts.compute.prevalences
77
:members:
8+
:show-inheritance:
89

910
Command Help
1011
------------

docs/source/compute/priors.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Prior State Distributions
55

66
.. automodule:: lyscripts.compute.priors
77
:members:
8+
:show-inheritance:
89

910
Command Help
1011
------------

docs/source/compute/risks.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
.. currentmodule:: lyscripts.compute.risks
22

3-
Predict Risk of Involvement
3+
Compute Risk of Involvement
44
===========================
55

66
.. automodule:: lyscripts.compute.risks
77
:members:
8+
:show-inheritance:
89

910
Command Help
1011
------------

docs/source/compute/utils.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ Helpers for Computing Quantities
55

66
.. automodule:: lyscripts.compute.utils
77
:members:
8+
:show-inheritance:

docs/source/conf.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,24 @@
4848
# create links to other projects
4949
intersphinx_mapping = {
5050
"python": ("https://docs.python.org/3.10", None),
51-
"lymph": ("https://lymph-model.readthedocs.io/latest/", None),
51+
"lymph": ("https://lymph-model.readthedocs.io/stable/", None),
5252
"pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None),
5353
"numpy": ("https://numpy.org/doc/stable/", None),
54-
"lydata": ("https://lydata.readthedocs.io/latest/", None),
54+
"lydata": ("https://lydata.readthedocs.io/stable/", None),
55+
"emcee": ("https://emcee.readthedocs.io/en/stable/", None),
5556
}
5657

58+
# autodoc_pydantic settings
59+
autodoc_pydantic_model_show_config_summary = False
60+
autodoc_pydantic_model_show_validator_members = False
61+
autodoc_pydantic_model_show_field_summary = False
62+
autodoc_pydantic_model_member_order = "bysource"
63+
autodoc_pydantic_settings_show_config_summary = False
64+
autodoc_pydantic_settings_show_validator_members = False
65+
autodoc_pydantic_settings_show_field_summary = False
66+
autodoc_pydantic_settings_member_order = "bysource"
67+
autodoc_pydantic_field_show_constraints = False
68+
5769

5870
# -- Options for HTML output -------------------------------------------------
5971

0 commit comments

Comments
 (0)