Skip to main content

Marimo-based notebook framework for ML/DS work — standalone tools and embeddable learningfoundry exercises from one source

Project description

nbfoundry

License: Apache 2.0

Marimo-based notebook framework for ML/DS work. One notebook source compiles into two artifacts: a standalone runnable application and an ExerciseBlock-compatible artifact that drops into a learningfoundry curriculum.

For the why, see docs/specs/concept.md. For the what, see docs/specs/features.md. For the how, see docs/specs/tech-spec.md.

Installation

nbfoundry targets Python 3.12.13 with the pinned Pyve + micromamba environment defined in src/nbfoundry/templates/environment.yml. That one shared file ships as package data, gets copied into every scaffolded project by nbfoundry init, and is the same spec the standalone artifact emitter falls back to.

Apple Silicon quickstart

The pinned stack defaults to Apple Silicon with Metal/MPS acceleration across PyTorch, TensorFlow (via tensorflow-metal), and the bundled Keras 3 namespace from TF 2.16+. It also ships the wider cross-project stack (HuggingFace transformers / datasets / peft, Optuna, the plotly/seaborn/pyarrow utility set, dev tooling, and the Pointmatic-internal ml-datarefinery package).

To verify the stack on a clean Apple Silicon machine, copy the shared env file and scripts/metal_smoke.py into a fresh directory and let pyve build a micromamba-backed env from the spec:

mkdir nbfoundry-test && cd nbfoundry-test
mkdir scripts
cp <path-to-nbfoundry-root>/src/nbfoundry/templates/environment.yml .
cp <path-to-nbfoundry-root>/scripts/metal_smoke.py scripts/
pyve init --backend micromamba
pyve run python scripts/metal_smoke.py

pyve init --backend micromamba reads the local environment.yml and provisions the runtime env from it. The smoke script exercises PyTorch / TensorFlow / Keras against the MPS device and then imports every other package added in Phase F (HuggingFace, Optuna, plotly, seaborn, etc.) to assert basic availability — it doesn't import nbfoundry itself, so no pip install -e . step is required for the verify.

Successful output ends with all frameworks ran on MPS ✓. If any framework or import fails, the script reports which one and why (no MPS device, plugin not installed, package missing from the env, etc.).

Cross-platform users (CUDA / CPU-only)

The shared environment.yml ships comment-delimited swap blocks for the framework sections:

  • PyTorch CUDA: drop the pytorch conda-forge line and add to the pip: block --extra-index-url https://download.pytorch.org/whl/cu126 + torch (or .../cu128 for CUDA 12.8).
  • TensorFlow CPU-only or Linux+CUDA: replace the tensorflow-macos / tensorflow-metal pip lines with tensorflow>=2.16 (CPU-only) or tensorflow[and-cuda]>=2.16 (Linux + CUDA).

Both swap blocks are documented inline in the env file at the framework section.

Development setup (Pyve two-env)

pyve init
pyve run pip install -e .
pyve testenv init
pyve testenv install -r requirements-dev.txt

Usage

The CLI surface (nbfoundry init, compile, compile-exercise, validate) lands across Phase D. See docs/specs/stories.md for the implementation roadmap.

Releasing to PyPI

Releases ship through .github/workflows/publish.yml, which is triggered by pushing a v* tag. The workflow builds an sdist + wheel with hatch build and publishes via PyPI trusted publishing (OIDC, no long-lived API tokens).

One-time PyPI setup: register nbfoundry on PyPI and add a pending trusted publisher under the project's Publishing settings — owner pointmatic, repository nbfoundry, workflow publish.yml, environment pypi.

Per-release procedure:

  1. Land the version-bump story on main (package version in src/nbfoundry/_version.py and a matching CHANGELOG.md entry).
  2. Tag the commit with the matching v<version> (e.g. git tag v0.29.0 && git push origin v0.29.0).
  3. The workflow verifies the tag matches hatch version, builds the distributions, and publishes to PyPI under the pypi GitHub environment.

The workflow refuses to publish if the tag and hatch version disagree, so the only way to ship a release is to tag the same commit that owns the version bump.

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

nbfoundry-0.34.1.tar.gz (167.6 kB view details)

Uploaded Source

Built Distribution

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

nbfoundry-0.34.1-py3-none-any.whl (34.4 kB view details)

Uploaded Python 3

File details

Details for the file nbfoundry-0.34.1.tar.gz.

File metadata

  • Download URL: nbfoundry-0.34.1.tar.gz
  • Upload date:
  • Size: 167.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nbfoundry-0.34.1.tar.gz
Algorithm Hash digest
SHA256 f7f4c7a709d41d9997ce49bf176ed67103d05e0f1cb41afdca615a3d73b603db
MD5 e1443c56abc988a73ab218a01816dbf2
BLAKE2b-256 75cd74e383c9b189f5c7b5838c4655f764e715d28926e0ffe3e673b43b57867c

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbfoundry-0.34.1.tar.gz:

Publisher: publish.yml on pointmatic/nbfoundry

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

File details

Details for the file nbfoundry-0.34.1-py3-none-any.whl.

File metadata

  • Download URL: nbfoundry-0.34.1-py3-none-any.whl
  • Upload date:
  • Size: 34.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nbfoundry-0.34.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d0a586a333f69b544b66135a55c222e584d8c8a14b2190f6184800c4ee896158
MD5 487a408bb215f57811fcc379a3d7e700
BLAKE2b-256 946a6fc798ebe9e35e9323daa5c1ddd7349ef2ead0a12f9880172bb208f8a883

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbfoundry-0.34.1-py3-none-any.whl:

Publisher: publish.yml on pointmatic/nbfoundry

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