|
| 1 | +# 'Levels of RAP' Maturity Framework |
| 2 | + |
| 3 | +The following framework has been directly copied from the RAP Community of Practice repository/website: [NHS RAP Levels of RAP Framework](https://nhsdigital.github.io/rap-community-of-practice/introduction_to_RAP/levels_of_RAP/). |
| 4 | + |
| 5 | +This framework is maintained by the NHS RAP Community of Practice and is © 2024 Crown Copyright (NHS England), shared by them under the terms of the [Open Government 3.0 licence](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/). |
| 6 | + |
| 7 | +The specific version of the framework copied below is that from commit [2549256](https://github.com/NHSDigital/rap-community-of-practice/commit/2549256498886d6d7ea4cdb736e2a2864c8bb461) (9th September 2024). |
| 8 | + |
| 9 | +## 🥉 Baseline |
| 10 | + |
| 11 | +RAP fundamentals offering resilience against future change. |
| 12 | + |
| 13 | +| Criteria | Completion | Further details | |
| 14 | +| - | - | - | |
| 15 | +| Data produced by code in an open-source language (e.g., Python, R, SQL). | ✅ | R | |
| 16 | +| Code is version controlled (see [Git basics](https://nhsdigital.github.io/rap-community-of-practice/training_resources/git/introduction-to-git/) and [using Git collaboratively](https://nhsdigital.github.io/rap-community-of-practice/training_resources/git/using-git-collaboratively/) guides). | ✅ | [GitHub](https://github.com/pythonhealthdatascience/rdesrap_stroke) | |
| 17 | +| 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](https://github.com/nhsx/open-source-policy/blob/main/open-source-policy.md#b-readmes) as a guide). | ✅ | - | |
| 18 | +| Code has been [peer reviewed](https://nhsdigital.github.io/rap-community-of-practice/implementing_RAP/workflow/code-review/). | ✅ | Peer reviewed by Tom Monks | |
| 19 | +| Code is [published in the open](https://nhsdigital.github.io/rap-community-of-practice/implementing_RAP/publishing_code/how-to-publish-your-code-in-the-open/) and linked to & from accompanying publication (if relevant). | ✅ | - | |
| 20 | + |
| 21 | +## 🥈 Silver |
| 22 | + |
| 23 | +Implementing best practice by following good analytical and software engineering standards. |
| 24 | + |
| 25 | +Meeting all of the above requirements, plus:https://github.com/pythonhealthdatascience/rdesrap_mms |
| 26 | + |
| 27 | +| Criteria | Completion | Further details | |
| 28 | +| - | - | - | |
| 29 | +| Outputs are produced by code with minimal manual intervention. | ✅ | - | |
| 30 | +| Code is well-documented including user guidance, explanation of code structure & methodology and [docstrings](https://nhsdigital.github.io/rap-community-of-practice/training_resources/python/python-functions/#documentation) for functions. | ✅ | - | |
| 31 | +| Code is well-organised following [standard directory format](https://nhsdigital.github.io/rap-community-of-practice/training_resources/python/project-structure-and-packaging/). | ✅ | - | |
| 32 | +| [Reusable functions](https://nhsdigital.github.io/rap-community-of-practice/training_resources/python/python-functions/) and/or classes are used where appropriate. | ✅ | - | |
| 33 | +| Code adheres to agreed coding standards (e.g PEP8, [style guide for Pyspark](https://nhsdigital.github.io/rap-community-of-practice/training_resources/pyspark/pyspark-style-guide/)). | ✅ | - | |
| 34 | +| Pipeline includes a testing framework ([unit tests](https://nhsdigital.github.io/rap-community-of-practice/training_resources/python/unit-testing/), [back tests](https://nhsdigital.github.io/rap-community-of-practice/training_resources/python/backtesting/)). | ✅ | `tests/` contains unit, functional and back tests. | |
| 35 | +| Repository includes dependency information (e.g. [requirements.txt](https://pip.pypa.io/en/stable/user_guide/#requirements-files), [PipFile](https://github.com/pypa/pipfile/blob/main/README.rst), [environment.yml](https://nhsdigital.github.io/rap-community-of-practice/training_resources/python/virtual-environments/conda/)). | ✅ | `renv` | |
| 36 | +| [Logs](https://nhsdigital.github.io/rap-community-of-practice/training_resources/python/logging-and-error-handling/) are automatically recorded by the pipeline to ensure outputs are as expected. | ✅ | - | |
| 37 | +| Data is handled and output in a [Tidy data format](https://medium.com/@kimrodrikwa/untidy-data-a90b6e3ebe4c). | ✅ | Meets the requirements of tidy data (each variable forms a column, each observation forms a row, each type of observational unit forms a table). | |
| 38 | + |
| 39 | +## 🥇 Gold |
| 40 | + |
| 41 | +Analysis as a product to further elevate your analytical work and enhance its reusability to the public. |
| 42 | + |
| 43 | +Meeting all of the above requirements, plus: |
| 44 | + |
| 45 | +| Criteria | Completion | Further details | |
| 46 | +| - | - | - | |
| 47 | +| Code is fully [packaged](https://packaging.python.org/en/latest/). | ✅ | - | |
| 48 | +| Repository automatically runs tests etc. via CI/CD or a different integration/deployment tool e.g. [GitHub Actions](https://docs.github.com/en/actions). | ✅ | `.github/workflows/R-CMD-check.yaml` | |
| 49 | +| Process runs based on event-based triggers (e.g., new data in database) or on a schedule. | N/A | - | |
| 50 | +| Changes to the RAP are clearly signposted. E.g. a changelog in the package, releases etc. (See gov.uk info on [Semantic Versioning](https://github.com/alphagov/govuk-frontend/blob/main/docs/contributing/versioning.md)). | ✅ | `NEWS.md` and GitHub releases. | |
0 commit comments