Skip to content

Commit 8380b50

Browse files
authored
Merge pull request #1 from nhsengland/sh_load_existing
Copying over the existing website demo code
2 parents 281ba52 + 4feb2d2 commit 8380b50

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1962
-3
lines changed

.devcontainer/devcontainer.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{"image":"mcr.microsoft.com/devcontainers/universal:2",
2+
"postCreateCommand": "pip3 install --user -r requirements.txt && python -m mkdocs serve"
3+
}

.github/pull_request_template.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<!--
2+
- Pull request title follows this format "SH NV-1234 Solves this problem":
3+
- Initials of author
4+
- associated Jira ticket number
5+
- brief description
6+
- Choose appropriate labels
7+
- Use the "development" sidebar option to indicate if this closes any open issues, etc.
8+
-->
9+
# Description
10+
<!--
11+
In the body of the pull request, provide a description following the "What, Why, How" approach.
12+
13+
You could also add a gif using the "gifs for GitHub" Chrome extension: https://chrome.google.com/webstore/detail/gifs-for-github/dkgjnpbipbdaoaadbdhpiokaemhlphep/related?hl=en
14+
-->
15+
16+
**What**:
17+
18+
🧠**Why?**:
19+
20+
👨‍💻**How?**:
21+
22+
# Checklist:
23+
Have checked for the following:
24+
- [ ] The website still builds correctly, and you can view it using `mkdocs serve`.
25+
- [ ] There are no new "warnings" from mkdocs
26+
- [ ] Does your page follow the [page template](https://nhsdigital.github.io/rap-community-of-practice/example_RAP_CoP_page/) (or [here in Markdown](https://github.com/NHSDigital/rap-community-of-practice/blob/main/docs/example_RAP_CoP_page.md))? (**need to make a new one specific to NHSE Data Science**)
27+
- [ ] Spelling errors
28+
- [ ] Consistent capitalization
29+
- [ ] Consistent numbers
30+
- [ ] Material features incorrectly implemented: search for code blocks and markers (e.g. !!!).
31+
- [ ] Code snippets don't work
32+
- [ ] Images not working
33+
- [ ] Links not working
34+
35+
## Where it was tested
36+
<!--
37+
Please describe the test configuration - below is an example.
38+
-->
39+
- Github Codespaces - 2-core, 4GB RAM, 32GB hard drive
40+
- devcontainer.json describes further settings
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Website Deployment
2+
3+
# Controls when the workflow will run
4+
on:
5+
# Triggers the workflow on push events but only for the "main" branch and in the docs directory
6+
push:
7+
branches:
8+
- 'main'
9+
#paths:
10+
# - 'docs/**'
11+
12+
# Allows you to run this workflow manually from the Actions tab
13+
workflow_dispatch:
14+
15+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
16+
jobs:
17+
# This workflow contains a single job called "deploy"
18+
deploy:
19+
# The type of runner that the job will run on
20+
runs-on: ubuntu-latest
21+
# Steps represent a sequence of tasks that will be executed as part of the job
22+
steps:
23+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
24+
- name: "Checkout Code"
25+
uses: actions/checkout@v3
26+
27+
- name: "Setup Python"
28+
uses: actions/setup-python@v2
29+
with:
30+
python-version: 3.x
31+
32+
- name: "Install Python Packages"
33+
run: pip install -r requirements.txt
34+
35+
- name: "Run mkdocs to build website"
36+
run: mkdocs gh-deploy --force --clean --verbose

.gitignore

+7-1
Original file line numberDiff line numberDiff line change
@@ -157,4 +157,10 @@ cython_debug/
157157
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
158158
# and can be added to the global gitignore or merged into this file. For a more nuclear
159159
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
160-
#.idea/
160+
.idea/
161+
162+
.DS_Store
163+
164+
# VSCode
165+
166+
.vscode/

CODE_OF_CONDUCT.md

+91
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Code of Conduct for NHS Digital
2+
3+
Contributors to repositories hosted in NHS Digital are expected to
4+
follow the Contributor Covenant Code of
5+
Conduct, and those working within Government are also expected to follow the Civil Service Code.
6+
7+
## Civil Service Code
8+
9+
- The [Civil Service Code](https://www.gov.uk/government/publications/civil-service-code/the-civil-service-code).
10+
11+
## Our Pledge
12+
13+
We as members, contributors, and leaders pledge to make participation in our
14+
community a harassment-free experience for everyone, regardless of age, body
15+
size, visible or invisible disability, ethnicity, sex characteristics, gender
16+
identity and expression, level of experience, education, socio-economic status,
17+
nationality, personal appearance, race, religion, or sexual identity
18+
and orientation.
19+
20+
We pledge to act and interact in ways that contribute to an open, welcoming,
21+
diverse, inclusive, and healthy community.
22+
23+
## Our Standards
24+
25+
Examples of behaviour that contributes to a positive environment for our
26+
community include:
27+
28+
- Demonstrating empathy and kindness toward other people
29+
- Being respectful of differing opinions, viewpoints, and experiences
30+
- Giving and gracefully accepting constructive feedback
31+
- Accepting responsibility and apologizing to those affected by our mistakes,
32+
and learning from the experience
33+
- Focusing on what is best not just for us as individuals, but for the
34+
overall community
35+
36+
Examples of unacceptable behaviour include:
37+
38+
- The use of sexualized language or imagery, and sexual attention or
39+
advances of any kind
40+
- Trolling, insulting or derogatory comments, and personal or political attacks
41+
- Public or private harassment
42+
- Publishing others' private information, such as a physical or email
43+
address, without their explicit permission
44+
- Other conduct which could reasonably be considered inappropriate in a
45+
professional setting
46+
47+
## Enforcement Responsibilities
48+
49+
Community leaders are responsible for clarifying and enforcing our standards of
50+
acceptable behaviour and will take appropriate and fair corrective action in
51+
response to any behaviour that they deem inappropriate, threatening, offensive,
52+
or harmful.
53+
54+
Community leaders have the right and responsibility to remove, edit, or reject
55+
comments, commits, code, wiki edits, issues, and other contributions that are
56+
not aligned to this Code of Conduct, and will communicate reasons for moderation
57+
decisions when appropriate.
58+
59+
## Scope
60+
61+
This Code of Conduct applies within all community spaces, and also applies when
62+
an individual is officially representing the community in public spaces.
63+
Examples of representing our community include using an official e-mail address,
64+
posting via an official social media account, or acting as an appointed
65+
representative at an online or offline event.
66+
67+
## Enforcement
68+
69+
Instances of abusive, harassing, or otherwise unacceptable behaviour may be
70+
reported to the community leaders responsible for enforcement at
71+
72+
All complaints will be reviewed and investigated and will result in a response that
73+
is deemed necessary and appropriate to the circumstances. The project team is
74+
obligated to maintain confidentiality with regard to the reporter of an incident.
75+
Further details of specific enforcement policies may be posted separately.
76+
77+
Project maintainers who do not follow or enforce the Code of Conduct in good
78+
faith may face temporary or permanent repercussions as determined by other
79+
members of the project's leadership.
80+
81+
## Attribution
82+
83+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
84+
[version 2.0](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html) and the `govcookiecutter` [Code of Conduct](https://github.com/best-practice-and-impact/govcookiecutter/blob/main/CODE_OF_CONDUCT.md).
85+
86+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
87+
enforcement ladder](https://github.com/mozilla/diversity).
88+
89+
[homepage]: https://www.contributor-covenant.org
90+
91+
For answers to common questions about this code of conduct, see the [FAQ](https://www.contributor-covenant.org/faq). Translations are available [here](https://www.contributor-covenant.org/translations).

CONTRIBUTE.md

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Contribute
2+
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.
4+
5+
## Creating an issue
6+
7+
If you think of something worth including, improving, or want to contribute, please [raise an issue on GitHub](https://github.com/NHSDigital/rap-community-of-practice/issues).
8+
9+
## Submitting a pull request
10+
11+
If you want to contribute to our resources:
12+
13+
1. [Fork][fork] or clone the repository
14+
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`
16+
4. Make your change
17+
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)
18+
6. Push to your fork and [submit a pull request][pr]
19+
20+
Your pull request will then be reviewed. You may receive some feedback and suggested changes before it can be approved and your pull request merged.
21+
22+
To increase the likelihood of your pull request being accepted:
23+
24+
- If you are making visual changes, include a screenshot of what the affected element looks like, both before and after.
25+
- Follow the [style guide][style].
26+
- Keep your change as focussed as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
27+
- Write [good commit messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
28+
29+
## Contribute to RAP Community of Practice Website
30+
31+
### Installing MkDocs
32+
33+
Run the commands (or follow the MkDocs documentation to locally pip install MkDocs):
34+
35+
```bash
36+
# environment.yml
37+
38+
conda env create -f environment.yml
39+
conda activate rap-cop-pages
40+
41+
---
42+
43+
# requirements.txt
44+
45+
## using pip
46+
pip install -r requirements.txt
47+
48+
## using Conda
49+
conda create --name <env_name> --file requirements.txt
50+
```
51+
52+
### Hosting
53+
54+
To host the website locally to view the live changes, run the command:
55+
56+
```bash
57+
mkdocs serve
58+
```
59+
60+
### Editing the contents
61+
62+
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.
63+
64+
All of the files accessed via the website are nested within the 'docs' folder.
65+
66+
The website currently uses the [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/getting-started/) theme. This sets the layout, colour, font, search bar, header, footer, navigation bar and contents. You can follow the documentation to make any changes (e.g. change the [colour scheme](https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/)) as it is simple to use and also easy to overwrite. There is a separate stylesheet, [extra.css](./docs/stylesheets/extra.css), which is used to overwrite the colours, fonts and some of the sizing for some elements.
67+
Here is a good [cheat sheet](https://yakworks.github.io/docmark/cheat-sheet/) for what features can be used in MkDocs and also interesting features in [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/reference/).
68+
69+
## Resources
70+
71+
- [Contributing to Projects](https://docs.github.com/en/get-started/quickstart/contributing-to-projects)
72+
- [Using Pull Requests](https://help.github.com/articles/using-pull-requests/)
73+
- [GitHub Help](https://help.github.com)
74+
75+
[fork]: https://github.com/pages-themes/slate/fork
76+
[pr]: https://github.com/pages-themes/slate/compare
77+
[style]: http://ben.balter.com/jekyll-style-guide/

LICENCE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Crown Copyright NHS Digital
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+27-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,27 @@
1-
# datascience
2-
Website for the data science team within NHS England.
1+
# [NHS England Data Science](https://NHSDigital.github.io/data-science/)
2+
![CI](https://github.com/NHSDigital/data_science_site/actions/workflows/pages-build-deployment.yml/badge.svg "CI badge indicating passing or failing status")
3+
[![Release Version](https://img.shields.io/github/v/release/nhsdigital/data_science_site "Release version")](https://github.com/NHSDigital/data_science_site/releases)
4+
[![MkDocs Material](https://img.shields.io/badge/style-MkDocs%20Material-darkblue "Markdown Style: MkDocs")](https://squidfunk.github.io/mkdocs-material/reference/)
5+
[![licence: MIT](https://img.shields.io/badge/Licence-MIT-yellow.svg)](https://opensource.org/licenses/MIT "MIT License")
6+
[![licence: OGL3](https://img.shields.io/badge/Licence-OGL3-darkgrey "licence: Open Government Licence 3")](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/)
7+
8+
9+
> **This material is maintained by the [NHS England Data Science team](mailto:[email protected])**.
10+
>
11+
> See our other work here: [NHS Digital Analytical Services](https://github.com/NHSDigital/data-analytics-services).
12+
13+
<br>
14+
15+
**Welcome to the landing page for the NHS England Data Science Team.**
16+
17+
Visit our [website](https://NHSDigital.github.io/data-science/) for more information about our work!
18+
19+
20+
## Licence
21+
22+
Unless stated otherwise, the codebase is released under the [MIT Licence][2]. This covers both the codebase and any sample code in the documentation.
23+
24+
HTML and Markdown documentation is © Crown copyright and available under the terms of the [Open Government 3.0](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/) licence.
25+
26+
[1]: ./CONTRIBUTE.md
27+
[2]: ./LICENCE

docs/about.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
hide:
3+
- navigation
4+
---
5+
6+
# Data Science in NHS England
7+
8+
> This page could describe a bit about our team

docs/articles/.pages

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# this page can be used to arrange the other pages and apply formatting to the nav etc.

docs/articles/index.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Blog
2+
3+
> A team blog if we wish to make one

docs/codebases.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
hide:
3+
- navigation
4+
---
5+
6+
# Codebases
Loading
Loading
Loading
Loading

docs/images/cartoon hospital.jpeg

228 KB
Loading

docs/images/favicon/favicon.ico

14.7 KB
Binary file not shown.
36.1 KB
Loading

docs/images/logo/nhs-logo.png

2.54 KB
Loading
37.6 KB
Loading

docs/index.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
hide:
3+
- navigation
4+
- toc
5+
- footer
6+
7+
template: home.html
8+
---

docs/javascripts/mathjax.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# needed to silence a warning

docs/meta_page.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
hide:
3+
- navigation
4+
---
5+
6+
# Meta Page
7+
8+
9+
## Contribution
10+
11+
This uses:
12+
- mkdocs-material
13+
- https://github.com/lukasgeiter/mkdocs-awesome-pages-plugin

docs/our_work/.pages

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# this page can be used to arrange the other pages and apply formatting to the nav etc.

0 commit comments

Comments
 (0)