You can run this project via Gitpod in a web browser by clicking on this badge:
Details of the purpose and any published outputs from this project can be found at the link above.
The contents of this repository MUST NOT be considered an accurate or valid representation of the study or its purpose. This repository may reflect an incomplete or incorrect analysis with no further ongoing work. The content has ONLY been made public to support the OpenSAFELY open science and transparency principles and to support the sharing of re-usable code for other subsequent users. No clinical, policy or safety conclusions must be drawn from the contents of this repository.
The OpenSAFELY framework is a Trusted Research Environment (TRE) for electronic health records research in the NHS, with a focus on public accountability and research quality.
Read more at OpenSAFELY.org.
As standard, research projects have a MIT license.
For local (non-Docker) development, first install pyenv and execute:
pyenv install $(pyenv local)
Then, execute:
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
# Either one or the other of the following
pip install -r requirements.txt
pip install -r requirements.dev.txt # For also running bin/codestyle.sh
# For QA
bin/codestyle.sh .
If you have a local development environment, then the following command will write pytest's output to the terminal:
python -m pytest
You can also pass test modules, classes, and methods to pytest:
python -m pytest tests/test_notebooks_utilities.py::TestDropIrrelevantPractices::test_irrelevant_practices_dropped
If you don't have a local development environment, then the following command will write pytest's output to metadata/run_tests.log.
opensafely run run_tests