Metadata-Version: 2.4
Name: toktagger
Version: 0.2.0
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Requires-Python: <3.14,>=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastapi
Requires-Dist: uvicorn
Requires-Dist: fsspec
Requires-Dist: xarray
Requires-Dist: s3fs
Requires-Dist: zarr
Requires-Dist: scipy
Requires-Dist: pyarrow<21
Requires-Dist: pymongo
Requires-Dist: requests
Requires-Dist: numpy<2
Requires-Dist: scikit-learn
Requires-Dist: pandas<=2.2.3
Requires-Dist: pillow
Requires-Dist: uda
Requires-Dist: sal
Requires-Dist: ruptures>=1.1.10
Requires-Dist: psutil>=7.0.0
Requires-Dist: mongita>=1.2.0
Requires-Dist: filelock>=3.19.1
Requires-Dist: hmmlearn>=0.3.3
Requires-Dist: uda-xarray>=0.2.1
Requires-Dist: sal-xarray>=0.2.1
Requires-Dist: bump-my-version>=1.2.7
Requires-Dist: platformdirs>=4.4.0
Provides-Extra: models
Requires-Dist: torch; extra == "models"
Requires-Dist: ray>=2.49.1; extra == "models"
Dynamic: license-file

# TokTagger

![TokTagger Logo](docs/assets/logo_small.png)

An open source, interactive annotation platform for Tokamak diagnostic data.

[![Workflow: CI](https://github.com/ukaea/toktagger/actions/workflows/ci.yml/badge.svg)](https://github.com/ukaea/toktagger/actions/workflows/ci.yml)
[![Workflow: Dependabot](https://img.shields.io/badge/Dependabot-enabled-34d058?logo=github)](https://github.com/ukaea/toktagger/actions/workflows/dependabot/dependabot-updates)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Linting: ruff](https://img.shields.io/badge/linting-ruff-purple)](https://github.com/astral-sh/ruff)
[![Testing: pytest](https://img.shields.io/badge/testing-pytest-red)](https://github.com/pylint-dev/pylint-pytest)


## What It Does

TokTagger is a web-based platform for curating labeled datasets from tokamak diagnostics. It lets users browse shots, inspect signals and images, apply consistent labels, and manage annotations in one place. The Python API and React UI support local or team workflows, making it straightforward to create datasets for downstream analysis and machine-learning models.

It currently supports the following features:

- **Data Browsing**: Explore tokamak shots, signals, and images through an intuitive interface.
- **Annotation Tools**: Apply consistent labels to signals and images using a customizable tagging system.
- **ML Models**: Train and infer from ML models within the UI.
- **Dataset Management**: Organize and manage annotations in a central repository.
- **Extensible API**: A Python API for integrating with existing workflows and tools.


## Installation

To run the application locally:

### Install via pip
To install the package via `pip` (or similarly via `Poetry` or `uv` package managers):
```sh
python -m venv .venv
source .venv/bin/activate
```
To install the package for labelling only (without ML Model functionality):
```sh
pip install toktagger
```
Or to include the ML models:
```sh
pip install toktagger[models]
```
If you intend to add custom data loaders or models to your TokTagger instance, this is the recommended route.

### Install as a uv tool
Alternatively, it can be installed as a tool using `uv`. To install the package for labelling only (without ML Model functionality):

```sh
uv tool install --python 3.12.6 toktagger
```
Or to include the ML models:
```sh
uv tool install --python 3.12.6 toktagger[models]
```

## Quick Start
To get started, run:

```sh
toktagger
```

This will start a local instance of the application running at `http://localhost:8002`.
