OS2mo integration that syncs organisation units from CSV files, such as SOR.
docker compose up -d --build
Configuration is done through environment variables. Integration-specific
options are defined in mo_arbor/config.py. FastRAMQPI's
options (MO URL, authentication, logging, etc.) are nested under FASTRAMQPI
and set using __ as delimiter, e.g. FASTRAMQPI__MO_URL. See
docker-compose.yml for a working example.
SOR registers organisation and address data, as well as location numbers, for the Danish healthcare sector. It is owned and operated by Sundhedsdatastyrelsen.
The integration is a FastRAMQPI application using OS2mo's GraphQL event system. FastRAMQPI declares event listeners against MO; MO's GraphQL fetcher polls events and HTTP-POSTs them to FastAPI routes on this integration. Listeners are configured in mo_arbor/app.py and the handlers live in mo_arbor/events.py.
The development environment connects to the os2mo_default network, so OS2mo
must be running locally.
Unit tests:
poetry run pytest -m "not integration_test"
Integration tests run against the local OS2mo, from inside the container:
docker compose run --rm mo-arbor pytest -m integration_test
The GraphQL client in mo_arbor/autogenerated_graphql_client MUST NOT be
edited manually. It is generated from schema.graphql and queries.graphql
using ariadne-codegen. To regenerate after changing queries:
curl -O http://localhost:5000/graphql/v30/schema.graphql
rm -rf mo_arbor/autogenerated_graphql_client/
poetry run ariadne-codegen client
poetry run pre-commit run --files mo_arbor/autogenerated_graphql_client/*
This project uses Semantic Versioning with the following strategy:
- MAJOR: Incompatible API changes.
- MINOR: Backwards-compatible updates and functionality.
- PATCH: Backwards-compatible bug fixes.
Magenta ApS https://magenta.dk
- This project: MPL-2.0
This project uses REUSE for licensing. All licenses can be found in the LICENSES folder of the project.