A small CLI tool to upload MOUSE SAXS measurement batches to OpenBIS based on a YMD day code
(e.g. 20251220). It reads the measurement metadata from the Excel logbook and uploads/updates
OpenBIS objects and datasets (RAW and PROCESSED).
The general structure is as follows:

python -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install -e .The CLI uses a token stored in a file (default: ~/.datastore_token).
- Make sure the token file exists and contains a non-empty token string.
- Override the path via
--datastore-token-path.
Minimal (only required argument is the YMD code):
openbis-mouse-uploader 20251220More verbose logging:
openbis-mouse-uploader 20251220 --log-level DEBUGContinue from a later row in the logbook:
openbis-mouse-uploader 20251220 --start-row 50Dry-run (no writes; logs intended actions):
openbis-mouse-uploader 20251220 --dry-run- People collections are grouped by proposal year:
PEOPLE_<proposal-year>. - Duplicate objects should not exist. If they do, the uploader logs a warning and deletes duplicates permanently until a single object remains.
- If the project-leader BAM record is not found, the
project_leader_bamproperty is omitted.
- Formatting/linting:
ruff - Typing:
mypy(configured to ignore missing third-party stubs) - Pre-commit:
pre-commit
Setup:
pip install -e ".[dev]"
pre-commit installExample:
ruff format .
ruff check .
mypy src
pytest