Skip to content

Commit 1717a39

Browse files
authored
Merge pull request #112 from NHSDigital/fix/config-update
Fix/config update
2 parents 59e0ef1 + c0af330 commit 1717a39

File tree

4 files changed

+37
-15
lines changed

4 files changed

+37
-15
lines changed

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# This file is for you! Please, updated to the versions agreed by your team.
22

3-
python 3.13.8
43
terraform 1.7.0
54
pre-commit 4.3.0
65
vale 3.6.0
6+
python 3.13.7
77
# gitleaks 8.18.4
88

99
# ==============================================================================

README.md

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,42 @@ The following software packages, or their equivalents, are expected to be instal
1919

2020
- [Docker](https://www.docker.com/) container runtime or a compatible tool, e.g. [Podman](https://podman.io/),
2121
- [GNU make](https://www.gnu.org/software/make/) 3.82 or later
22+
- [asdf](https://asdf-vm.com/) version manager for managing tool versions (ensure asdf is configured in your shell)
2223

2324
## Setup
2425

25-
To setup the pre commit hooks run
26+
1. Copy the environment file:
2627

27-
```shell
28-
make config
29-
```
28+
```shell
29+
cp .env.example .env
30+
```
31+
32+
1. Setup the pre-commit hooks and install dependencies:
33+
34+
```shell
35+
make config
36+
```
37+
38+
Note: If you encounter Python installation issues on macOS, you may need to install Python with SSL flags:
39+
40+
```shell
41+
CFLAGS="-I$(brew --prefix openssl@3)/include" \
42+
LDFLAGS="-L$(brew --prefix openssl@3)/lib" \
43+
PKG_CONFIG_PATH="$(brew --prefix openssl@3)/lib/pkgconfig" \
44+
asdf install python 3.13.7
45+
```
3046

3147
## Running the app locally
3248

3349
The project runs locally inside docker. Please ensure you have docker installed.
3450

35-
You can run the application by running:
51+
Apply the database migrations:
52+
53+
```shell
54+
make dev-migrate
55+
```
56+
57+
Run the application:
3658

3759
```shell
3860
make dev-run

scripts/init.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ githooks-run: # Run git hooks configured in this repository @Operations
4343
_install-dependency: # Install asdf dependency - mandatory: name=[listed in the '.tool-versions' file]; optional: version=[if not listed]
4444
echo ${name}
4545
asdf plugin add ${name} ||:
46-
asdf install ${name} $(or ${version},)
46+
asdf install ${name} ${version}
4747

4848
_install-dependencies: # Install all the dependencies listed in .tool-versions
49-
for plugin in $$(grep ^[a-z] .tool-versions | sed 's/[[:space:]].*//'); do
50-
make _install-dependency name="$${plugin}"
49+
for plugin in $$(grep ^[a-z] .tool-versions | sed 's/[[:space:]].*//'); do \
50+
make _install-dependency name="$${plugin}"; \
5151
done
5252

5353
clean:: # Remove all generated and temporary files (common) @Operations

scripts/tests/test.mk

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ test: # Run all the test tasks @Testing
6565
test-load
6666

6767
_test:
68-
set -e
69-
script="./scripts/tests/${name}.sh"
70-
if [ -e "$${script}" ]; then
71-
exec $${script}
72-
else
73-
echo "make test-${name} not implemented: $${script} not found" >&2
68+
set -e; \
69+
script="./scripts/tests/${name}.sh"; \
70+
if [ -e "$${script}" ]; then \
71+
exec $${script}; \
72+
else \
73+
echo "make test-${name} not implemented: $${script} not found" >&2; \
7474
fi
7575

7676
${VERBOSE}.SILENT: \

0 commit comments

Comments
 (0)