way_of_working-for-hdi 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.alexignore +2 -0
- data/.alexrc +3 -0
- data/.mega-linter.yml +145 -0
- data/.rubocop +1 -0
- data/CHANGELOG.md +27 -0
- data/CODE_OF_CONDUCT.md +133 -0
- data/LICENSE.txt +21 -0
- data/README.md +77 -0
- data/Rakefile +16 -0
- data/code_safety.yml +314 -0
- data/docs/.gitignore +5 -0
- data/docs/404.md +11 -0
- data/docs/Gemfile +38 -0
- data/docs/Gemfile.lock +293 -0
- data/docs/_config.yml +90 -0
- data/docs/_includes/components/sidebar.html +69 -0
- data/docs/_includes/footer_custom.html +3 -0
- data/docs/_sass/color_schemes/hdi-light.scss +31 -0
- data/docs/_sass/custom/OneDarkJekyll.scss +203 -0
- data/docs/_sass/custom/a11y-colours.scss +4 -0
- data/docs/_sass/custom/color-scheme-shims.scss +66 -0
- data/docs/_sass/custom/custom.scss +60 -0
- data/docs/_sass/custom/setup.scss +3 -0
- data/docs/decisions/0000-use-markdown-any-decision-records.md +30 -0
- data/docs/decisions/0001-adoption-of-an-off-the-shelf-code-of-conduct.md +34 -0
- data/docs/decisions/0002-use-megalinter-for-linting-common-file-formats.md +41 -0
- data/docs/decisions/0003-use-keep-a-changelog-v1-1-as-the-format-for-changelogs.md +40 -0
- data/docs/decisions/0004-end-to-end-aka-system-testing.md +41 -0
- data/docs/decisions/0005-standardised-approach-to-versioning.md +27 -0
- data/docs/decisions/0006-standard-approach-to-automated-accessibility-testing.md +54 -0
- data/docs/decisions/0007-test-for-insensitive-and-inconsiderate-writing.md +32 -0
- data/docs/decisions/0008-software-as-a-service-saas-web-analytics-solution.md +30 -0
- data/docs/decisions/0009-pull-request-guidlines-and-template.md +31 -0
- data/docs/decisions/README.md +7 -0
- data/docs/decisions/adr-template.md +82 -0
- data/docs/decisions/index.md +48 -0
- data/docs/index.md +33 -0
- data/docs/pa11y.json +9 -0
- data/docs/way_of_working/accessibility-testing.md +29 -0
- data/docs/way_of_working/changelog.md +58 -0
- data/docs/way_of_working/code-linting/index.md +39 -0
- data/docs/way_of_working/code-linting/linters.md +153 -0
- data/docs/way_of_working/code-of-conduct.md +31 -0
- data/docs/way_of_working/decision-records.md +58 -0
- data/docs/way_of_working/end-to-end-testing.md +35 -0
- data/docs/way_of_working/inclusive-language.md +28 -0
- data/docs/way_of_working/pull-request-template-and-guidelines.md +18 -0
- data/docs/way_of_working/readme-badges.md +24 -0
- data/docs/way_of_working/versioning.md +25 -0
- data/lib/way_of_working/for/hdi/paths.rb +20 -0
- data/lib/way_of_working/for/hdi/plugin.rb +12 -0
- data/lib/way_of_working/for/hdi/version.rb +9 -0
- data/lib/way_of_working/for/hdi.rb +23 -0
- data/lib/way_of_working/rake_tasks/generators/init.rb +47 -0
- data/lib/way_of_working/rake_tasks.rb +22 -0
- metadata +257 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
# Configuration for the Jekyll template "Just the Docs"
|
|
3
|
+
nav_order: 4
|
|
4
|
+
parent: Decision Records
|
|
5
|
+
|
|
6
|
+
# These are optional elements. Feel free to remove any of them.
|
|
7
|
+
status: accepted
|
|
8
|
+
date: 2023-03-03
|
|
9
|
+
---
|
|
10
|
+
# End-to-End (aka System) Testing
|
|
11
|
+
|
|
12
|
+
## Context and Problem Statement
|
|
13
|
+
|
|
14
|
+
Many solutions are specific to the technology they are testing. We want to adopt an approach that enables contributors to read and write tests across projects without the brittleness of some solutions.
|
|
15
|
+
|
|
16
|
+
Which should we choose?
|
|
17
|
+
|
|
18
|
+
We should provide tooling around the edges that initially scaffolds the tool into a Rails application and creates a GitHub Action. Support for other tech stacks would follow.
|
|
19
|
+
|
|
20
|
+
## Considered Options
|
|
21
|
+
|
|
22
|
+
* [Cypress](https://www.cypress.io) JavaScript web testing and component testing framework.
|
|
23
|
+
* [Capybara](http://teamcapybara.github.io/capybara/) using the [Selenium](https://www.selenium.dev) driver and Chrome browser (the Rails default).
|
|
24
|
+
* [Capybara](http://teamcapybara.github.io/capybara/) using the [Cuprite](https://cuprite.rubycdp.com) driver and Chrome browser.
|
|
25
|
+
|
|
26
|
+
## Decision Outcome
|
|
27
|
+
|
|
28
|
+
Chosen option: "Cypress" because:
|
|
29
|
+
* Although tests need to be written in JavaScript or TypeScript, the tested web application can be in any language. It also has a new experimental feature, where non-developers can click and record tests by interacting with the tested app.
|
|
30
|
+
* Debugging (both the tested application and the tests themselves) is effortless, with "time travel" showing you what the app looked like at each test step.
|
|
31
|
+
* It can be integrated into a Rails application using [cypress-rails](https://github.com/testdouble/cypress-rails). [CypressOnRails](https://github.com/shakacode/cypress-on-rails) was also considered.
|
|
32
|
+
|
|
33
|
+
### Consequences
|
|
34
|
+
|
|
35
|
+
* Good, because end-to-end testing increases the quality of our applications and reduces the chances of downtime or data loss.
|
|
36
|
+
* Good, because we can spend more time creating end-to-end tests than fighting the test framework.
|
|
37
|
+
* Neutral, because developers will need to introduce `data-test` HTML attributes into our applications to enable them to be reliably tested.
|
|
38
|
+
|
|
39
|
+
## More Information
|
|
40
|
+
|
|
41
|
+
In order to not delay the decision to adopt Cypress, the Rails initialisation tooling will be added later.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
# Configuration for the Jekyll template "Just the Docs"
|
|
3
|
+
nav_order: 5
|
|
4
|
+
parent: Decision Records
|
|
5
|
+
|
|
6
|
+
# These are optional elements. Feel free to remove any of them.
|
|
7
|
+
status: accepted
|
|
8
|
+
date: 2023-03-03
|
|
9
|
+
---
|
|
10
|
+
# Standardised approach to versioning
|
|
11
|
+
|
|
12
|
+
## Context and Problem Statement
|
|
13
|
+
|
|
14
|
+
"Dependency hell" is the complex and frustrating situation where a software project has multiple dependencies, but installing or updating one dependency leads to conflicts or incompatibilities with others, causing errors and delays in the development process.
|
|
15
|
+
|
|
16
|
+
What version numbering scheme should we adopt to avoid dependency hell?
|
|
17
|
+
|
|
18
|
+
## Considered Options
|
|
19
|
+
|
|
20
|
+
* [Semantic Versioning](https://semver.org)
|
|
21
|
+
* [Calendar Versioning](https://calver.org)
|
|
22
|
+
|
|
23
|
+
## Decision Outcome
|
|
24
|
+
|
|
25
|
+
Chosen option: "Semantic Versioning" because:
|
|
26
|
+
* it is a well established and widely used version numbering scheme
|
|
27
|
+
* allows us to quickly identify breaking changes to dependencies
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
# Configuration for the Jekyll template "Just the Docs"
|
|
3
|
+
nav_order: 6
|
|
4
|
+
parent: Decision Records
|
|
5
|
+
|
|
6
|
+
# These are optional elements. Feel free to remove any of them.
|
|
7
|
+
status: accepted
|
|
8
|
+
date: 2023-03-03
|
|
9
|
+
---
|
|
10
|
+
# Standard approach to automated accessibility testing
|
|
11
|
+
|
|
12
|
+
## Context and Problem Statement
|
|
13
|
+
|
|
14
|
+
The services we design need to be accessible and meet WCAG 2.1 level AA as a minimum, preferably meeting WCAG 2.1 level AAA where possible.
|
|
15
|
+
Alongside human auditing, we want a consistent approach to automated accessibility testing, so which tool should we choose?
|
|
16
|
+
|
|
17
|
+
We should provide tooling around the edges that:
|
|
18
|
+
|
|
19
|
+
- creates a GitHub Action to test as part of the CI/CD process,
|
|
20
|
+
- providers Rake/Thor task(s) to run the tests locally.
|
|
21
|
+
|
|
22
|
+
<!-- This is an optional element. Feel free to remove. -->
|
|
23
|
+
## Decision Drivers
|
|
24
|
+
|
|
25
|
+
* It's a legal requirement to ensure that the websites and mobile applications we produce are accessible. This is done by showing compliance to the 'AA' standard of the WCAG 2.1 guidelines.
|
|
26
|
+
|
|
27
|
+
## Considered Options
|
|
28
|
+
|
|
29
|
+
* [Pa11y](https://pa11y.org)
|
|
30
|
+
* [aXe](https://www.deque.com/axe/)
|
|
31
|
+
* [Google Lighthouse](https://developer.chrome.com/docs/lighthouse/overview/)
|
|
32
|
+
* [HTML_CodeSniffer](https://squizlabs.github.io/HTML_CodeSniffer/)
|
|
33
|
+
* [SortSite](https://www.powermapper.com/products/sortsite/)
|
|
34
|
+
* [WAVE](https://wave.webaim.org)
|
|
35
|
+
* [ANDI](https://www.ssa.gov/accessibility/andi/help/howtouse.html)
|
|
36
|
+
|
|
37
|
+
## Decision Outcome
|
|
38
|
+
|
|
39
|
+
Chosen option: "Pa11y" because:
|
|
40
|
+
* it is a tool that we have already used as part of a GitHub workflow,
|
|
41
|
+
* we can run it twice to measure AA and AAA compliance,
|
|
42
|
+
* it runs [HTML_CodeSniffer](https://squizlabs.github.io/HTML_CodeSniffer/), [aXe](https://www.deque.com/axe/) or both as "test runners"
|
|
43
|
+
|
|
44
|
+
## More Information
|
|
45
|
+
|
|
46
|
+
GOV.UK Service Manual:
|
|
47
|
+
- [Making your service accessible: an introduction](https://www.gov.uk/service-manual/helping-people-to-use-your-service/making-your-service-accessible-an-introduction)
|
|
48
|
+
- [Understanding WCAG 2.1](https://www.gov.uk/service-manual/helping-people-to-use-your-service/understanding-wcag)
|
|
49
|
+
- [Getting an accessibility audit](https://www.gov.uk/service-manual/helping-people-to-use-your-service/getting-an-accessibility-audit)
|
|
50
|
+
- [Testing for accessibility](https://www.gov.uk/service-manual/helping-people-to-use-your-service/testing-for-accessibility#automated-testing)
|
|
51
|
+
|
|
52
|
+
Potential Auditors:
|
|
53
|
+
- [Digital Accessibility Centre](https://digitalaccessibilitycentre.org/auditandaccreditation.html)
|
|
54
|
+
- [Accessibility Services](https://www.accessibility-services.co.uk/services/digital-accessibility/digital-accessibility-assessment/)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
# Configuration for the Jekyll template "Just the Docs"
|
|
3
|
+
nav_order: 7
|
|
4
|
+
parent: Decision Records
|
|
5
|
+
|
|
6
|
+
# These are optional elements. Feel free to remove any of them.
|
|
7
|
+
status: accepted
|
|
8
|
+
date: 2023-03-21
|
|
9
|
+
---
|
|
10
|
+
# Test for insensitive and inconsiderate writing
|
|
11
|
+
|
|
12
|
+
## Context and Problem Statement
|
|
13
|
+
|
|
14
|
+
Given that checking insensitive and inconsiderate writing can be automated, should we test for it?
|
|
15
|
+
|
|
16
|
+
## Considered Options
|
|
17
|
+
|
|
18
|
+
* [alex](https://alexjs.com) helps you find gender favouring, polarising, race related, religion inconsiderate, or other unequal phrasing.
|
|
19
|
+
* Manually reviewing documentation.
|
|
20
|
+
|
|
21
|
+
## Decision Outcome
|
|
22
|
+
|
|
23
|
+
Chosen option: "alex", because
|
|
24
|
+
* it gives us an automated way of checking for insensitive and inconsiderate writing.
|
|
25
|
+
|
|
26
|
+
### Consequences
|
|
27
|
+
|
|
28
|
+
* Good, because it raises awareness of inclusive communication within teams. As the project README says, "An error from alex can be an invitation to learn more".
|
|
29
|
+
|
|
30
|
+
## More Information
|
|
31
|
+
|
|
32
|
+
Alex provides a list of [further reading](https://github.com/get-alex/alex#further-reading).
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
# Configuration for the Jekyll template "Just the Docs"
|
|
3
|
+
nav_order: 8
|
|
4
|
+
parent: Decision Records
|
|
5
|
+
title: SaaS Web Analytics Solution
|
|
6
|
+
|
|
7
|
+
# These are optional elements. Feel free to remove any of them.
|
|
8
|
+
status: accepted
|
|
9
|
+
date: 2023-04-13
|
|
10
|
+
deciders: Rosemarie Gant, Tim Gentry
|
|
11
|
+
---
|
|
12
|
+
# Software-as-a-Service (SaaS) Web Analytics Solution
|
|
13
|
+
|
|
14
|
+
## Context and Problem Statement
|
|
15
|
+
|
|
16
|
+
When we are in the position to use a hosted web analytics solution, we should use one, but which one should we use?
|
|
17
|
+
|
|
18
|
+
## Considered Options
|
|
19
|
+
|
|
20
|
+
<!--alex ignore simple -->
|
|
21
|
+
* [Simple Analytics](https://www.simpleanalytics.com) The privacy-first Google Analytics alternative.
|
|
22
|
+
* [Cabin](https://withcabin.com) is a privacy-first, carbon conscious web analytics solution.
|
|
23
|
+
* [Google Analytics](https://marketingplatform.google.com/about/analytics/) gives you the tools, free of charge, to understand the customer journey and improve marketing ROI.
|
|
24
|
+
|
|
25
|
+
## Decision Outcome
|
|
26
|
+
|
|
27
|
+
Chosen option: "Cabin", because:
|
|
28
|
+
* it is a cookie free solution, that does not track or gather metrics on visitors,
|
|
29
|
+
* it offers good value for money,
|
|
30
|
+
* it is hosted sustainably.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
# Configuration for the Jekyll template "Just the Docs"
|
|
3
|
+
nav_order: 9
|
|
4
|
+
parent: Decision Records
|
|
5
|
+
|
|
6
|
+
# These are optional elements. Feel free to remove any of them.
|
|
7
|
+
status: accepted
|
|
8
|
+
date: 2023-05-24
|
|
9
|
+
---
|
|
10
|
+
# Pull Request guidelines and template
|
|
11
|
+
|
|
12
|
+
## Context and Problem Statement
|
|
13
|
+
|
|
14
|
+
The structure of a Pull Request (PR) can take many forms, making it difficult to understand at a glance the what, why and how of a PR. Which form should we choose?
|
|
15
|
+
|
|
16
|
+
## Considered Options
|
|
17
|
+
|
|
18
|
+
* Formless – No conventions for PR format and structure
|
|
19
|
+
* [What? Why? How? Testing? Screenshots (optional) Anything Else?](https://www.pullrequest.com/blog/writing-a-great-pull-request-description/)
|
|
20
|
+
* [GitHub pull request template](https://axolo.co/blog/p/part-3-github-pull-request-template) examples
|
|
21
|
+
* [How to Write a Proper Description for a Pull Request](https://maddevs.io/blog/how-to-make-a-proper-description-for-a-pull-request/)
|
|
22
|
+
|
|
23
|
+
## Decision Outcome
|
|
24
|
+
|
|
25
|
+
Chosen option: "What? Why? How? Testing? Screenshots (optional) Anything Else?", because clear, well-structured pull request descriptions help reviewers understand the context, changes, and testing done, making code reviews faster and more effective..
|
|
26
|
+
|
|
27
|
+
Although not a template format, we should also include GitHub's communication guidelines in [How to write the perfect pull request](https://github.blog/2015-01-21-how-to-write-the-perfect-pull-request/).
|
|
28
|
+
|
|
29
|
+
## More Information
|
|
30
|
+
|
|
31
|
+
Whichever format is chosen, we should create an initialiser to add the GitHub [PR template](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/creating-a-pull-request-template-for-your-repository) to a project.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Decisions
|
|
2
|
+
|
|
3
|
+
This directory contains decision records for the project.
|
|
4
|
+
|
|
5
|
+
For new ADRs, please use [adr-template.md](adr-template.md) as basis.
|
|
6
|
+
More information on MADR is available at <https://adr.github.io/madr/>.
|
|
7
|
+
General information about architectural decision records is available at <https://adr.github.io/>.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
nav_order: {index}
|
|
3
|
+
parent: Decision Records
|
|
4
|
+
|
|
5
|
+
# These are optional elements. Feel free to remove any of them.
|
|
6
|
+
status: {proposed | rejected | accepted | deprecated | … | superseded by ADR-0005 <0005-example.md>}
|
|
7
|
+
date: {YYYY-MM-DD when the decision was last updated}
|
|
8
|
+
deciders: {list everyone involved in the decision}
|
|
9
|
+
consulted: {list everyone whose opinions are sought (typically subject-matter experts); and with whom there is a two-way communication}
|
|
10
|
+
informed: {list everyone who is kept up-to-date on progress; and with whom there is a one-way communication}
|
|
11
|
+
---
|
|
12
|
+
# {short title of solved problem and solution}
|
|
13
|
+
|
|
14
|
+
## Context and Problem Statement
|
|
15
|
+
|
|
16
|
+
{Describe the context and problem statement, e.g., in free form using two to three sentences or in the form of an illustrative story.
|
|
17
|
+
You may want to articulate the problem in form of a question and add links to collaboration boards or issue management systems.}
|
|
18
|
+
|
|
19
|
+
<!-- This is an optional element. Feel free to remove. -->
|
|
20
|
+
## Decision Drivers
|
|
21
|
+
|
|
22
|
+
* {decision driver 1, e.g., a force, facing concern, …}
|
|
23
|
+
* {decision driver 2, e.g., a force, facing concern, …}
|
|
24
|
+
* … <!-- numbers of drivers can vary -->
|
|
25
|
+
|
|
26
|
+
## Considered Options
|
|
27
|
+
|
|
28
|
+
* {title of option 1}
|
|
29
|
+
* {title of option 2}
|
|
30
|
+
* {title of option 3}
|
|
31
|
+
* … <!-- numbers of options can vary -->
|
|
32
|
+
|
|
33
|
+
## Decision Outcome
|
|
34
|
+
|
|
35
|
+
Chosen option: "{title of option 1}", because
|
|
36
|
+
{justification. e.g., only option, which meets k.o. criterion decision driver | which resolves force {force} | … | comes out best (see below)}.
|
|
37
|
+
|
|
38
|
+
<!-- This is an optional element. Feel free to remove. -->
|
|
39
|
+
### Consequences
|
|
40
|
+
|
|
41
|
+
* Good, because {positive consequence, e.g., improvement of one or more desired qualities, …}
|
|
42
|
+
* Bad, because {negative consequence, e.g., compromising one or more desired qualities, …}
|
|
43
|
+
* … <!-- numbers of consequences can vary -->
|
|
44
|
+
|
|
45
|
+
<!-- This is an optional element. Feel free to remove. -->
|
|
46
|
+
## Validation
|
|
47
|
+
|
|
48
|
+
{describe how the implementation of/compliance with the ADR is validated. E.g., by a review or an ArchUnit test}
|
|
49
|
+
|
|
50
|
+
<!-- This is an optional element. Feel free to remove. -->
|
|
51
|
+
## Pros and Cons of the Options
|
|
52
|
+
|
|
53
|
+
### {title of option 1}
|
|
54
|
+
|
|
55
|
+
<!-- This is an optional element. Feel free to remove. -->
|
|
56
|
+
{example | description | pointer to more information | …}
|
|
57
|
+
|
|
58
|
+
* Good, because {argument a}
|
|
59
|
+
* Good, because {argument b}
|
|
60
|
+
<!-- use "neutral" if the given argument weights neither for good nor bad -->
|
|
61
|
+
* Neutral, because {argument c}
|
|
62
|
+
* Bad, because {argument d}
|
|
63
|
+
* … <!-- numbers of pros and cons can vary -->
|
|
64
|
+
|
|
65
|
+
### {title of other option}
|
|
66
|
+
|
|
67
|
+
{example | description | pointer to more information | …}
|
|
68
|
+
|
|
69
|
+
* Good, because {argument a}
|
|
70
|
+
* Good, because {argument b}
|
|
71
|
+
* Neutral, because {argument c}
|
|
72
|
+
* Bad, because {argument d}
|
|
73
|
+
* …
|
|
74
|
+
|
|
75
|
+
<!-- This is an optional element. Feel free to remove. -->
|
|
76
|
+
## More Information
|
|
77
|
+
|
|
78
|
+
{You might want to provide additional evidence/confidence for the decision outcome here and/or
|
|
79
|
+
document the team agreement on the decision and/or
|
|
80
|
+
define when and how this decision should be realized and if/when it should be re-visited and/or
|
|
81
|
+
how the decision is validated.
|
|
82
|
+
Links to other decisions and resources might appear here as well.}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
has_children: true
|
|
3
|
+
---
|
|
4
|
+
# Decision Records
|
|
5
|
+
|
|
6
|
+
We use [Markdown Any Decision Records (MADR)](https://adr.github.io/madr/) version 3.0.0.
|
|
7
|
+
|
|
8
|
+
In general, projects will follow the organisation's way of working and so decisions captured within individual projects will generally cover decisions that:
|
|
9
|
+
|
|
10
|
+
- are not already covered in the Way of Working
|
|
11
|
+
- are covered in the Way of Working, but have specific implementation details which need to be captured
|
|
12
|
+
- diverge from the guidance in the Way of Working
|
|
13
|
+
|
|
14
|
+
## Create a new decision record
|
|
15
|
+
|
|
16
|
+
### Manual approach
|
|
17
|
+
|
|
18
|
+
1. Copy `docs/decisions/adr-template.md` to `docs/decisions/NNNN-title-with-dashes.md`, where `NNNN` indicates the next number in sequence.
|
|
19
|
+
2. Edit `NNNN-title-with-dashes.md`.
|
|
20
|
+
|
|
21
|
+
Note you can also use [other patterns for the directory format](https://github.com/joelparkerhenderson/architecture_decision_record#adr-file-name-conventions).
|
|
22
|
+
As a consequence, some existing tooling might not be applicable.
|
|
23
|
+
|
|
24
|
+
The filenames are following the pattern `NNNN-title-with-dashes.md`, where
|
|
25
|
+
|
|
26
|
+
- `NNNN` is a consecutive number and we assume that there won't be more than 9,999 ADRs in one repository.
|
|
27
|
+
- the title is stored using dashes and lowercase, because [adr-tools] also does that.
|
|
28
|
+
- the suffix is `.md`, because it is a [Markdown](https://github.github.com/gfm/) file.
|
|
29
|
+
|
|
30
|
+
Decisions are placed in the subfolder `decisions/` to keep them close to the documentation but also separate the decisions from other documentation.
|
|
31
|
+
|
|
32
|
+
### Automatic approach
|
|
33
|
+
|
|
34
|
+
To create a new decision record, run:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
way_of_working new decision_record [NAME]
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Where `[NAME]` is the title of your decision record, for example:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
way_of_working new decision_record "Use Markdown Any Decision Records"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Project decision records
|
|
47
|
+
|
|
48
|
+
Decision records for this project are listed below.
|
data/docs/index.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
# Feel free to add content and custom Front Matter to this file.
|
|
3
|
+
# To modify the layout, see https://jekyllrb.com/docs/themes/#overriding-theme-defaults
|
|
4
|
+
|
|
5
|
+
layout: home
|
|
6
|
+
nav_order: 1
|
|
7
|
+
permalink: /
|
|
8
|
+
title: Home
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# The HDI Way of Working
|
|
12
|
+
|
|
13
|
+
## Introduction
|
|
14
|
+
|
|
15
|
+
This evolving framework will describe a consistent, high-quality approach to Data and Software Engineering at Health Data Insight.
|
|
16
|
+
|
|
17
|
+
It is an opinionated approach intending to support rapid development, across numerous projects, by a fungible workforce who can swap between assignments with the minimum friction.
|
|
18
|
+
|
|
19
|
+
It builds on the [twelve-factor app](https://12factor.net) methodology and is intended to be compatible with the [NHS Digital Software Engineering Quality Framework](https://github.com/NHSDigital/software-engineering-quality-framework) and other frameworks like [the GDS Way](https://gds-way.cloudapps.digital).
|
|
20
|
+
|
|
21
|
+
The most significant difference is that we will be opinionated and make technological and process choices. Everyone is encouraged to discuss and submit Pull Requests (PRs) if they want changes to the choices made, but by making those choices, we can automate many tedious background tasks that are currently manual.
|
|
22
|
+
|
|
23
|
+
## Installation
|
|
24
|
+
|
|
25
|
+
HDI Way of Working can be installed at the command line on any machine with Ruby installed.
|
|
26
|
+
|
|
27
|
+
If you have a Ruby based project, using Bundler to manage dependencies, then install the gem and add to the application's Gemfile by executing:
|
|
28
|
+
|
|
29
|
+
bundle add way_of_working
|
|
30
|
+
|
|
31
|
+
Otherwise install the gem by executing:
|
|
32
|
+
|
|
33
|
+
gem install way_of_working
|
data/docs/pa11y.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: page
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Accessibility Testing
|
|
6
|
+
|
|
7
|
+
"Accessibility" is sometimes shortened to "a11y", with 11 (characters) replacing "ccessibilit".
|
|
8
|
+
|
|
9
|
+
Automated accessibility testing tools are designed to identify potential accessibility issues on a website or application, such as missing alternative text for images or incorrect heading structure.
|
|
10
|
+
|
|
11
|
+
<!--alex disable easy-->
|
|
12
|
+
However, automated testing tools have some limitations and cannot catch all accessibility issues. Some accessibility issues require human interpretation and judgment, such as whether a website's language is clear and easy to understand.
|
|
13
|
+
|
|
14
|
+
Additionally, automated testing tools can generate false positives or false negatives. False positives occur when the tool reports an issue that is not a problem, and false negatives occur when the tool fails to detect an issue that is a problem. For example, an automated testing tool may flag an image as missing alternative text when it has descriptive text nearby or fail to detect an issue with a complex form that requires user testing to identify.
|
|
15
|
+
|
|
16
|
+
Human auditors can provide valuable insight and identify issues that automated tools may miss. They can also verify and validate the results generated by the automated testing tools. By combining automated testing with human auditing, website owners can ensure their website is accessible to the broadest possible audience, including people with disabilities.
|
|
17
|
+
|
|
18
|
+
Despite the limitations, automated testing can catch basic accessibility issues at an early stage of development, enabling human auditors to focus on more significant problems. We use [Pa11y](https://pa11y.org).
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
### Manual Approach
|
|
23
|
+
|
|
24
|
+
Follow the [pa11y instructions](https://github.com/pa11y/pa11y#command-line-interface) to install and run pa11y locally.
|
|
25
|
+
|
|
26
|
+
### Automatic Approach
|
|
27
|
+
|
|
28
|
+
There is currently no tooling within the Way of Working to use pa11y.
|
|
29
|
+
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: page
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Changelog
|
|
6
|
+
|
|
7
|
+
![Keep a Changelog v1.1.0 badge][changelog-badge]
|
|
8
|
+
|
|
9
|
+
We use [keep a changelog](https://keepachangelog.com/en/1.1.0/) version 1.1.0. It has a well-defined structure that makes it an accessible format for people and tooling.
|
|
10
|
+
|
|
11
|
+
To quote from their website:
|
|
12
|
+
|
|
13
|
+
> Guiding Principles:
|
|
14
|
+
> * Changelogs are for humans, not machines.
|
|
15
|
+
> * There should be an entry for every single version.
|
|
16
|
+
> * The same types of changes should be grouped.
|
|
17
|
+
> * Versions and sections should be linkable.
|
|
18
|
+
> * The latest version comes first.
|
|
19
|
+
> * The release date of each version is displayed.
|
|
20
|
+
> * Mention whether you follow Semantic Versioning.
|
|
21
|
+
|
|
22
|
+
Grouping changes into a clear set of change types:
|
|
23
|
+
|
|
24
|
+
> * `Added` for new features.
|
|
25
|
+
> * `Changed` for changes in existing functionality.
|
|
26
|
+
> * `Deprecated` for soon-to-be removed features.
|
|
27
|
+
> * `Removed` for now removed features.
|
|
28
|
+
> * `Fixed` for any bug fixes.
|
|
29
|
+
> * `Security` in case of vulnerabilities.
|
|
30
|
+
|
|
31
|
+
{: .important }
|
|
32
|
+
Unlike automatic tools like github-changelog-generator, keep a changelog is a human-written, plain English summary of changes. It is **not** a commit log dump; please do not use it as such.
|
|
33
|
+
|
|
34
|
+
We recommend that you and your team update the changelog within your Pull Requests, which avoids the need to add to the changelog much later, at release. Please read the [keep a changelog](https://keepachangelog.com/en/1.1.0/) website. It's a single page with lots of important advice about the benefits and dangers of an incomplete changelog, but as it says in the FAQs, you can always revisit and improve a changelog over time.
|
|
35
|
+
|
|
36
|
+
The Way of Working command line tool scaffolds a new changelog on new and longstanding projects.
|
|
37
|
+
|
|
38
|
+
On longstanding git-based projects, it reads the release tags and scaffolds a changelog with the expected changes of a [semantically versioned](https://semver.org) project. So, for example, a patch or minor version change won't contain a scaffolded `Removed` section.
|
|
39
|
+
|
|
40
|
+
Please use the links within the scaffolded changelog to view all the commits between releases to document historical changes.
|
|
41
|
+
|
|
42
|
+
{: .note }
|
|
43
|
+
There is no tooling to support the continued scaffolding of new releases to an existing changelog because the expectation is that you are updating it day-to-day.
|
|
44
|
+
|
|
45
|
+
{: .highlight }
|
|
46
|
+
We want to provide tooling (including a Rails helper method) that reads the changelog and converts it to HTML for inclusion within the project website. Developers could also give it a last-logged-in date to highlight all the changes since a user last logged in. If you would like to contribute to this functionality, let us know.
|
|
47
|
+
|
|
48
|
+
## Usage
|
|
49
|
+
|
|
50
|
+
### Adding a changelog to your project
|
|
51
|
+
|
|
52
|
+
To add a [keep a changelog v1.1.0](https://keepachangelog.com/en/1.1.0/) changelog to your project, use the following at the command line:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
way_of_working init changelog
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
[changelog-badge]: https://img.shields.io/badge/changelog-Keep%20a%20Changelog%20v1.1.0-%23E05735
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
has_children: true
|
|
3
|
+
layout: page
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Code Linting
|
|
7
|
+
|
|
8
|
+
We use [MegaLinter](https://megalinter.io/) for the majority of our code lining, currently with separate Ruby testing with RuboCop.
|
|
9
|
+
|
|
10
|
+
Code linters like MegaLinter benefit developers and teams because they help improve code quality, reduce errors and inconsistencies, and streamline development. Linters analyze source code for common issues, such as syntax errors, undefined variables, and unused code, and provide suggestions and feedback for improvement.
|
|
11
|
+
|
|
12
|
+
Using a linter like MegaLinter, developers can catch and fix errors early in the development process, saving time and effort in the long run.
|
|
13
|
+
The linter also provides consistency in the codebase, helping to prevent errors caused by different team members using different styles or approaches, which can be especially valuable for large projects with many contributors or where you want staff to be able to switch between projects more efficiently.
|
|
14
|
+
|
|
15
|
+
MegaLinter is a particularly powerful linter because it supports multiple programming languages, making it a one-stop shop for developers working on projects with various languages.
|
|
16
|
+
|
|
17
|
+
{: .note }
|
|
18
|
+
We have chosen not to use the version of [RuboCop](https://rubocop.org) packaged in MegaLinter because it can't support our use of Minitest and Rails "cops". But by using our CLI command to run linting, as documented below, both RuboCop and MegaLinter will be executed against your code.
|
|
19
|
+
|
|
20
|
+
When you add the Way of Working linter to your project, it will copy our per-language organisational code styles (where they differ from defaults) into `.github/linters` and will copy the GitHub Actions workflow files into `.github/workflow`, so that linting automatically runs when you commit to GitHub.
|
|
21
|
+
|
|
22
|
+
If you add the Way of Working linter to your Xcode project, it will automatically add a Swiftlint build phase to the project config file.
|
|
23
|
+
|
|
24
|
+
{: .important }
|
|
25
|
+
If you disagree with any of the linters or linting styles that they apply, please fork the repository and create a pull request with your desired changes. The current coding standards are only intended as a starting point. A Full list of the linters we are currently using can be found [here](linters.md).
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
To add [MegaLinter](https://megalinter.io/) and [RuboCop](https://rubocop.org) to your project, run the following at the command line:
|
|
30
|
+
|
|
31
|
+
way_of_working init code_linting
|
|
32
|
+
|
|
33
|
+
to run MegaLinter in your project, run:
|
|
34
|
+
|
|
35
|
+
way_of_working exec code_linting
|
|
36
|
+
|
|
37
|
+
to document your use of MegaLinter in your project, run:
|
|
38
|
+
|
|
39
|
+
way_of_working exec document
|