Development setup
You need Python 3.12 or newer, Git and uv.
git clone https://github.com/beatrice-b-m/dicom-standard-kb.gitcd dicom-standard-kbmake installmake checkmake install installs the locked runtime, MCP and development dependencies.
make check runs Ruff, strict mypy and the offline unit tests. make format
applies the shared formatting.
Fast feedback without downloads
Section titled “Fast feedback without downloads”The unit tests under tests/unit/ use synthetic DocBook fixtures and
temporary databases. Run one file while iterating:
uv run --frozen --all-extras --dev pytest tests/unit/test_query_resolver.pyTo try commands by hand, build the synthetic fixture:
uv run dicom-kb build-fixture --cache-dir /tmp/dicom-kb-fixture --db /tmp/dicom-kb-fixture.sqlite --forceuv run dicom-kb iod "CT Image" --db /tmp/dicom-kb-fixture.sqliteTest against a real build
Section titled “Test against a real build”The integration tests run against a knowledge base built from the current NEMA edition:
uv run dicom-kb fetchuv run dicom-kb buildmake test-integrationThey use the newest build in the cache, or the edition named by
DICOM_KB_TEST_EDITION.
Keep downloaded sources and databases outside the repository; the default
cache is ~/.cache/dicom-standard-kb.