Skip to content

MITLibraries/marimo-alma-marc

Repository files navigation

marimo-alma-marc

This repository houses Marimo notebooks that, broadly speaking, work with Alma MARC data.

Current Notebooks:

Notebook Path Description
tag_export.py Notebook to extract full, raw values for a set of MARC tags

Developing

The recommended approach for developing a Marimo notebook is to use the Marimo GUI editor:

Because this notebook repository will contain multiple notebooks, it's recommended to launch them like this:

uv run marimo edit --sandbox --headless --no-token <notebook_path>

Or, in some cases a developer has kindly created a Makefile command, e.g.:

make edit-notebook-tag-export

Dependencies

There are many ways in which dependencies can be managed for a Marimo notebook. For details on marimo-launcher handles and expects dependencies, please click here.

Testing

Testing is performed on the command line against inlined tests in notebook(s) (read more here in the Marimo docs) and any tests discovered in /tests.

There are two primary ways to add tests:

  1. Create a cell in a notebook and either manually in the .py file, or via the cell action menu, name the cell to start with a test_ prefix.
  2. Add tests to the standalone /tests folder. This can be helpful for testing code that may live outside of the notebook itself.

To run tests:

make test

Note the use of *.py in the Makefile command test. Per this greedy test discovery approach, any function that starts with test_ will be included in the test suite. To avoid this behavior *.py can be replaced with more granular, specific filepaths.

Linting

mypy type and ruff general linting are similar to other python projects, but note the relaxed rules in pyproject.toml for Marimo notebook files. If multiple notebooks are present, they will need to be added here.

make lint

Running

Often, notebooks are served as an "app". This is the default mode for marimo-launcher.

uv run marimo run --sandbox --headless --no-token <notebook_path>

Environment Variables

Required

# add required env vars here...

Optional

# add optional env vars here...

About

Marimo notebooks that work with Alma MARC data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published