This repository houses Marimo notebooks that, broadly speaking, work with Alma MARC data.
Notebook Path | Description |
---|---|
tag_export.py |
Notebook to extract full, raw values for a set of MARC tags |
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
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 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:
- 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 atest_
prefix. - 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.
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
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>
# add required env vars here...
# add optional env vars here...