Skip to main content

An anywidget for alignment visualization in marimo notebooks

Project description

alignviz-anywidget

An anywidget project scaffold for building alignment visualization widgets used in marimo notebooks.

This repo is organized similarly to iiif-anywidget:

  • Python source in src/alignviz_anywidget
  • JavaScript source in js/src
  • Bundled widget assets in src/alignviz_anywidget/static
  • Marimo examples in marimo
  • Smoke scripts in scripts

Project layout

.
├── pyproject.toml
├── js/
│   ├── package.json
│   └── src/index.js
├── marimo/
│   └── demo.py
├── scripts/
│   └── smoke_widget.py
└── src/
	└── alignviz_anywidget/
		├── __init__.py
		├── widget.py
		└── static/
			└── index.js

1) Create and activate a Python environment

python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip

2) Install Python and JS dependencies

pip install -e ".[dev]"
cd js
npm install
cd ..

3) Build widget frontend assets

cd js
npm run build
cd ..

For active development in one terminal:

cd js
npm run dev

4) Run marimo demo

In another terminal:

source .venv/bin/activate
marimo run marimo/demo.py

5) Smoke test

python scripts/smoke_widget.py

Packaging notes

  • hatch-jupyter-builder runs the JS build during wheel/sdist builds.
  • The static assets are included as shared data for notebook environments.

Build a package:

python -m pip install build
python -m build

Next customization points

  • Add more synced traits in src/alignviz_anywidget/widget.py.
  • Implement richer alignment rendering in js/src/index.js.
  • Add additional marimo examples in marimo/.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

alignviz_anywidget-0.1.0.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

alignviz_anywidget-0.1.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file alignviz_anywidget-0.1.0.tar.gz.

File metadata

  • Download URL: alignviz_anywidget-0.1.0.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for alignviz_anywidget-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4308ef466bbccba23f7d87e541babc53fab36a49d7a888f625fb9958813900c9
MD5 da03d7b3fc22a402e75dae455527359f
BLAKE2b-256 174f0dfb457d26aa824b0c11ba9d9c4df00b4e66f3a64474fb27003dd595ba83

See more details on using hashes here.

Provenance

The following attestation bundles were made for alignviz_anywidget-0.1.0.tar.gz:

Publisher: publish.yml on neelsmith/alignviz-anywidget

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file alignviz_anywidget-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for alignviz_anywidget-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 258b91029d977286e53724819087fb958229441a6013b98f55db51df67814587
MD5 975e799afb688a829c91a21a16662230
BLAKE2b-256 3ecd6f2e6ce749bae78c579c3281e1ef597e990e1efcb454958f93fbf8e1a719

See more details on using hashes here.

Provenance

The following attestation bundles were made for alignviz_anywidget-0.1.0-py3-none-any.whl:

Publisher: publish.yml on neelsmith/alignviz-anywidget

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page