Metadata-Version: 2.4
Name: astrooracle
Version: 0.3.0
Summary: AstroOracle: active learning oracle for astronomical anomaly triage (SkyView cutouts + annotations + retrain hooks).
Author: AstroOracle Contributors
License: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: LICENSE.txt
Requires-Dist: numpy>=1.23
Requires-Dist: pandas>=2.0
Requires-Dist: matplotlib>=3.7
Requires-Dist: scikit-learn>=1.3
Requires-Dist: pyarrow>=12.0
Requires-Dist: pillow>=10.0
Provides-Extra: astro
Requires-Dist: astropy>=5.3; extra == "astro"
Requires-Dist: astroquery>=0.4.6; extra == "astro"
Provides-Extra: notebook
Requires-Dist: ipywidgets>=8.1; extra == "notebook"
Requires-Dist: jupyterlab>=4.0; extra == "notebook"
Requires-Dist: plotly>=5.18; extra == "notebook"
Provides-Extra: plotly
Requires-Dist: plotly>=5.18; extra == "plotly"
Provides-Extra: watch
Requires-Dist: watchdog>=3.0; extra == "watch"
Provides-Extra: api
Requires-Dist: fastapi>=0.110; extra == "api"
Requires-Dist: uvicorn>=0.27; extra == "api"
Requires-Dist: pydantic>=2.6; extra == "api"
Requires-Dist: jinja2>=3.1; extra == "api"
Requires-Dist: python-multipart>=0.0.9; extra == "api"
Provides-Extra: stats
Requires-Dist: duckdb>=0.10; extra == "stats"
Provides-Extra: ml
Requires-Dist: scipy>=1.10; extra == "ml"
Provides-Extra: graph
Requires-Dist: networkx>=3.2; extra == "graph"
Requires-Dist: python-louvain>=0.16; extra == "graph"
Provides-Extra: explain
Requires-Dist: lime>=0.2.0.1; extra == "explain"
Provides-Extra: docs
Requires-Dist: sphinx>=7.2; extra == "docs"
Requires-Dist: furo>=2024.1.29; extra == "docs"
Requires-Dist: myst-parser>=2.0; extra == "docs"
Provides-Extra: dev
Requires-Dist: pytest>=7.4; extra == "dev"
Requires-Dist: pytest-cov>=5.0; extra == "dev"
Requires-Dist: httpx>=0.26; extra == "dev"
Requires-Dist: ruff>=0.3; extra == "dev"
Requires-Dist: black>=24.1; extra == "dev"
Dynamic: license-file

# AstroOracle

Active learning oracle for astronomical anomaly triage.

- Fetch SkyView cutouts (or synthetic offline cutouts)
- Rank candidates via anomaly score + acquisition + diversity
- Label in CLI or in a small web UI
- Retrain hook when enough new labels are collected

## Badges

- CI: GitHub Actions (see `.github/workflows/ci.yml`)
- Release: GitHub Actions tags `v*` (see `.github/workflows/release.yml`)

## Install

```bash
pip install -e ".[dev,api,plotly,graph]"
```

Optional extras:

```bash
pip install -e ".[astro,explain,docs]"
```

## Quickstart

### 1) Web landing page (FastAPI)

```bash
astrooracle serve --candidates candidates.parquet --annotations annotations.csv
# then open http://127.0.0.1:8000/
```

Landing page features:

- `GET /` landing page with Plotly 3D preview and a CLI-like `/run` form
- `GET /dashboard` annotations dashboard + export
- `GET /viz3d` Plotly JSON
- `GET /graph_anomaly` graph context (kNN on sphere)
- `GET /explain` lightweight explanations + shareable prompts

### 2) CLI triage (interactive)

```bash
astrooracle run --candidates candidates.parquet --annotations annotations.csv
```

### 3) Generate a static batch annotator (HTML)

```bash
astrooracle batch-html --out-dir batch_out --n-query 12
# open batch_out/index.html
```

## New features included in this patch

- Landing page `/` + dashboard `/dashboard` (Bootstrap + Plotly)
- Toggle "Mode Chaos" (served via `/chaos`, requires a `timeseries` column)
- Graph anomaly context (`astrooracle graph-anomaly` or `/graph_anomaly`)
- Explainability JSONL (`astrooracle explain-top` or `/explain`)
- Gaia ingestion (`astrooracle gaia-cone` and `astrooracle gaia-adql`, requires `.[astro]`)
- Hybrid anomaly fusion (`--mode hybrid` in CLI and landing page)

## Citation

See `CITATION.cff`.

## License

MIT.
