|
1 | | -# Repository Template |
| 1 | +# Lung Cancer Screening |
2 | 2 |
|
3 | | -[](https://github.com/nhs-england-tools/repository-template/actions/workflows/cicd-1-pull-request.yaml) |
4 | | -[](https://sonarcloud.io/summary/new_code?id=repository-template) |
5 | | - |
6 | | -Start with an overview or a brief description of what the project is about and what it does. For example - |
7 | | - |
8 | | -Welcome to our repository template designed to streamline your project setup! This robust template provides a reliable starting point for your new projects, covering an essential tech stack and encouraging best practices in documenting. |
9 | | - |
10 | | -This repository template aims to foster a user-friendly development environment by ensuring that every included file is concise and adequately self-documented. By adhering to this standard, we can promote increased clarity and maintainability throughout your project's lifecycle. Bundled within this template are resources that pave the way for seamless repository creation. Currently supported technologies are: |
11 | | - |
12 | | -- Terraform |
13 | | -- Docker |
14 | | - |
15 | | -Make use of this repository template to expedite your project setup and enhance your productivity right from the get-go. Enjoy the advantage of having a well-structured, self-documented project that reduces overhead and increases focus on what truly matters - coding! |
| 3 | +This service is a digital version Lung Cancer Screening questionnaire and risk calculator. |
16 | 4 |
|
17 | 5 | ## Table of Contents |
18 | 6 |
|
19 | | -- [Repository Template](#repository-template) |
| 7 | +- [Lung Cancer Screening](#lung-cancer-screening) |
20 | 8 | - [Table of Contents](#table-of-contents) |
| 9 | + - [Prerequisites](#prerequisites) |
21 | 10 | - [Setup](#setup) |
22 | | - - [Prerequisites](#prerequisites) |
23 | | - - [Configuration](#configuration) |
24 | | - - [Usage](#usage) |
25 | | - - [Testing](#testing) |
26 | | - - [Design](#design) |
27 | | - - [Diagrams](#diagrams) |
28 | | - - [Modularity](#modularity) |
| 11 | + - [Running the app locally](#running-the-app-locally) |
| 12 | + - [Testing](#testing) |
29 | 13 | - [Contributing](#contributing) |
30 | | - - [Contacts](#contacts) |
31 | 14 | - [Licence](#licence) |
32 | 15 |
|
33 | | -## Setup |
34 | | - |
35 | | -By including preferably a one-liner or if necessary a set of clear CLI instructions we improve user experience. This should be a frictionless installation process that works on various operating systems (macOS, Linux, Windows WSL) and handles all the dependencies. |
36 | | - |
37 | | -Clone the repository |
38 | | - |
39 | | -```shell |
40 | | -git clone https://github.com/nhs-england-tools/repository-template.git |
41 | | -cd nhs-england-tools/repository-template |
42 | | -``` |
43 | | - |
44 | | -### Prerequisites |
| 16 | +## Prerequisites |
45 | 17 |
|
46 | 18 | The following software packages, or their equivalents, are expected to be installed and configured: |
47 | 19 |
|
48 | 20 | - [Docker](https://www.docker.com/) container runtime or a compatible tool, e.g. [Podman](https://podman.io/), |
49 | | -- [asdf](https://asdf-vm.com/) version manager, |
50 | | -- [GNU make](https://www.gnu.org/software/make/) 3.82 or later, |
51 | | - |
52 | | -> [!NOTE]<br> |
53 | | -> The version of GNU make available by default on macOS is earlier than 3.82. You will need to upgrade it or certain `make` tasks will fail. On macOS, you will need [Homebrew](https://brew.sh/) installed, then to install `make`, like so: |
54 | | -> |
55 | | -> ```shell |
56 | | -> brew install make |
57 | | -> ``` |
58 | | -> |
59 | | -> You will then see instructions to fix your [`$PATH`](https://github.com/nhs-england-tools/dotfiles/blob/main/dot_path.tmpl) variable to make the newly installed version available. If you are using [dotfiles](https://github.com/nhs-england-tools/dotfiles), this is all done for you. |
60 | | -
|
61 | | -- [GNU sed](https://www.gnu.org/software/sed/) and [GNU grep](https://www.gnu.org/software/grep/) are required for the scripted command-line output processing, |
62 | | -- [GNU coreutils](https://www.gnu.org/software/coreutils/) and [GNU binutils](https://www.gnu.org/software/binutils/) may be required to build dependencies like Python, which may need to be compiled during installation, |
63 | | -
|
64 | | -> [!NOTE]<br> |
65 | | -> For macOS users, installation of the GNU toolchain has been scripted and automated as part of the `dotfiles` project. Please see this [script](https://github.com/nhs-england-tools/dotfiles/blob/main/assets/20-install-base-packages.macos.sh) for details. |
| 21 | +- [GNU make](https://www.gnu.org/software/make/) 3.82 or later |
66 | 22 |
|
67 | | -- [Python](https://www.python.org/) required to run Git hooks, |
68 | | -- [`jq`](https://jqlang.github.io/jq/) a lightweight and flexible command-line JSON processor. |
69 | | -
|
70 | | -### Configuration |
| 23 | +## Setup |
71 | 24 |
|
72 | | -Installation and configuration of the toolchain dependencies |
| 25 | +To setup the pre commit hooks run |
73 | 26 |
|
74 | 27 | ```shell |
75 | 28 | make config |
76 | 29 | ``` |
77 | 30 |
|
78 | | -## Usage |
79 | | - |
80 | | -After a successful installation, provide an informative example of how this project can be used. Additional code snippets, screenshots and demos work well in this space. You may also link to the other documentation resources, e.g. the [User Guide](./docs/user-guide.md) to demonstrate more use cases and to show more features. |
81 | | - |
82 | | -### Testing |
83 | | - |
84 | | -There are `make` tasks for you to configure to run your tests. Run `make test` to see how they work. You should be able to use the same entry points for local development as in your CI pipeline. |
85 | | - |
86 | | -## Design |
87 | | - |
88 | | -### Diagrams |
| 31 | +## Running the app locally |
89 | 32 |
|
90 | | -The [C4 model](https://c4model.com/) is a simple and intuitive way to create software architecture diagrams that are clear, consistent, scalable and most importantly collaborative. This should result in documenting all the system interfaces, external dependencies and integration points. |
| 33 | +The project runs locally inside docker. Please ensure you have docker installed. |
91 | 34 |
|
92 | | - |
| 35 | +You can run the application by running: |
93 | 36 |
|
94 | | -The source for diagrams should be in Git for change control and review purposes. Recommendations are [draw.io](https://app.diagrams.net/) (example above in [docs](.docs/diagrams/) folder) and [Mermaids](https://github.com/mermaid-js/mermaid). Here is an example Mermaids sequence diagram: |
95 | | - |
96 | | -```mermaid |
97 | | -sequenceDiagram |
98 | | - User->>+Service: GET /users?params=... |
99 | | - Service->>Service: auth request |
100 | | - Service->>Database: get all users |
101 | | - Database-->>Service: list of users |
102 | | - Service->>Service: filter users |
103 | | - Service-->>-User: list[User] |
| 37 | +```shell |
| 38 | +make dev-run |
104 | 39 | ``` |
105 | 40 |
|
106 | | -### Modularity |
| 41 | +## Testing |
107 | 42 |
|
108 | | -Most of the projects are built with customisability and extendability in mind. At a minimum, this can be achieved by implementing service level configuration options and settings. The intention of this section is to show how this can be used. If the system processes data, you could mention here for example how the input is prepared for testing - anonymised, synthetic or live data. |
| 43 | +There are `make` tasks for you to configure to run your tests. Run `make test` to see how they work. You should be able to use the same entry points for local development as in your CI pipeline. |
109 | 44 |
|
110 | 45 | ## Contributing |
111 | 46 |
|
112 | | -Describe or link templates on how to raise an issue, feature request or make a contribution to the codebase. Reference the other documentation files, like |
113 | | - |
114 | | -- Environment setup for contribution, i.e. `CONTRIBUTING.md` |
115 | | -- Coding standards, branching, linting, practices for development and testing |
116 | | -- Release process, versioning, changelog |
117 | | -- Backlog, board, roadmap, ways of working |
118 | | -- High-level requirements, guiding principles, decision records, etc. |
119 | | - |
120 | | -## Contacts |
121 | | - |
122 | | -Provide a way to contact the owners of this project. It can be a team, an individual or information on the means of getting in touch via active communication channels, e.g. opening a GitHub discussion, raising an issue, etc. |
| 47 | +- Make sure you have pre-commit running so that pre-commit hooks run automatically when you commit - this should have been set up automatically when you ran `make config`. |
| 48 | +- Consider switching on format-on-save in your editor (e.g. [Black](https://github.com/psf/black) for Python) |
123 | 49 |
|
124 | 50 | ## Licence |
125 | 51 |
|
126 | | -> The [LICENCE.md](./LICENCE.md) file will need to be updated with the correct year and owner |
127 | | -
|
128 | | -Unless stated otherwise, the codebase is released under the MIT License. This covers both the codebase and any sample code in the documentation. |
| 52 | +Unless stated otherwise, the codebase is released under the MIT License. This covers both the codebase and any sample code in the documentation. See [LICENCE.md](./LICENCE.md). |
129 | 53 |
|
130 | 54 | 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/). |
0 commit comments