Installation

Basic install

Note

This package is available on PyPI at https://pypi.org/project/dose-instruction-parser/

conda create -n di                                  # setup new conda env
conda activate di                                   # activate
python -m pip install dose_instruction_parser       # install dose_instruction_parser from PyPI
parse_dose_instructions -h                          # get help on parsing dose instructions

(Optional) Install the en_edris9 model. Contact phs.edris@phs.scot for access.

Development install

  1. Clone this repository

  2. Add a file called called secrets.env in the top level of the cloned repository with the following contents:

    export DI_FILEPATH="</path/to/model/folder>"
    

    This sets the environment variable DI_FILEPATH where the code will read/write models. If you are working within Public Health Scotland please contact phs.edris@phs.scot to receive the filepath.

  3. Create new conda environment and activate:

    conda create -n di-dev
    conda activate di-dev
    
  4. Install package using editable pip install and development dependencies:

    python -m pip install -e dose_instruction_parser[dev]
    

    Important

    Make sure you run this from the top directory of the repository

  5. (Optional) Install the en_edris9 model. Contact phs.edris@phs.scot for access.