Skip to content

loinc/comp-loinc

Repository files navigation

CompLOINC

Computational LOINC (in OWL).

QC build and test

Setup

Prerequisities

  1. Python 3.11

Installation

  1. Clone repo: git clone https://github.com/loinc/comp-loinc.git
  2. Set up virtual environment & activate: python -m venv venv & source venv/bin/activate
  3. Install Poetry: pip install poetry
  4. Install dependencies: poetry install
  5. Unzip downloaded inputs into the root directory of the repo.
  • a. Core developers: Download latest *-build-sources.zip from Google Drive.
  • b. Everyone else: Download releases from each source:
    • LOINC
    • SNOMED
    • LOINC-SNOMED Ontology
    • LOINC Tree
      • From this app, select from the "Hierarchy" menu at the top of the page. There are 7 options. When you select an option, select 'Export'. Extract the CSVs in each zip, and put them into a single folder, using the following names: class.csv, component.csv, document.csv, method.csv, panel.csv, system.csv, component_by_system.csv.
    • General instructions: Ensure that these 4 sources are unzipped to the locations shown in comploinc_config.yaml/, or update the config to match your locations.

Repository Structure

Usage

If you just want to run a build of default artefacts / options, use the command comploinc build.

Command reference

comploinc --help:

Options:

Arg usage Description
--work-dir PATH CompLOINC work directory, defaults to current work directory. [default: (dynamic)]
--config-file PATH Configuration file name. Defaults to "comploinc_config.yaml" [default: comploinc_config.yaml]
-o, --out-dir PATH The output folder name. Defaults to "output". [default: output]
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.

Commands:

  • build: Performs a build from a build file as opposed to the "builder"...
  • builder ...

build

Usage: comploinc build [OPTIONS] [BUILD_NAME]

Performs a build from a build file as opposed to the "builder" command which takes build steps.

Arguments:

  • [BUILD_NAME] The build name or a path to a build file. The "default" build will build all outputs. [default: default]

Configuration

See: comploinc_config.yaml

If following the setup exactly, this configuration will not need to be modified.

Statistics

Statistics page

Developer docs

Details

Tests

Tests: prerequisites

  1. robot
  2. Files in output/build-default/fast-run/
  • Can populate via comploinc --fast-run build default

Tests: Running

python -m unittest discover

Standard operating procedures (SOPs)

Setting up new/updated inputs/sources

  1. Create a new YYYY-MM-DD_comploinc-build-sources.zip in the Google Drive folder. Ensure it has the correct structure (folder names and files at the right paths).
  2. Make the link public: In the Google Drive folder, right-click the file, select "Share", and click "Share." At the bottom, under "General Access", click the left dropdown and select "Anyone with the link." Click "Copy link".
  3. Update DL_LINK_ID in GitHub: Go to the page for updating it. Paste the link from the previous step into the box, and click "Update secret."