Metadata-Version: 2.4
Name: kymflow
Version: 0.1.0
Summary: Add your description here
Requires-Python: >=3.11
Requires-Dist: matplotlib>=3.9.4
Requires-Dist: numpy>=2.0.2
Requires-Dist: pandas>=2.3.3
Requires-Dist: plotly>=6.5.0
Requires-Dist: psygnal>=0.14.2
Requires-Dist: scikit-image>=0.24.0
Requires-Dist: tifffile>=2024.5.24
Provides-Extra: gui
Requires-Dist: nicegui>=3.3.1; extra == 'gui'
Requires-Dist: pywebview[gui]>=6.1; extra == 'gui'
Provides-Extra: notebook
Requires-Dist: jupyterlab>=4.3.0; extra == 'notebook'
Provides-Extra: pyinstaller
Requires-Dist: pyinstaller>=6.17.0; extra == 'pyinstaller'
Provides-Extra: test
Requires-Dist: pytest>=7.4; extra == 'test'
Description-Content-Type: text/markdown

# KymFlow

KymFlow is a NiceGUI-based application for browsing kymograph TIFF files,
editing metadata, and running Radon-based flow analysis.

The backend lives in `src/kymflow_core` and is completely GUI-agnostic, so scripts and notebooks can
reuse the same API for analysis, metadata editing, or batch processing.

---

# Requirements

- Python 3.9+
- [uv](https://github.com/astral-sh/uv) for dependency management (recommended)

---

# Getting the Source

Clone the repository (or download the ZIP) from GitHub:

```bash
git clone https://github.com/mapmanager/kymflow.git
cd kymflow
```

All commands below assume you are in the project root.

---

# Installation (uv)

KymFlow uses a **src/** layout and should be installed in editable mode. With
uv this is a single command:

```bash
uv pip install -e ".[gui]"
```

This creates (or updates) `.venv/`, installs the package in editable mode, and
pulls in the GUI + dev extras. If you add/remove dependencies in
`pyproject.toml`, rerun the same command. Regular source edits do **not**
require reinstalling.

> Not using uv?
> Any standard tool can install the same extras via: `pip install -e ".[gui,test]"`
> or the equivalent in your environment.

---

# Running the GUI

Launch the NiceGUI app with:

```bash
uv run python -m kymflow_gui.main
```

This automatically uses the uv-managed environment and keeps editable imports
intact. The GUI defaults to port **8080**; tweak defaults in
`src/kymflow_gui/config.py` if needed.

---

# Running Tests

```bash
uv pip install -e ".[test]"
```

```bash
uv run pytest
```

Tests that require proprietary TIFF data auto-skip when the sample data is
unavailable.


---

# Working with Jupyter Notebooks

Install the optional notebook extras (once):

```bash
uv pip install -e ".[notebook]"
```

Launch Jupyter Lab inside the repo (it will open in the `notebooks/` folder by
default):

```bash
uv run jupyter lab --notebook-dir notebooks
```

You can also use `jupyter notebook` if you prefer the classic interface. All
dependencies run inside the same uv-managed environment.

---

# Project Layout

```
kymflow/
├─ src/
│  ├─ kymflow_core/       # backend (KymFile, metadata, analysis, repository)
│  └─ kymflow_gui/        # NiceGUI frontend (layout, components)
├─ tests/                 # unit/integration tests
├─ pyproject.toml
├─ README.md
└─ .venv/                 # uv-managed virtualenv
```

---

# Contributing

Issues and pull requests are welcome. Please include clear steps to reproduce
bugs and run `uv run pytest` before submitting changes. More detailed
guidelines will be added later.


# Troubleshooting

To kill a stale nicegui. By default it should be running on port 8080.

```bash
sudo lsof -iTCP:8080 -sTCP:LISTEN
```

Then look for `pid` and `kill <pid>`

