From 23537216f75580d915b2f09c4bce22ce1e739c29 Mon Sep 17 00:00:00 2001 From: Andrew Hosgood Date: Fri, 8 Mar 2024 10:23:24 +0000 Subject: [PATCH] Restructure --- .../communication.md | 0 .../{getting-started => get-started}/index.md | 0 .../services.md | 2 +- .../{getting-started => get-started}/tools.md | 0 docs/technology/{ => backend}/python.md | 18 +++--- docs/technology/{ => backend}/scala.md | 0 docs/technology/{ => database}/postgres.md | 0 docs/technology/{ => frontend}/css.md | 4 +- docs/technology/{ => frontend}/html.md | 4 +- docs/technology/{ => frontend}/javascript.md | 4 +- docs/technology/index.md | 22 +++---- docs/technology/{ => infrastructure}/aws.md | 34 +++++------ .../{ => infrastructure}/containers.md | 0 docs/technology/{ => infrastructure}/nginx.md | 0 .../{ => infrastructure}/terraform.md | 0 .../standards}/accessibility.md | 0 .../standards}/api.md | 0 .../standards}/browser-support.md | 0 .../standards}/licences.md | 2 +- docs/technology/standards/security.md | 8 +++ .../standards}/testing.md | 0 .../standards}/url.md | 0 .../progressive-enhancement.md | 10 ++-- docs/ways-of-working/version-control.md | 2 +- mkdocs.yml | 58 ++++++++++--------- 25 files changed, 90 insertions(+), 78 deletions(-) rename docs/{getting-started => get-started}/communication.md (100%) rename docs/{getting-started => get-started}/index.md (100%) rename docs/{getting-started => get-started}/services.md (95%) rename docs/{getting-started => get-started}/tools.md (100%) rename docs/technology/{ => backend}/python.md (93%) rename docs/technology/{ => backend}/scala.md (100%) rename docs/technology/{ => database}/postgres.md (100%) rename docs/technology/{ => frontend}/css.md (91%) rename docs/technology/{ => frontend}/html.md (94%) rename docs/technology/{ => frontend}/javascript.md (94%) rename docs/technology/{ => infrastructure}/aws.md (98%) rename docs/technology/{ => infrastructure}/containers.md (100%) rename docs/technology/{ => infrastructure}/nginx.md (100%) rename docs/technology/{ => infrastructure}/terraform.md (100%) rename docs/{ways-of-working => technology/standards}/accessibility.md (100%) rename docs/{ways-of-working => technology/standards}/api.md (100%) rename docs/{ways-of-working => technology/standards}/browser-support.md (100%) rename docs/{ways-of-working => technology/standards}/licences.md (83%) create mode 100644 docs/technology/standards/security.md rename docs/{ways-of-working => technology/standards}/testing.md (100%) rename docs/{ways-of-working => technology/standards}/url.md (100%) diff --git a/docs/getting-started/communication.md b/docs/get-started/communication.md similarity index 100% rename from docs/getting-started/communication.md rename to docs/get-started/communication.md diff --git a/docs/getting-started/index.md b/docs/get-started/index.md similarity index 100% rename from docs/getting-started/index.md rename to docs/get-started/index.md diff --git a/docs/getting-started/services.md b/docs/get-started/services.md similarity index 95% rename from docs/getting-started/services.md rename to docs/get-started/services.md index b2c3700..7793eb3 100644 --- a/docs/getting-started/services.md +++ b/docs/get-started/services.md @@ -20,7 +20,7 @@ Make sure that you download the correct version of Docker. If you have a newer A Creating a [Docker account](https://hub.docker.com/signup) will give you a higher download limit. For anonymous users, the rate limit is set to 100 pulls per 6 hours per IP address but for authenticated users, it's 200 pulls per 6 hour period. -We have a set way of working and [standards for our containers](../technology/containers.md) to ensure security and consistency. +We have a set way of working and [standards for our containers](../technology/infrastructure//containers.md) to ensure security and consistency. ## GovWifi diff --git a/docs/getting-started/tools.md b/docs/get-started/tools.md similarity index 100% rename from docs/getting-started/tools.md rename to docs/get-started/tools.md diff --git a/docs/technology/python.md b/docs/technology/backend/python.md similarity index 93% rename from docs/technology/python.md rename to docs/technology/backend/python.md index 372c973..234d71b 100644 --- a/docs/technology/python.md +++ b/docs/technology/backend/python.md @@ -1,9 +1,9 @@ # Python 1. **Version** - 1. The version of Python used SHOULD be 3.11 + 1. The version of Python used SHOULD be 3.11 or above 1. The version of Python used MUST be 3.8 or above - 1. Python projects SHOULD use one of the [TNA base Docker images](../resources/docker-images.md) + 1. Python projects SHOULD use one of the [TNA base Docker images](../../resources/docker-images.md) 1. **Style/linting** 1. Python code MUST be styled with [Black](#black), [Flake8](#flake8) and [isort](#isort) 1. The maximum [cyclomatic complexity](https://en.wikipedia.org/wiki/Cyclomatic_complexity) of the code MUST be no larger than 20 @@ -15,8 +15,10 @@ 1. Python applications MUST use one of the approved [frameworks](#frameworks) 1. **Packages** 1. Python packages SHOULD be made using pip - 1. Python packages SHOULD be deployed to [PyPI](../third-party/pypi.md) + 1. Python packages SHOULD be deployed to [PyPI](../../third-party/pypi.md) 1. Python packages COULD be hosted in [AWS CodeArtifact](https://aws.amazon.com/codeartifact/) +1. **Security** + 1. A CSP SHOULD be set up ## Black @@ -72,11 +74,11 @@ If using the `tna-python-dev` Docker image, [this isort configuration is include Use either [Flask](https://flask.palletsprojects.com/), [Django](https://www.djangoproject.com/) or [FastAPI](https://fastapi.tiangolo.com/) for your Python applications. -| Framework | Best choice for making | -| ------------------------------------------- | ------------------------------------------------------------------------------------------ | -| [Flask](https://flask.palletsprojects.com/) | Applications with a UI (can use [tna-frontend-jinja](../resources/tna-frontend-jinja.md)) | -| [Django](https://www.djangoproject.com/) | Applications that need to work with data and databases | -| [FastAPI](https://fastapi.tiangolo.com/) | RESTful JSON APIs | +| Framework | Best choice for making | +| ------------------------------------------- | -------------------------------------------------------------------------------------------- | +| [Flask](https://flask.palletsprojects.com/) | Applications with a UI (can use [tna-frontend-jinja](../../resources/tna-frontend-jinja.md)) | +| [Django](https://www.djangoproject.com/) | Applications that need to work with data and databases | +| [FastAPI](https://fastapi.tiangolo.com/) | RESTful JSON APIs | ## Tools and libraries diff --git a/docs/technology/scala.md b/docs/technology/backend/scala.md similarity index 100% rename from docs/technology/scala.md rename to docs/technology/backend/scala.md diff --git a/docs/technology/postgres.md b/docs/technology/database/postgres.md similarity index 100% rename from docs/technology/postgres.md rename to docs/technology/database/postgres.md diff --git a/docs/technology/css.md b/docs/technology/frontend/css.md similarity index 91% rename from docs/technology/css.md rename to docs/technology/frontend/css.md index 9c2c353..fee193e 100644 --- a/docs/technology/css.md +++ b/docs/technology/frontend/css.md @@ -1,7 +1,7 @@ # CSS 1. **Approach** - 1. CSS MUST be treated as a [progressive enhancement](../ways-of-working/progressive-enhancement.md) + 1. CSS MUST be treated as a [progressive enhancement](../../ways-of-working/progressive-enhancement.md) 1. CSS MUST be served as a static file and MUST NOT be compiled at runtime 1. Compiled CSS MUST NOT contain a source file map in the `.css` file itself 1. Compiled CSS SHOULD contain a link to a separate source file (`.map.css`) @@ -43,7 +43,7 @@ The CSS methodology we use is [BEM](https://getbem.com/). On 4th February 2021, frontend developers met to agree a CSS methodology. Having considered a recommendation for utility CSS (as represented in [tailwindcss](https://tailwindcss.com/)) and results of the most recent [state of CSS survey](https://2020.stateofcss.com/en-US/technologies/), the team agreed that the BEM methodology would best reflect the needs of the team at this time. -[TNA Frontend](../resources/tna-frontend.md) uses a mix of BEM and classless strategies. Simple "top-level" elements such as `