Getting started#
Setting up#
Start by following the setting up instructions for users. When working on Bibliotekar, it is especially useful to install pre-commit.
Repositories with submissions are configured in a pixi.toml
file and are simple collections scripts, notebooks, and templates, not Python packages.
Bibliotekar, on the other hand, is a Python package and is configured in pyproject.toml
.
The Pixi configuration is also paced in pyproject.toml
.
Running tests#
Run all tests using
pixi run pytest
or pass extra arguments to pytest using, e.g.,
pixi run pytest -k test_name
Pixi will manage Python environments for you and ensure that the correct packages are installed.
Running linters#
To run all linters, use
pixi run lint
Note that this uses pre-commit internally.
Individual linters can be run like this:
pixi run mypy
pixi run ruff-format
pixi run codespell
...
See the [tool.pixi.feature.*.tasks]
tables (in particular [tool.pixi.feature.lint-tasks.tasks]
) in pyproject.toml
for a list of available linters.
Or use
pixi task list
Building the documentation#
The documentation for Code Shelf stored in the Bibliotekar project in the docs
folder.
To build the documentation, use
pixi run docs
and open the resulting HTML file build/html/index.html
in your browser.