Project structure#
The Code Shelf project consists of several repositories that are all part of the Code Shelf group on GitLab:
Bibliotekar is a Python package for managing Code Shelf repositories and submissions (https://git.esss.dk/dram/code-shelf/bibliotekar).
deploy contains the deployed code for all individual shelves at specific tags (https://git.esss.dk/dram/code-shelf/deploy).
Code Shelf Template is a Copier for shelves (https://git.esss.dk/dram/code-shelf/code-shelf-template).
Shelves are a collection of repositories for different instruments that contain the individual code submissions.
Any members can contribute to the shelves to add and update submissions. These submissions are then annotated with additional metadata and copied to the ‘deploy’ repository when they are ready for use. Deployment must be started manually. See the dedicated deployment page for more information.
Repository layout#
Shelves#
Each shelf contains the following essential files:
File / folder |
Purpose |
---|---|
|
Folder with submitted Jupyter notebooks. |
|
Folder with submitted Python scripts. |
|
Folder with submitted Jupyter notebook templates for use with SciCat’s Jupyter Generator through SciWyrm. |
|
Configuration of the shelf and analysis tools. Contains a |
|
Configuration of Python environments |
This structure is defined by the Code Shelf template.
pyproject.toml
lacks a [build-system]
table, meaning that the shelves are not Python packages that could be
installed with pip
or other package managers.
Rather, they are collections of code that can be copied out of the repository directly or deployed to the deploy
repository.
Deployment repository#
The deployment repository has a similar structure to the shelves but contains subfolders in notebooks/
, etc.:
File / folder |
Purpose |
---|---|
|
Folders with Jupyter notebooks for each instrument. |
|
Folders with Python scripts for each instrument. |
|
Folders with Jupyter notebook templates for each instrument. |
|
Empty marker file to indicate that this folder is a deployment repository. Used by Bibliotekar. |
The deploy
repository does not contain a pyprpoject.toml
or pixi.toml
file because any code committed to it must
have been vetted before.
No automated tests are run on the deployment repo.
Bibliotekar#
Bibliotekar is a regular Python package with src
-layout and a pyproject.toml
file.
It is managed with Pixi and the Pixi configuration is stored in pyproject.toml
.