Skip to content

Commit

Permalink
Merge pull request #1 from nhsengland/sh_load_existing
Browse files Browse the repository at this point in the history
Copying over the existing website demo code
  • Loading branch information
amaiaita authored Dec 8, 2023
2 parents 281ba52 + 4feb2d2 commit 8380b50
Show file tree
Hide file tree
Showing 63 changed files with 1,962 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{"image":"mcr.microsoft.com/devcontainers/universal:2",
"postCreateCommand": "pip3 install --user -r requirements.txt && python -m mkdocs serve"
}
40 changes: 40 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!--
- Pull request title follows this format "SH NV-1234 Solves this problem":
- Initials of author
- associated Jira ticket number
- brief description
- Choose appropriate labels
- Use the "development" sidebar option to indicate if this closes any open issues, etc.
-->
# Description
<!--
In the body of the pull request, provide a description following the "What, Why, How" approach.
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
-->

**What**:

🧠**Why?**:

👨‍💻**How?**:

# Checklist:
Have checked for the following:
- [ ] The website still builds correctly, and you can view it using `mkdocs serve`.
- [ ] There are no new "warnings" from mkdocs
- [ ] 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**)
- [ ] Spelling errors
- [ ] Consistent capitalization
- [ ] Consistent numbers
- [ ] Material features incorrectly implemented: search for code blocks and markers (e.g. !!!).
- [ ] Code snippets don't work
- [ ] Images not working
- [ ] Links not working

## Where it was tested
<!--
Please describe the test configuration - below is an example.
-->
- Github Codespaces - 2-core, 4GB RAM, 32GB hard drive
- devcontainer.json describes further settings
36 changes: 36 additions & 0 deletions .github/workflows/pages-build-deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Website Deployment

# Controls when the workflow will run
on:
# Triggers the workflow on push events but only for the "main" branch and in the docs directory
push:
branches:
- 'main'
#paths:
# - 'docs/**'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "deploy"
deploy:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: "Checkout Code"
uses: actions/checkout@v3

- name: "Setup Python"
uses: actions/setup-python@v2
with:
python-version: 3.x

- name: "Install Python Packages"
run: pip install -r requirements.txt

- name: "Run mkdocs to build website"
run: mkdocs gh-deploy --force --clean --verbose
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,10 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.idea/

.DS_Store

# VSCode

.vscode/
91 changes: 91 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Code of Conduct for NHS Digital

Contributors to repositories hosted in NHS Digital are expected to
follow the Contributor Covenant Code of
Conduct, and those working within Government are also expected to follow the Civil Service Code.

## Civil Service Code

- The [Civil Service Code](https://www.gov.uk/government/publications/civil-service-code/the-civil-service-code).

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behaviour that contributes to a positive environment for our
community include:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behaviour include:

- The use of sexualized language or imagery, and sexual attention or
advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behaviour and will take appropriate and fair corrective action in
response to any behaviour that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behaviour may be
reported to the community leaders responsible for enforcement at
[email protected].
All complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
[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).

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

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).
77 changes: 77 additions & 0 deletions CONTRIBUTE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Contribute

Hi there! We're thrilled that you'd like to contribute to this landing page repository. Your help is essential for keeping it great.

## Creating an issue

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

## Submitting a pull request

If you want to contribute to our resources:

1. [Fork][fork] or clone the repository
2. Configure and install the dependencies if you want to run the page in your machine, otherwise none.
3. Create a new branch: `git checkout -b my-branch-name`
4. Make your change
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)
6. Push to your fork and [submit a pull request][pr]

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.

To increase the likelihood of your pull request being accepted:

- If you are making visual changes, include a screenshot of what the affected element looks like, both before and after.
- Follow the [style guide][style].
- 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.
- Write [good commit messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).

## Contribute to RAP Community of Practice Website

### Installing MkDocs

Run the commands (or follow the MkDocs documentation to locally pip install MkDocs):

```bash
# environment.yml

conda env create -f environment.yml
conda activate rap-cop-pages

---

# requirements.txt

## using pip
pip install -r requirements.txt

## using Conda
conda create --name <env_name> --file requirements.txt
```

### Hosting

To host the website locally to view the live changes, run the command:

```bash
mkdocs serve
```

### Editing the contents

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.

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

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

## Resources

- [Contributing to Projects](https://docs.github.com/en/get-started/quickstart/contributing-to-projects)
- [Using Pull Requests](https://help.github.com/articles/using-pull-requests/)
- [GitHub Help](https://help.github.com)

[fork]: https://github.com/pages-themes/slate/fork
[pr]: https://github.com/pages-themes/slate/compare
[style]: http://ben.balter.com/jekyll-style-guide/
21 changes: 21 additions & 0 deletions LICENCE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Crown Copyright NHS Digital

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
29 changes: 27 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,27 @@
# datascience
Website for the data science team within NHS England.
# [NHS England Data Science](https://NHSDigital.github.io/data-science/)
![CI](https://github.com/NHSDigital/data_science_site/actions/workflows/pages-build-deployment.yml/badge.svg "CI badge indicating passing or failing status")
[![Release Version](https://img.shields.io/github/v/release/nhsdigital/data_science_site "Release version")](https://github.com/NHSDigital/data_science_site/releases)
[![MkDocs Material](https://img.shields.io/badge/style-MkDocs%20Material-darkblue "Markdown Style: MkDocs")](https://squidfunk.github.io/mkdocs-material/reference/)
[![licence: MIT](https://img.shields.io/badge/Licence-MIT-yellow.svg)](https://opensource.org/licenses/MIT "MIT License")
[![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/)


> **This material is maintained by the [NHS England Data Science team](mailto:[email protected])**.
>
> See our other work here: [NHS Digital Analytical Services](https://github.com/NHSDigital/data-analytics-services).
<br>

**Welcome to the landing page for the NHS England Data Science Team.**

Visit our [website](https://NHSDigital.github.io/data-science/) for more information about our work!


## Licence

Unless stated otherwise, the codebase is released under the [MIT Licence][2]. This covers both the codebase and any sample code in the documentation.

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.

[1]: ./CONTRIBUTE.md
[2]: ./LICENCE
8 changes: 8 additions & 0 deletions docs/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
hide:
- navigation
---

# Data Science in NHS England

> This page could describe a bit about our team
1 change: 1 addition & 0 deletions docs/articles/.pages
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# this page can be used to arrange the other pages and apply formatting to the nav etc.
3 changes: 3 additions & 0 deletions docs/articles/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Blog

> A team blog if we wish to make one
6 changes: 6 additions & 0 deletions docs/codebases.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
hide:
- navigation
---

# Codebases
1 change: 1 addition & 0 deletions docs/images/NHS Digital logo_WEB_LEFT.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/NHS-Digital-logo_WEB_LEFT-235x183.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Staff_hot_desking_in_the_HUB_01.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cartoon hospital.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/favicon/favicon.ico
Binary file not shown.
Binary file added docs/images/logo/nhs-blue-on-white.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/logo/nhs-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/logo/nhs-white-on-blue.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
hide:
- navigation
- toc
- footer

template: home.html
---
1 change: 1 addition & 0 deletions docs/javascripts/mathjax.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# needed to silence a warning
13 changes: 13 additions & 0 deletions docs/meta_page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
hide:
- navigation
---

# Meta Page


## Contribution

This uses:
- mkdocs-material
- https://github.com/lukasgeiter/mkdocs-awesome-pages-plugin
1 change: 1 addition & 0 deletions docs/our_work/.pages
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# this page can be used to arrange the other pages and apply formatting to the nav etc.
Loading

0 comments on commit 8380b50

Please sign in to comment.