Metadata-Version: 2.4
Name: lyscripts
Version: 1.0.0
Summary: Package to interact with lymphatic progression data and models.
Author-email: Roman Ludwig <roman.ludwig@usz.ch>
License: MIT
Project-URL: source, https://github.com/lycosystem/lyscripts
Project-URL: documentation, https://lyscripts.readthedocs.io
Keywords: scripts,lymph,inference
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: emcee
Requires-Dist: h5py
Requires-Dist: tables
Requires-Dist: matplotlib
Requires-Dist: corner
Requires-Dist: scipy
Requires-Dist: xlrd
Requires-Dist: rich
Requires-Dist: rich-argparse
Requires-Dist: pyyaml
Requires-Dist: lymph-model>=1.3.3
Requires-Dist: deprecated
Requires-Dist: joblib
Requires-Dist: pydantic
Requires-Dist: pydantic-settings!=2.9.0,!=2.9.1,>=2.7.0
Requires-Dist: numpydantic
Requires-Dist: loguru
Requires-Dist: fastapi
Requires-Dist: uvicorn
Requires-Dist: lydata>=0.4.0
Provides-Extra: docs
Requires-Dist: sphinx; extra == "docs"
Requires-Dist: sphinx-book-theme; extra == "docs"
Requires-Dist: sphinx-autodoc-typehints; extra == "docs"
Requires-Dist: sphinxcontrib-programoutput; extra == "docs"
Requires-Dist: myst_parser; extra == "docs"
Requires-Dist: autodoc_pydantic; extra == "docs"
Provides-Extra: tests
Requires-Dist: pytest; extra == "tests"
Requires-Dist: pytest-cov; extra == "tests"
Requires-Dist: pytest-mpl; extra == "tests"
Provides-Extra: dev
Requires-Dist: pre-commit; extra == "dev"
Requires-Dist: git-cliff; extra == "dev"
Dynamic: license-file

<img src="https://raw.githubusercontent.com/lycosystem/lyscripts/main/github-social-card.png" alt="social card" style="width:830px;"/>

[![MIT license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://github.com/lycosystem/lyscripts/blob/main/LICENSE)
[![GitHub repo](https://img.shields.io/badge/lycosystem%2Flymph-grey.svg?style=flat&logo=github)](https://github.com/lycosystem/lyscripts)
[![build badge](https://github.com/lycosystem/lyscripts/actions/workflows/release.yml/badge.svg?style=flat)](https://pypi.org/project/lyscripts/)
[![docs badge](https://readthedocs.org/projects/lyscripts/badge/?version=latest)](https://lyscripts.readthedocs.io/en/latest/?badge=latest)
[![tests badge](https://github.com/lycosystem/lyscripts/actions/workflows/tests.yml/badge.svg?style=flat)](https://lyscripts.readthedocs.io/en/latest/?badge=latest)
[![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/lycosystem/lyscripts/python-coverage-comment-action-data/endpoint.json)](https://htmlpreview.github.io/?https://github.com/lycosystem/lyscripts/blob/python-coverage-comment-action-data/htmlcov/index.html)

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

## Installation

These scripts can be installed via `pip`:

```bash
pip install lyscripts
```

or installed from source by cloning this repo

```bash
git clone https://github.com/lycosystem/lyscripts.git
cd lyscripts
pip install .
```

## Usage

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.

### As a Command Line Tool

Simply run

```
lyscripts --help
```

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.

### As a Library

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

[documentation]: https://lyscripts.readthedocs.io

### Configuration YAML Schema

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

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:

```json
{
    "yaml.schemas": {
        "https://raw.githubusercontent.com/lycosystem/lyscripts/main/schemas/ly.json": "*.ly.yaml"
    }
}
```

Subsequently, all files ending in `.ly.yaml` will have helpful autocompletion on the allowed/expected types available.
