Skip to content

Commit 4692285

Browse files
Added contribution guidance (#35)
<!-- markdownlint-disable-next-line first-line-heading --> ## Description <!-- Describe your changes in detail. --> This adds contribution guidance for this project. ## Context <!-- Why is this change required? What problem does it solve? --> This allows for any potential future requests or development to meet expected standards. ## Type of changes <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply. --> - [ ] Refactoring (non-breaking change) - [x] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would change existing functionality) - [ ] Bug fix (non-breaking change which fixes an issue) ## Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply. --> - [x] I am familiar with the [contributing guidelines](./CONTRIBUTING.md) - [x] I have followed the code style of the project - [ ] I have added tests to cover my changes - [x] I have updated the documentation accordingly - [ ] This PR is a result of pair or mob programming --- ## Sensitive Information Declaration To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including [PII (Personal Identifiable Information) / PID (Personal Identifiable Data)](https://digital.nhs.uk/data-and-information/keeping-data-safe-and-benefitting-the-public) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter. - [x] I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.
1 parent e00653b commit 4692285

File tree

5 files changed

+54
-9
lines changed

5 files changed

+54
-9
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020

2121
<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->
2222

23-
- [ ] I am familiar with the [contributing guidelines](../docs/CONTRIBUTING.md)
23+
- [ ] I am familiar with the [contributing guidelines](https://github.com/nhs-england-tools/playwright-python-blueprint/blob/main/CONTRIBUTING.md)
2424
- [ ] I have followed the code style of the project
25-
- [ ] I have added tests to cover my changes
25+
- [ ] I have added tests to cover my changes (where appropriate)
2626
- [ ] I have updated the documentation accordingly
2727
- [ ] This PR is a result of pair or mob programming
2828

.vscode/settings.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
"cSpell.words": [
88
"addopts",
99
"codegen",
10+
"Licence",
11+
"organisation",
1012
"pytest",
1113
"utilise",
1214
"utilised",

CONTRIBUTING.md

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,40 @@
1-
# Contributing to this project
1+
# Contributing To This Project
22

3-
This page will be populated in the near future to outline the contribution process.
3+
With this project, we actively encourage anyone who may have any ideas or code that could make this repository better to contribute
4+
in any way they can.
5+
6+
## How To Contribute
7+
8+
If you have an idea about something new that could be added, then please raise a
9+
[Feature Request via the Issues tab](https://github.com/nhs-england-tools/playwright-python-blueprint/issues/new/choose) for this
10+
repository. Even if you don't feel you have the technical ability to implement the request, please raise an issue regardless as
11+
the maintainers of this project will frequently review any requests and attempt to implement if deemed suitable for this blueprint.
12+
13+
If you have some code you think could be implemented, please raise a Feature Request and
14+
[create a fork of this repository](https://github.com/nhs-england-tools/playwright-python-blueprint/fork) to experiment and ensure
15+
that the change you want to push back works as intended.
16+
17+
## Contribution Requirements
18+
19+
For any contributions to this project, the following requirements need to be met:
20+
21+
- You must be a member of the [NHS England Tools](https://github.com/nhs-england-tools) organisation on GitHub.
22+
- [Any commits must be signed](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits), so they show as verified once they reach GitHub. This checking serves as part of our CI/CD process, so unsigned commits will prevent a pull request from being merged.
23+
- For any utility methods that are added to this framework in the `utils` directory, the following applies:
24+
- Unit tests for the utility should be added to the `tests_utils` directory and need to be tagged with the `utils` mark.
25+
- Documentation for these classes and how to use any methods should also be added to the `docs/utilities-guide` directory.
26+
- Each method that is intended to be used as part of a class should have a correctly formatted docstring, to allow for developers using Intellisense within their IDE to understand what the code is intended to do.
27+
- All CI/CD checks will need to pass before any code is merged to the `main` branch - this includes ensuring appropriate formatting of code and documentation, security checks and that all unit and example tests pass.
28+
29+
## Things We Want
30+
31+
What we are particularly interested in is:
32+
33+
- Any utility classes that can uniformly applied to any project. This may be something that's been created for your own project and by doing some minor abstraction any other teams working in a similar way could adopt this functionality.
34+
- Any development code that supports executing this project in a CI/CD fashion. This primarily covers any changes that support development principles outlined in the [Software Engineering Quality Framework](https://github.com/NHSDigital/software-engineering-quality-framework), and could include logic around how the test code is containerized.
35+
- Any changes that allow for test reporting in a consistent, reliable, maintainable and interesting format for varying stakeholders. This includes logic that expands on from the reporting we generate, such as example scripts for how to generate dashboards using the data we generate.
36+
37+
Examples:
38+
39+
- Say you've created a utility for generating test patients within your application. Any elements of this code that could be universally applied and other teams are likely to use (e.g. NHS number, patient name) we would want in this blueprint. If there's something business specific to your project that exists as part of this code (e.g. a unique reference number that only applies to your service), then we would advise removing that logic from any code before raising a pull request here.
40+
- If you do end up adding a utility class in this format in a more generic way to this project, you can subsequently [inherit the utility class](https://docs.python.org/3/tutorial/classes.html#inheritance) to include your additional business-specific requirements within your own version of the class.

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ NOTE: This project is currently under initial development so isn't finalised, bu
1717
- [Configuration](#configuration)
1818
- [Getting Started](#getting-started)
1919
- [Utilities](#utilities)
20+
- [Contributing](#contributing)
2021
- [Contacts](#contacts)
2122
- [Licence](#licence)
2223

@@ -76,16 +77,21 @@ This blueprint also provides the following utility classes, that can be used to
7677
|Utility|Description|
7778
|-------|-----------|
7879
|[Axe](./docs/utility-guides/Axe.md)|Accessibility scanning using axe-core.|
80+
|[Date Time Utility](./docs/utility-guides/DateTimeUtility.md)|Basic functionality for managing date/times.|
7981
|NHSNumberTools|Basic tools for working with NHS numbers.|
8082

83+
## Contributing
84+
85+
Further guidance on contributing to this project can be found in our [contribution](./CONTRIBUTING.md) page.
86+
8187
## Contacts
8288

83-
If you have any queries regarding this blueprint, please contact [[email protected]](mailto:dave.harding1@nhs.net).
89+
If you have any ideas or require support for this project, please [raise an issue via this repository](https://github.com/nhs-england-tools/playwright-python-blueprint/issues/new/choose) using the appropriate template.
8490

85-
## Licence
91+
If you have any general queries regarding this blueprint, please contact [[email protected]](mailto:[email protected]).
8692

87-
> The [LICENCE.md](./LICENCE.md) file will need to be updated with the correct year and owner
93+
## Licence
8894

89-
Unless stated otherwise, the codebase is released under the MIT License. This covers both the codebase and any sample code in the documentation.
95+
Unless stated otherwise, the codebase is released under the [MIT License](LICENCE.md). This covers both the codebase and any sample code in the documentation.
9096

9197
Any HTML or Markdown documentation is [© Crown Copyright](https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/) and available under the terms of the [Open Government Licence v3.0](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/).

docs/utility-guides/DateTimeUtility.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ The docstrings also specify when arguments are optional, and what the default va
1919
from tests_utils.date_time_utils import DateTimeUtils
2020

2121
def test_date_format(page: Page) -> None:
22-
expect(page.locator("#date")).to_contain_text(DateTimeUtils.current_datetime()))
22+
expect(page.locator("#date")).to_contain_text(DateTimeUtils.current_datetime())

0 commit comments

Comments
 (0)