You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTE.md
+37-9Lines changed: 37 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,30 +1,42 @@
1
1
# DVE Contributing guidelines
2
2
3
-
# Developer information
3
+
__If you're planning to contribute to the DVE, please follow all the guidance below. Failure to follow the guidance in this document may result in your contributions being automatically rejected.__
4
4
5
5
## Getting started
6
6
7
-
To begin with I would recommend that users read all the documentation available within the [docs](./docs/). It gives an overview of how the DVE works and how to work with the dischema json document.
7
+
I would recommend that you read all the documentation available within the [docs](https://nhsdigital.github.io/data-validation-engine/). It gives an overview of how the DVE works and how to work with the dischema json document.
8
8
9
9
## General requirements
10
-
To start contributing to the DVE project you will need the following tooling available:
10
+
11
+
To start contributing to the DVE project you will need the tooling listed within the `.tool-versions` or `mise.toml`. The following tools are required because...
12
+
11
13
| Tool | Version | Reason |
12
14
| ---- | ------- | ------ |
13
-
|`Python`| 3.7.17|Currently supported version of `Python` for the DVE. |
14
-
|`Poetry`|1.4.2| Build and venv tool used for the DVE. |
15
+
|`Python`| 3.11|Latest version of Python supported by the DVE. |
16
+
|`Poetry`|2.2.1| Build and package manager tool used for the DVE. |
15
17
|`Java`| java liberica-1.8.0 |`Java` version required for `PySpark`. |
16
-
|`pre-commit`|2.21.0 | Currently installed as part of the `poetry` venv but seperate installation is fine. |
17
-
|`commitizen`|3.9.1 | Like `pre-commit`, installed as part of the `poetry` venv but seperate installation is fine. This is used to manage commits and automated semantic versioning. |
18
+
|`pre-commit`|4.3.0 | Currently installed as part of the `poetry` venv but seperate installation is fine. |
19
+
|`commitizen`|4.9.1 | Like `pre-commit`, installed as part of the `poetry` venv but seperate installation is fine. This is used to manage commits and automated semantic versioning. |
18
20
|`git-secrets`| Latest | Utilised as part of the `pre-commit` to ensure that no secrets are commited to the repository. There is a helper installation script within [scripts](/scripts/git-secrets/). |
19
21
20
-
Additionally, we have created a [asdf support](.tool-versions) and [mise-en-toml](.mise.toml) for those utilising `asdf` or `mise-en-toml` software.
22
+
You can install all the developer requirements with the following command:
23
+
24
+
```bash
25
+
poetry install --with dev
26
+
```
21
27
22
28
## Testing Requirements
23
29
24
30
Testing requirements are given in [pyproject.toml](./poetry.toml#48) under `tool.poetry.group.test.dependencies`. These are always pinned versions for consistency, but should be updated regularly if new versions are released. The following core packages are used for testing:
25
31
-[pytest](https://docs.pytest.org/en/stable/): Used for Python unit tests, and some small e2e tests which check coverage.
26
32
-[behave](https://github.com/behave/behave): Used for full, business-driven end-to-end tests.
27
-
-[coverage](https://coverage.readthedocs.io/en/7.10.7/): Used to get coverage for `pytest` tests.
33
+
-[coverage](https://coverage.readthedocs.io/en/): Used to get coverage for `pytest` tests.
34
+
35
+
You can install these requirements with the following command:
36
+
37
+
```bash
38
+
poetry install --with test
39
+
```
28
40
29
41
## Linting/Formatting/Type Checking Requirements
30
42
@@ -38,6 +50,12 @@ This mostly breaks down to:
38
50
39
51
We use these tools to ensure that code quality is not excessively compromised, even when working at pace.
40
52
53
+
You can install these requirements with the following command:
54
+
55
+
```bash
56
+
poetry install --with lint
57
+
```
58
+
41
59
## Installation for Development
42
60
43
61
We are utilising Poetry for build dependency management and packaging. If you're on a system that has `Make` available, you can simply run `make install` to setup a local virtual environment with all the dependencies installed (this won't install Poetry for you).
@@ -50,6 +68,16 @@ Tests should be run after installing the package for development as outlined abo
50
68
- To check the coverage run `poetry run coverage report -m`
51
69
- To run the behave tests, run `poetry run behave tests/features` (these are not included in coverage calculations)
52
70
71
+
## Committing
72
+
73
+
We use [commitizen](https://github.com/commitizen-tools/commitizen) to commit new changes. This ensures...
74
+
75
+
1. A consistent standard for the commit messages
76
+
2. Generation of changelog from the commit messages
77
+
3. Allows for automatic bumping of the version based on the changes
78
+
79
+
Please use `poetry run cz c` or `cz c` (if already in the venv).
80
+
53
81
## Submitting a pull request
54
82
55
83
If you want to contribute to the DVE then please follow the steps below:
0 commit comments