Skip to content

Commit 511934d

Browse files
authored
Merge pull request #79 from lycosystem/release-1.0.0
Release 1.0.0
2 parents f0ee0b4 + 8e3f032 commit 511934d

27 files changed

Lines changed: 1053 additions & 112 deletions

CHANGELOG.md

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,44 @@
22

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

5+
## [1.0.0] - 2025-09-04
6+
7+
### Bug Fixes
8+
9+
- Change `info` to `core` for mid-level lydata columns
10+
- Use bug-fixed lydata `.ly.enhance()` method.
11+
12+
### Documentation
13+
14+
- Update documentation for `integrate` and `evidence` commands.
15+
- Improve `data collect` description.
16+
17+
### Features
18+
19+
- Add `integrate` command for thermodynamic integration. Thanks [@noemibuehrer]!
20+
- Add command spawning websever for interactive data collection.
21+
22+
### Miscellaneous Tasks
23+
24+
- Add missing links to changelog.
25+
- Add CITATION.cff.
26+
27+
### Testing
28+
29+
- Update tests for new lydata.
30+
31+
### Build
32+
33+
- Add uvicorn, fastapi to deps.
34+
- Require at least lydata 0.4.0.
35+
36+
### Change
37+
38+
- Make compatible with new lyDATA version.
39+
- Centralize inverse temperature schedule generation.
40+
- Store selected log-level globally.
41+
- Disable properties in collector.
42+
543
## [1.0.0rc3] - 2025-07-22
644

745
### Documentation
@@ -356,7 +394,7 @@ over diagnosis times cannot be converted to a `DistributionConfig`.
356394
BREAKING CHANGES: `generate` command is better configurable
357395
- (**config**) Merge sample/sampling configs.
358396
- Use lydata's `ModalityConfig`.\
359-
Since the [lydata](https://github.com/rmnldwg/lydata) package is
397+
Since the [lydata](https://github.com/lycosystem/lydata) package is
360398
evolving quickly, I added it as a dependency and moved the first bit of
361399
code over there.
362400
- Enable use of lydata to load patient data.
@@ -871,6 +909,8 @@ returns `None` instead. Fixes [#11]
871909
## [0.5.3] - 2022-08-22
872910

873911
<!-- markdownlint-disable-file MD024 -->
912+
[1.0.0]: https://github.com/lycosystem/lyscripts/compare/1.0.0rc3...1.0.0
913+
[1.0.0rc3]: https://github.com/lycosystem/lyscripts/compare/1.0.0rc2...1.0.0rc3
874914
[1.0.0rc2]: https://github.com/lycosystem/lyscripts/compare/1.0.0rc1...1.0.0rc2
875915
[1.0.0rc1]: https://github.com/lycosystem/lyscripts/compare/1.0.0.a7...1.0.0rc1
876916
[1.0.0.a7]: https://github.com/lycosystem/lyscripts/compare/1.0.0.a6...1.0.0.a7
@@ -931,8 +971,10 @@ returns `None` instead. Fixes [#11]
931971
[#70]: https://github.com/lycosystem/lyscripts/issues/70
932972
[#72]: https://github.com/lycosystem/lyscripts/issues/72
933973
[#74]: https://github.com/lycosystem/lyscripts/issues/74
974+
[#75]: https://github.com/lycosystem/lyscripts/issues/75
934975

935976
[`emcee`]: https://emcee.readthedocs.io/en/stable/
936977
[`rich`]: https://rich.readthedocs.io/en/latest/
937978
[`rich_argparse`]: https://github.com/hamdanal/rich_argparse
938979
[LyProX]: https://lyprox.org
980+
[@noemibuehrer]: https://github.com/noemibuehrer

CITATION.cff

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# This CITATION.cff file was generated with cffinit.
2+
# Visit https://bit.ly/cffinit to generate yours today!
3+
4+
cff-version: 1.2.0
5+
title: lyscripts
6+
message: >-
7+
If you use this software, please cite it using the
8+
metadata from this file.
9+
type: software
10+
authors:
11+
- given-names: Roman
12+
family-names: Ludwig
13+
orcid: 'https://orcid.org/0000-0001-9434-328X'
14+
affiliation: University Hospital Zurich
15+
repository-code: 'https://github.com/lycosystem/lyscripts'
16+
url: 'https://lyscripts.readthedocs.io'
17+
abstract: >-
18+
Scripts for reproducible research on lymphatic tumor
19+
progression in head and neck cancer.
20+
keywords:
21+
- cancer
22+
- metastasis
23+
- lymphatic system
24+
- head and neck
25+
license: MIT

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
## What are these `lyscripts`?
1111

12-
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/lycosystem/lymph) library and the [lydata](https://github.com/rmnldwg/lydata) repository that stores lymphatic progression data.
12+
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/lycosystem/lymph) library and the [lydata](https://github.com/lycosystem/lydata) repository that stores lymphatic progression data.
1313

1414
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/lycosystem/lynference), where we stored the pipelines that produced our published results in a persistent way.
1515

@@ -41,7 +41,11 @@ Simply run
4141
lyscripts --help
4242
```
4343

44-
in your terminal and let the output guide you through the functions of the program.
44+
in your terminal to display the help text for the main command. It will list all subcommands that are avialable, which you can then also call with `lyscripts <subcommand> --help` to get more information on its use and the available arguments.
45+
46+
For example, one subcommand is `lyscripts data collect`, which will launch a small web server that allows a user to enter patient records on lymphatic involvement in head and neck cancer one row at a time and construct a standardized CSV file from it.
47+
48+
<!--- ### --->
4549

4650
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.
4751

docs/source/data/collect.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.. currentmodule:: lyscripts.data.collect
2+
3+
Collect lyDATA Tables Interactively
4+
===================================
5+
6+
.. automodule:: lyscripts.data.collect
7+
:members:
8+
:show-inheritance:
9+
10+
Command Help
11+
------------
12+
13+
.. program-output:: lyscripts data collect --help

docs/source/data/init.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Submodules
1919
.. toctree::
2020
:maxdepth: 1
2121

22+
collect
2223
lyproxify
2324
join
2425
split

docs/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Introduction
88

99

1010
.. include:: ../../README.md
11-
:end-line: 30
11+
:end-before: <!--- ### --->
1212
:parser: myst_parser.sphinx_
1313

1414

pyproject.toml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,10 @@ dependencies = [
5050
"pydantic",
5151
"pydantic-settings >= 2.7.0, != 2.9.1, != 2.9.0",
5252
"numpydantic",
53-
"lydata >= 0.3.3",
5453
"loguru",
54+
"fastapi",
55+
"uvicorn",
56+
"lydata >= 0.4.0",
5557
]
5658
dynamic = ["version"]
5759

@@ -81,9 +83,18 @@ dev = [
8183
[project.scripts]
8284
lyscripts = "lyscripts:main"
8385

86+
[tool.setuptools]
87+
include-package-data = true
88+
8489
[tool.setuptools.packages.find]
8590
where = ["src"]
8691

92+
[tool.setuptools.package-data]
93+
"lyscripts" = [
94+
"src/lyscripts/data/collect/collector.js",
95+
"src/lyscripts/data/collect/index.html",
96+
]
97+
8798
[tool.setuptools_scm]
8899
write_to = "src/lyscripts/_version.py"
89100
local_scheme = "no-local-version"
@@ -191,10 +202,7 @@ skip_tags = "v0.1.0-beta.1"
191202
ignore_tags = ""
192203
# sort the tags topologically
193204
topo_order = false
194-
# sort the commits inside sections by oldest/newest order
195-
sort_commits = "oldest"
196-
197-
[tool.uv.sources]
198-
lydata = { path = "../lydata-package", editable = true }
199205
# limit the number of commits included in the changelog.
200206
# limit_commits = 42
207+
# sort the commits inside sections by oldest/newest order
208+
sort_commits = "oldest"

schemas/ly.json

Lines changed: 98 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -308,18 +308,46 @@
308308
"type": "string"
309309
},
310310
"repo_name": {
311-
"default": "rmnldwg/lydata",
311+
"anyOf": [
312+
{
313+
"minLength": 1,
314+
"type": "string"
315+
},
316+
{
317+
"type": "null"
318+
}
319+
],
320+
"default": "lycosystem/lydata",
312321
"description": "GitHub `repository/owner`.",
313-
"minLength": 1,
314-
"title": "Repo Name",
315-
"type": "string"
322+
"title": "Repo Name"
316323
},
317324
"ref": {
325+
"anyOf": [
326+
{
327+
"minLength": 1,
328+
"type": "string"
329+
},
330+
{
331+
"type": "null"
332+
}
333+
],
318334
"default": "main",
319335
"description": "Branch/tag/commit of the repo.",
320-
"minLength": 1,
321-
"title": "Ref",
322-
"type": "string"
336+
"title": "Ref"
337+
},
338+
"local_dataset_dir": {
339+
"anyOf": [
340+
{
341+
"format": "directory-path",
342+
"type": "string"
343+
},
344+
{
345+
"type": "null"
346+
}
347+
],
348+
"default": null,
349+
"description": "Path to directory containing all the dataset subdirectories. So, e.g. if `path_on_disk` is `~/datasets` and the dataset is `2023-clb-multisite`, then the CSV file is expected to be at `~/datasets/2023-clb-multisite/data.csv`.",
350+
"title": "Local Dataset Dir"
323351
}
324352
},
325353
"required": [
@@ -501,6 +529,19 @@
501529
"title": "Relative Thresh",
502530
"type": "number"
503531
},
532+
"burnin_steps": {
533+
"anyOf": [
534+
{
535+
"type": "integer"
536+
},
537+
{
538+
"type": "null"
539+
}
540+
],
541+
"default": null,
542+
"description": "Number of burn-in steps to take. If None, burn-in runs until convergence.",
543+
"title": "Burnin Steps"
544+
},
504545
"num_steps": {
505546
"anyOf": [
506547
{
@@ -623,6 +664,52 @@
623664
],
624665
"title": "ScenarioConfig",
625666
"type": "object"
667+
},
668+
"ScheduleConfig": {
669+
"description": "Configuration for generating a schedule of inverse temperatures.",
670+
"properties": {
671+
"method": {
672+
"default": "power",
673+
"description": "Method to generate the inverse temperature schedule.",
674+
"enum": [
675+
"geometric",
676+
"linear",
677+
"power"
678+
],
679+
"title": "Method",
680+
"type": "string"
681+
},
682+
"num": {
683+
"default": 32,
684+
"description": "Number of inverse temperatures in the schedule.",
685+
"title": "Num",
686+
"type": "integer"
687+
},
688+
"power": {
689+
"default": 4.0,
690+
"description": "If a power schedule is chosen, use this as power.",
691+
"title": "Power",
692+
"type": "number"
693+
},
694+
"values": {
695+
"anyOf": [
696+
{
697+
"items": {
698+
"type": "number"
699+
},
700+
"type": "array"
701+
},
702+
{
703+
"type": "null"
704+
}
705+
],
706+
"default": null,
707+
"description": "List of inverse temperatures to use instead of generating a schedule. If a list is provided, the other parameters are ignored.",
708+
"title": "Values"
709+
}
710+
},
711+
"title": "ScheduleConfig",
712+
"type": "object"
626713
}
627714
},
628715
"description": "Settings for generating a JSON schema for lyscripts configuration files.",
@@ -685,6 +772,10 @@
685772
},
686773
"title": "Scenarios",
687774
"type": "array"
775+
},
776+
"schedule": {
777+
"$ref": "#/$defs/ScheduleConfig",
778+
"default": null
688779
}
689780
},
690781
"required": [

src/lyscripts/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
CliSubCommand,
1818
)
1919

20-
from lyscripts import compute, data, sample, schedule # noqa: F401
20+
from lyscripts import compute, data, integrate, sample, schedule # noqa: F401
2121
from lyscripts._version import version
2222
from lyscripts.cli import assemble_main, configure_logging
2323
from lyscripts.utils import console
@@ -51,6 +51,7 @@ class LyscriptsCLI(BaseSettings):
5151
sample: CliSubCommand[sample.SampleCLI]
5252
compute: CliSubCommand[compute.ComputeCLI]
5353
schedule: CliSubCommand[schedule.ScheduleCLI]
54+
integrate: CliSubCommand[integrate.IntegrateCLI]
5455

5556
def __init__(self, **kwargs):
5657
"""Add logging configuration to the lyscripts CLI."""

0 commit comments

Comments
 (0)