Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
58dc278
merge: branch 'main' into 'dev'
rmnldwg Jul 23, 2025
84019bd
chore: add missing links to changelog
rmnldwg Jul 23, 2025
da05e73
change: make compatible with new lydata version
rmnldwg Jul 24, 2025
66a7c96
feat: add `integrate` command for thermodynamic integration
noemibuehrer Jul 28, 2025
0b27d37
feat (compute): add `evidence` command for computing model evidence w…
noemibuehrer Jul 29, 2025
b768022
build: fix lydata to commit ID for now
rmnldwg Jul 31, 2025
5935206
build: bump lydata package
rmnldwg Jul 31, 2025
b72d2fe
fix: change "info" to "core" for midlvl lydata col
rmnldwg Jul 31, 2025
305e3b0
docs: update documentation for `integrate` and `evidence` commands
noemibuehrer Aug 5, 2025
74551fe
build: fix tmp new lydata package version
rmnldwg Aug 5, 2025
5f1d089
build: pin fixed lydata again
rmnldwg Aug 6, 2025
e2311bd
change: centralize inv temp schedule generation
rmnldwg Aug 13, 2025
f9f0995
merge: branch 'make-compatible' into 'dev'
rmnldwg Aug 13, 2025
663bd69
change: store selected loglevel globally
rmnldwg Aug 13, 2025
ef6f51b
feat: add collector utility/command
rmnldwg Aug 13, 2025
0bc2a64
docs: improve collect description
rmnldwg Aug 13, 2025
1bb0cbf
chore: add CITATION.cff
rmnldwg Aug 15, 2025
73e6068
build: add uvicorn, fastapi to deps
rmnldwg Aug 18, 2025
fbff102
change: disable properties in collector
rmnldwg Aug 18, 2025
4d49a9f
fix: use fixed lydata `.enhance()` method
rmnldwg Aug 26, 2025
18d4466
merge: branch 'lydata-collector' into 'dev'
rmnldwg Aug 26, 2025
7cddc7a
test: update tests for new lydata
rmnldwg Aug 26, 2025
255af68
build: require at least lydata 0.4.0
rmnldwg Sep 4, 2025
e4f38fa
chore: update changelog
rmnldwg Sep 4, 2025
8e3f032
change: update JSON schema for YAML files
rmnldwg Sep 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 43 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,44 @@

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

## [1.0.0] - 2025-09-04

### Bug Fixes

- Change `info` to `core` for mid-level lydata columns
- Use bug-fixed lydata `.ly.enhance()` method.

### Documentation

- Update documentation for `integrate` and `evidence` commands.
- Improve `data collect` description.

### Features

- Add `integrate` command for thermodynamic integration. Thanks [@noemibuehrer]!
- Add command spawning websever for interactive data collection.

### Miscellaneous Tasks

- Add missing links to changelog.
- Add CITATION.cff.

### Testing

- Update tests for new lydata.

### Build

- Add uvicorn, fastapi to deps.
- Require at least lydata 0.4.0.

### Change

- Make compatible with new lyDATA version.
- Centralize inverse temperature schedule generation.
- Store selected log-level globally.
- Disable properties in collector.

## [1.0.0rc3] - 2025-07-22

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

<!-- markdownlint-disable-file MD024 -->
[1.0.0]: https://github.com/lycosystem/lyscripts/compare/1.0.0rc3...1.0.0
[1.0.0rc3]: https://github.com/lycosystem/lyscripts/compare/1.0.0rc2...1.0.0rc3
[1.0.0rc2]: https://github.com/lycosystem/lyscripts/compare/1.0.0rc1...1.0.0rc2
[1.0.0rc1]: https://github.com/lycosystem/lyscripts/compare/1.0.0.a7...1.0.0rc1
[1.0.0.a7]: https://github.com/lycosystem/lyscripts/compare/1.0.0.a6...1.0.0.a7
Expand Down Expand Up @@ -931,8 +971,10 @@ returns `None` instead. Fixes [#11]
[#70]: https://github.com/lycosystem/lyscripts/issues/70
[#72]: https://github.com/lycosystem/lyscripts/issues/72
[#74]: https://github.com/lycosystem/lyscripts/issues/74
[#75]: https://github.com/lycosystem/lyscripts/issues/75

[`emcee`]: https://emcee.readthedocs.io/en/stable/
[`rich`]: https://rich.readthedocs.io/en/latest/
[`rich_argparse`]: https://github.com/hamdanal/rich_argparse
[LyProX]: https://lyprox.org
[@noemibuehrer]: https://github.com/noemibuehrer
25 changes: 25 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: lyscripts
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Roman
family-names: Ludwig
orcid: 'https://orcid.org/0000-0001-9434-328X'
affiliation: University Hospital Zurich
repository-code: 'https://github.com/lycosystem/lyscripts'
url: 'https://lyscripts.readthedocs.io'
abstract: >-
Scripts for reproducible research on lymphatic tumor
progression in head and neck cancer.
keywords:
- cancer
- metastasis
- lymphatic system
- head and neck
license: MIT
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

## What are these `lyscripts`?

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

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.

Expand Down Expand Up @@ -41,7 +41,11 @@ Simply run
lyscripts --help
```

in your terminal and let the output guide you through the functions of the program.
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.

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.

<!--- ### --->

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.

Expand Down
13 changes: 13 additions & 0 deletions docs/source/data/collect.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. currentmodule:: lyscripts.data.collect

Collect lyDATA Tables Interactively
===================================

.. automodule:: lyscripts.data.collect
:members:
:show-inheritance:

Command Help
------------

.. program-output:: lyscripts data collect --help
1 change: 1 addition & 0 deletions docs/source/data/init.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Submodules
.. toctree::
:maxdepth: 1

collect
lyproxify
join
split
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Introduction


.. include:: ../../README.md
:end-line: 30
:end-before: <!--- ### --->
:parser: myst_parser.sphinx_


Expand Down
20 changes: 14 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ dependencies = [
"pydantic",
"pydantic-settings >= 2.7.0, != 2.9.1, != 2.9.0",
"numpydantic",
"lydata >= 0.3.3",
"loguru",
"fastapi",
"uvicorn",
"lydata >= 0.4.0",
]
dynamic = ["version"]

Expand Down Expand Up @@ -81,9 +83,18 @@ dev = [
[project.scripts]
lyscripts = "lyscripts:main"

[tool.setuptools]
include-package-data = true

[tool.setuptools.packages.find]
where = ["src"]

[tool.setuptools.package-data]
"lyscripts" = [
"src/lyscripts/data/collect/collector.js",
"src/lyscripts/data/collect/index.html",
]

[tool.setuptools_scm]
write_to = "src/lyscripts/_version.py"
local_scheme = "no-local-version"
Expand Down Expand Up @@ -191,10 +202,7 @@ skip_tags = "v0.1.0-beta.1"
ignore_tags = ""
# sort the tags topologically
topo_order = false
# sort the commits inside sections by oldest/newest order
sort_commits = "oldest"

[tool.uv.sources]
lydata = { path = "../lydata-package", editable = true }
# limit the number of commits included in the changelog.
# limit_commits = 42
# sort the commits inside sections by oldest/newest order
sort_commits = "oldest"
105 changes: 98 additions & 7 deletions schemas/ly.json
Original file line number Diff line number Diff line change
Expand Up @@ -308,18 +308,46 @@
"type": "string"
},
"repo_name": {
"default": "rmnldwg/lydata",
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"default": "lycosystem/lydata",
"description": "GitHub `repository/owner`.",
"minLength": 1,
"title": "Repo Name",
"type": "string"
"title": "Repo Name"
},
"ref": {
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"default": "main",
"description": "Branch/tag/commit of the repo.",
"minLength": 1,
"title": "Ref",
"type": "string"
"title": "Ref"
},
"local_dataset_dir": {
"anyOf": [
{
"format": "directory-path",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"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`.",
"title": "Local Dataset Dir"
}
},
"required": [
Expand Down Expand Up @@ -501,6 +529,19 @@
"title": "Relative Thresh",
"type": "number"
},
"burnin_steps": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Number of burn-in steps to take. If None, burn-in runs until convergence.",
"title": "Burnin Steps"
},
"num_steps": {
"anyOf": [
{
Expand Down Expand Up @@ -623,6 +664,52 @@
],
"title": "ScenarioConfig",
"type": "object"
},
"ScheduleConfig": {
"description": "Configuration for generating a schedule of inverse temperatures.",
"properties": {
"method": {
"default": "power",
"description": "Method to generate the inverse temperature schedule.",
"enum": [
"geometric",
"linear",
"power"
],
"title": "Method",
"type": "string"
},
"num": {
"default": 32,
"description": "Number of inverse temperatures in the schedule.",
"title": "Num",
"type": "integer"
},
"power": {
"default": 4.0,
"description": "If a power schedule is chosen, use this as power.",
"title": "Power",
"type": "number"
},
"values": {
"anyOf": [
{
"items": {
"type": "number"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "List of inverse temperatures to use instead of generating a schedule. If a list is provided, the other parameters are ignored.",
"title": "Values"
}
},
"title": "ScheduleConfig",
"type": "object"
}
},
"description": "Settings for generating a JSON schema for lyscripts configuration files.",
Expand Down Expand Up @@ -685,6 +772,10 @@
},
"title": "Scenarios",
"type": "array"
},
"schedule": {
"$ref": "#/$defs/ScheduleConfig",
"default": null
}
},
"required": [
Expand Down
3 changes: 2 additions & 1 deletion src/lyscripts/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
CliSubCommand,
)

from lyscripts import compute, data, sample, schedule # noqa: F401
from lyscripts import compute, data, integrate, sample, schedule # noqa: F401
from lyscripts._version import version
from lyscripts.cli import assemble_main, configure_logging
from lyscripts.utils import console
Expand Down Expand Up @@ -51,6 +51,7 @@ class LyscriptsCLI(BaseSettings):
sample: CliSubCommand[sample.SampleCLI]
compute: CliSubCommand[compute.ComputeCLI]
schedule: CliSubCommand[schedule.ScheduleCLI]
integrate: CliSubCommand[integrate.IntegrateCLI]

def __init__(self, **kwargs):
"""Add logging configuration to the lyscripts CLI."""
Expand Down
Loading
Loading