Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added contribution guidance #35

Merged
merged 3 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@

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

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

Expand Down
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"cSpell.words": [
"addopts",
"codegen",
"Licence",
"organisation",
"pytest",
"utilise",
"utilised",
Expand Down
41 changes: 39 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,40 @@
# Contributing to this project
# Contributing To This Project

This page will be populated in the near future to outline the contribution process.
With this project, we actively encourage anyone who may have any ideas or code that could make this repository better to contribute
in any way they can.

## How To Contribute

If you have an idea about something new that could be added, then please raise a
[Feature Request via the Issues tab](https://github.com/nhs-england-tools/playwright-python-blueprint/issues/new/choose) for this
repository. Even if you don't feel you have the technical ability to implement the request, please raise an issue regardless as
the maintainers of this project will frequently review any requests and attempt to implement if deemed suitable for this blueprint.

If you have some code you think could be implemented, please raise a Feature Request and
[create a fork of this repository](https://github.com/nhs-england-tools/playwright-python-blueprint/fork) to experiment and ensure
that the change you want to push back works as intended.

## Contribution Requirements

For any contributions to this project, the following requirements need to be met:

- You must be a member of the [NHS England Tools](https://github.com/nhs-england-tools) organisation on GitHub.
- [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.
- For any utility methods that are added to this framework in the `utils` directory, the following applies:
- Unit tests for the utility should be added to the `tests_utils` directory and need to be tagged with the `utils` mark.
- Documentation for these classes and how to use any methods should also be added to the `docs/utilities-guide` directory.
- 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.
- 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.

## Things We Want

What we are particularly interested in is:

- 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.
- 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.
- 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.

Examples:

- 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.
- 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.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ NOTE: This project is currently under initial development so isn't finalised, bu
- [Configuration](#configuration)
- [Getting Started](#getting-started)
- [Utilities](#utilities)
- [Contributing](#contributing)
- [Contacts](#contacts)
- [Licence](#licence)

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

## Contributing

Further guidance on contributing to this project can be found in our [contribution](./CONTRIBUTING.md) page.

## Contacts

If you have any queries regarding this blueprint, please contact [[email protected]](mailto:dave.harding1@nhs.net).
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.

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

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

Unless stated otherwise, the codebase is released under the MIT License. This covers both the codebase and any sample code in the documentation.
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.

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/).
2 changes: 1 addition & 1 deletion docs/utility-guides/DateTimeUtility.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ The docstrings also specify when arguments are optional, and what the default va
from tests_utils.date_time_utils import DateTimeUtils

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