Metadata-Version: 2.4
Name: facett-demo
Version: 0.2.0
Summary: facett's components in a Streamlit app: every Rust component drawn by wasm on WebGPU, grouped like facett-demo, graphs generated in the wasm up to 100 000 nodes — no server needed; live korp data with the [korp] extra.
Author: ignalina
Maintainer: ignalina
License-Expression: MIT OR Apache-2.0
Project-URL: Homepage, https://ignalina.dk
Project-URL: Repository, https://codeberg.org/nordisk/facett
Project-URL: Live demo, https://nordisk.codeberg.page/facett/
Project-URL: Issues, https://codeberg.org/nordisk/facett/issues
Keywords: facett,streamlit,wasm,webgpu,demo,graph,map,korp
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Scientific/Engineering :: Visualization
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: facett[streamlit]<0.3,>=0.2.0
Provides-Extra: korp
Requires-Dist: grpcio>=1.60; extra == "korp"
Requires-Dist: protobuf<8,>=5; extra == "korp"
Provides-Extra: dev
Requires-Dist: grpcio-tools>=1.60; extra == "dev"
Requires-Dist: pytest>=8; extra == "dev"

# facett-demo

**facett's components in a Streamlit app.** Every facett component — graphs, maps,
tables, charts, timelines, a docs viewer, a 3-D model viewer, a simulation view — is
the real Rust component compiled to WebAssembly and drawn on WebGPU, grouped like the
native facett demo's tabs (Grafer, Kartor, Tabeller & diagram, Bygg & jobb, App & UI).
The graph components carry the demo's size + generator: up to 100 000 nodes (the
universe to 1 000 000) generated *inside the wasm*, so no graph crosses from Python.

No server is needed. With the optional `[korp]` extra the app also shows LIVE data
from a korp-server over gRPC.

* The components on their own: [`facett`](https://pypi.org/project/facett/)
* Live demo of the native facett demo, in the browser: <https://nordisk.codeberg.page/facett/>
* Source: <https://codeberg.org/nordisk/facett> (this app is `py/`)

## Install and run

```bash
pip install facett-demo
facett-demo                       # http://127.0.0.1:8501
facett-demo run --server.port 8502   # any Streamlit option after `run`
facett-demo --version             # facett-demo <version> (<git hash>)
facett-demo about                 # build banner + which tabs read which korp RPC
```

`facett-demo` starts Streamlit in the same Python process (no `streamlit` executable
needed on `PATH`) and binds to **127.0.0.1** unless told otherwise — the demo is not
authenticated, so exposing it is an explicit choice (`--server.address`).

Open it in a browser with WebGPU in a secure context (`localhost` or https). Chrome
on Linux needs `--enable-unsafe-webgpu --enable-features=Vulkan`.

## Live korp data (optional)

```bash
pip install 'facett-demo[korp]'   # + grpcio, protobuf
KORP_SERVER=host:50051 facett-demo
```

| tab | component | korp-server RPC |
|---|---|---|
| 🗺 korp · Map | `osm2d` | `Assets` + `MapQuery` |
| 🕸 korp · Graph | `graphnav` | `Graph` |
| 📊 korp · Population | `table` + `stat-grid` | `IcebergTables` + `TablePreview` + `Population` |

Without the extra the app runs offline: the 🎨 Komponenter tab of every group needs no
server, and the korp tabs mount the same components on the gallery's generated/fixture
data under a banner that says so. With the extra installed and the server down, every
korp tab shows the server's own error instead of a blank pane.

## How it is built

The `facett` wheel carries the wasm bundles; this package is pure Python (the app,
its payload table and the error-code catalog). Both wheels are built in a pinned
container with the network off and verified byte for byte against their own `RECORD`
before release; see the repository's `.nornir/pypi-publish.md`.

## License

MIT OR Apache-2.0.
