The following framework is from the NHS RAP Community of Practice: NHS RAP Levels of RAP Framework.
It is © 2024 Crown Copyright (NHS England), shared under the terms of the Open Government 3.0 licence.
The specific version of the framework copied below is that from commit 2549256 (9th September 2024).
🥉 Baseline
RAP fundamentals offering resilience against future change.
| Criteria | Covered on page… |
|---|---|
| Data produced by code in an open-source language (e.g., Python, R). | Open-source languages |
| Code is version controlled (see Git basics and using Git collaboratively guides). | Version control |
| Repository includes a README.md file (or equivalent) that clearly details steps a user must follow to reproduce the code (use NHS Open Source Policy section on Readmes as a guide). | Documentation |
| Code has been peer reviewed. | Peer review |
| Code is published in the open and linked to & from accompanying publication (if relevant). | Sharing and archiving |
🥈 Silver
Implementing best practice by following good analytical and software engineering standards.
Meeting all of the above requirements, plus:
| Criteria | Covered on page… |
|---|---|
| Outputs are produced by code with minimal manual intervention. | Full run |
| Code is well-documented including user guidance, explanation of code structure & methodology and docstrings for functions. | Documentation Docstrings |
| Code is well-organised following standard directory format. | Structuring as a package |
| Reusable functions and/or classes are used where appropriate. | Code organisation |
| Code adheres to agreed coding standards (e.g PEP8, style guide for Pyspark). | Linting |
| Pipeline includes a testing framework (unit tests, back tests). | Tests |
| Repository includes dependency information (e.g. requirements.txt, PipFile, environment.yml). | Environments |
| Logs are automatically recorded by the pipeline to ensure outputs are as expected. | Logging |
| Data is handled and output in a Tidy data format. | Parameters from file Performance measures |
🥇 Gold
Analysis as a product to further elevate your analytical work and enhance its reusability to the public.
Meeting all of the above requirements, plus:
| Criteria | Covered on page… |
|---|---|
| Code is fully packaged. | Structuring as a package |
| Repository automatically runs tests etc. via CI/CD or a different integration/deployment tool e.g. GitHub Actions. | GitHub actions |
| Process runs based on event-based triggers (e.g., new data in database) or on a schedule. | N/A |
| Changes to the RAP are clearly signposted. E.g. a changelog in the package, releases etc. (See gov.uk info on Semantic Versioning). | Changelog |