Skip to content

Commit fab7775

Browse files
Merge pull request #67 from NHSDigital/sh-contribute-update
SH - Updated CONTRIBUTE guidance
2 parents 6f85c6e + 48d60b8 commit fab7775

File tree

2 files changed

+42
-29
lines changed

2 files changed

+42
-29
lines changed

CONTRIBUTE.md

Lines changed: 16 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contribute
22

3-
Hi there! We're thrilled that you'd like to contribute to this landing page repository. Your help is essential for keeping it great.
3+
Hi there! We're thrilled that you'd like to contribute to the RAP Community of Practice! Your help is crucial in keeping it great!
44

55
## Creating an issue
66

@@ -12,7 +12,7 @@ If you want to contribute to our resources:
1212

1313
1. [Fork][fork] or clone the repository
1414
2. Configure and install the dependencies if you want to run the page in your machine, otherwise none.
15-
3. Create a new branch: `git checkout -b my-branch-name`
15+
3. Create a new branch: (e.g. `git checkout -b my-branch-name`)
1616
4. Make your change
1717
5. Check how your change looks on our website by hosting the website locally (follow [the steps below](#contribute-to-rap-community-of-practice-website) on how to do this)
1818
6. Push to your fork and [submit a pull request][pr]
@@ -28,43 +28,30 @@ To increase the likelihood of your pull request being accepted:
2828

2929
## Contribute to RAP Community of Practice Website
3030

31-
### Installing MkDocs
31+
### Via Github Codespaces
32+
The **easiest way is just to open the repo in [Github Codespaces](https://github.com/features/codespaces)** - you can then make your changes, run the website to check it, and commit those back all within a VSCode environment running a fresh Python install.
3233

33-
Run the commands (or follow the MkDocs documentation to locally pip install MkDocs):
34+
### Working locally
3435

35-
```bash
36-
# environment.yml
36+
If you don't want to use Github codespaces (or can't because it's blocked, or you've run out of credits), then you can make changes to the repo locally on your machine.
3737

38-
conda env create -f environment.yml
39-
conda activate rap-cop-pages
38+
#### Requirements
4039

41-
---
40+
It's probably most ideal to work on a linux envirnoment, but any machine which can run Python and is connected to the internet should be ok.
4241

43-
# requirements.txt
42+
#### Making a Python environment and installing dependencies
4443

45-
## using pip
46-
python -m pip install -r requirements.txt
44+
You'll need to make the same environment that we use to run the website.
4745

48-
## using Conda
49-
conda create --name <env_name> --file requirements.txt
50-
```
51-
For best practices on creating virtual environments, please refer to the [RAP Community of Practice training resources](./docs/training_resources/python/virtual-environments/why-use-virtual-environments.md).
52-
53-
### Hosting
54-
55-
To host the website locally to view the live changes, run the command:
56-
57-
```bash
58-
mkdocs serve
59-
```
60-
61-
Open up http://127.0.0.1:8000/ in your browser, and you'll see the [RAP Community of Practice home page](https://nhsdigital.github.io/rap-community-of-practice/) being displayed with your updates applied.
62-
63-
Read more: [Getting Started with MkDocs](https://www.mkdocs.org/getting-started/#getting-started-with-mkdocs)
46+
1. Make a `venv` and install the python libraries found in our `requirements.txt`
47+
* We have a [great little guide](https://nhsdigital.github.io/rap-community-of-practice/training_resources/python/virtual-environments/venv/) on how to do the above!
48+
1. Activate the `venv` and in the command line run: `mkdocs serve` (depending on how your python install is setup, this might need to be `python -m mkdocs serve`)
49+
1. Open up http://127.0.0.1:8000/ in your browser, and you'll see the [RAP Community of Practice home page](https://nhsdigital.github.io/rap-community-of-practice/) being displayed with your updates applied.
50+
* Read more: [Getting Started with MkDocs](https://www.mkdocs.org/getting-started/#getting-started-with-mkdocs)
6451

6552
### Editing the contents
6653

67-
To add a new file to the repository and website, you can add the file as you would normally and then update 'nav' in mkdocs.yml to include the file within the nested list. Don't forget to check that the links, images, headings, and contents are all working correctly on both the website and in the GitHub repo.
54+
To add a new page to the website, you can add the file as you would normally and then update 'nav' in mkdocs.yml to include the file within the nested list. Don't forget to check that the links, images, headings, and contents are all working correctly on both the website and in the GitHub repo.
6855

6956
All of the files accessed via the website are nested within the 'docs' folder.
7057

docs/site_info/rap-release-workflow.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,32 @@ tags:
77

88
#
99

10+
## Current Release Process (coding in the open)
11+
12+
The new release workflow for the RAP Community of Practice is very simple.
13+
14+
```mermaid
15+
flowchart TD
16+
Z[make a branch or fork of the repo]-->A
17+
A[make changes on the branch or fork of the repo]-->B[when complete make a pull request in main branch of this repo];
18+
B-->C[pull request checked];
19+
C-->F[approved and changes merged into the main branch];
20+
C--Feed back given-->E[Make required changes];
21+
E-->C;
22+
F--At a significant milestone-->D[a release is made, bumping up the version of the repo and updating the visible website];
23+
```
24+
25+
It's important to note that the website is not built off the "main" branch - but instead it builds "on release".
26+
27+
This is described fully in the github action that builds the website: [pages-build-deployment](https://github.com/NHSDigital/rap-community-of-practice/blob/main/.github/workflows/pages-build-deployment.yml)
28+
29+
## Old release process (two repos, one private, one public)
30+
31+
!!! warning "The release process below is no longer in use!"
32+
33+
- The RAP Community of Practice now uses a very simple release process - fully coded in the open.
34+
- This page mostly details our old release process, where we had a hidden "dev" repo, which published to this public repo on release - we're leaving this guide up here so people can learn from it and use it (it would be useful for more sensitive work)
35+
1036
!!! tip "TLDR"
1137

1238
- The RAP Community of Practice has embraced CI/CD by implementing an automated release process that uses GitHub Actions to move guidances written and reviewed in our private ([RAP_CoP_dev]) repository to the public ([rap-community-of-practice]) repository.

0 commit comments

Comments
 (0)