Skip to content

Latest commit

 

History

History
137 lines (95 loc) · 4.52 KB

File metadata and controls

137 lines (95 loc) · 4.52 KB

Development environment

The RERO+ projects share the same tooling, so the setup is the same everywhere. What differs is only how much there is to set up: an application needs Docker services and a loaded instance, a library needs nothing but its dependencies.

Requirements

For
uv — see uv and poe every Python project
Docker and the Docker Compose plugin the applications (rero-ils, sonar, rero-mef)
nvm and the recommended Node version the Angular projects, and any backend building webpack assets

Each project pins its Python version in .python-version or in requires-python. Install it and pin it for the project:

uv python install 3.14
uv python pin 3.14

Nearly all the projects are on Python 3.14. rero-invenio-thumbnails deliberately supports a wider range (3.12–3.14), which its CI tests across every version.

A Python library

Nothing to run, only dependencies to install:

git clone git@github.com:rero/rero-invenio-base.git
cd rero-invenio-base
uv sync
uv run poe run_tests

An application

The four steps are the same for rero-ils, sonar and rero-mef:

cd <project>

# 1. Python dependencies, npm dependencies and web assets
uv run poe bootstrap

# 2. PostgreSQL, Elasticsearch, Redis, RabbitMQ…
docker compose up -d

# 3. create the instance and load the fixtures
uv run poe setup

# 4. run it — https://localhost:5000
uv run poe server

uv run poe server accepts -p, --port if 5000 is taken, and uv run poe console opens an invenio shell on the instance. rero-ils and rero-mef also have uv run poe update, which re-bootstraps and applies the pending migrations and mapping updates after a pull; sonar does not, so bootstrap it by hand.

If you prefer not to prefix every command with uv run, activate the environment once: source .venv/bin/activate.

Tip

bootstrap and setup are plain shell scripts in scripts/. They are the reference when an option below does not behave as expected — none of them prints a usage message.

RERO ILS

git clone git@github.com:rero/rero-ils.git
cd rero-ils
uv run poe bootstrap                      # ~5 min
docker compose up -d && ./docker/wait-for-services.sh
uv run poe setup                          # ~13 min
uv run poe server

Useful setup options:

Option Effect
-d, --deployment load the big fixtures, with ebooks and files (~23 min)
-E, --entities also load the remote entities (MEF) fixtures
-p, --pursue do not stop on a record that fails to load (--dont-stop)
-l, --lazy create the records lazily
-i N, --index_parallel N index with N parallel workers
-t, --time print the duration of each command
-D, --data_path load the fixtures from another directory

The script takes a few more flags (-c, -k, -m, -w); check the case block at the top of scripts/setup rather than assuming — some of them are currently no-ops.

For the end-to-end tests, uv run poe setup_e2e loads a much smaller fixture set (~3-5 min). See E2E tests.

SONAR

git clone git@github.com:rero/sonar.git

Same four steps. Its docker-compose.yml adds grobid (metadata extraction from PDFs) and kibana on top of the usual services.

RERO MEF

git clone git@github.com:rero/rero-mef.git

Same four steps, with the standard service set. It has no public interface of its own: it is an API that aggregates authority records.

Working on the front-end too

Clone the front-end repositories next to the application — the integration scripts expect to find them there:

git clone git@github.com:rero/ng-core.git
git clone git@github.com:rero/rero-ils-ui.git    # or sonar-ui

Then see integrating the front-end.

Start over from scratch

Flush the Docker environment, delete the virtual environment, and redo the four steps:

cd <project>
docker compose down
docker volume prune --force
rm -rf .venv/

uv run poe bootstrap
docker compose up -d && uv run poe setup
uv run poe server

See also