From 84323e6ea7332b72e2a54140305e471482d50b99 Mon Sep 17 00:00:00 2001 From: miriam-z Date: Mon, 20 Oct 2025 18:01:03 +0100 Subject: [PATCH 1/5] Fix Makefile syntax errors for .ONESHELL compatibility --- scripts/init.mk | 6 +++--- scripts/tests/test.mk | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/init.mk b/scripts/init.mk index 373f8a4f..32093930 100644 --- a/scripts/init.mk +++ b/scripts/init.mk @@ -43,11 +43,11 @@ githooks-run: # Run git hooks configured in this repository @Operations _install-dependency: # Install asdf dependency - mandatory: name=[listed in the '.tool-versions' file]; optional: version=[if not listed] echo ${name} asdf plugin add ${name} ||: - asdf install ${name} $(or ${version},) + asdf install ${name} ${version} _install-dependencies: # Install all the dependencies listed in .tool-versions - for plugin in $$(grep ^[a-z] .tool-versions | sed 's/[[:space:]].*//'); do - make _install-dependency name="$${plugin}" + for plugin in $$(grep ^[a-z] .tool-versions | sed 's/[[:space:]].*//'); do \ + make _install-dependency name="$${plugin}"; \ done clean:: # Remove all generated and temporary files (common) @Operations diff --git a/scripts/tests/test.mk b/scripts/tests/test.mk index aab47c62..37d8f25f 100644 --- a/scripts/tests/test.mk +++ b/scripts/tests/test.mk @@ -65,12 +65,12 @@ test: # Run all the test tasks @Testing test-load _test: - set -e - script="./scripts/tests/${name}.sh" - if [ -e "$${script}" ]; then - exec $${script} - else - echo "make test-${name} not implemented: $${script} not found" >&2 + set -e; \ + script="./scripts/tests/${name}.sh"; \ + if [ -e "$${script}" ]; then \ + exec $${script}; \ + else \ + echo "make test-${name} not implemented: $${script} not found" >&2; \ fi ${VERBOSE}.SILENT: \ From ff68a5e7595ccac1e48268c76e66e04836c11ab6 Mon Sep 17 00:00:00 2001 From: miriam-z Date: Mon, 20 Oct 2025 18:02:31 +0100 Subject: [PATCH 2/5] Add Python 3.13.7 to match Dockerfile version --- .tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tool-versions b/.tool-versions index f73cf3b5..bc11085f 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,9 +1,9 @@ # This file is for you! Please, updated to the versions agreed by your team. -python 3.13.8 terraform 1.7.0 pre-commit 4.3.0 vale 3.6.0 +python 3.13.7 # gitleaks 8.18.4 # ============================================================================== From 3f24ee39c477148fd3e41c0a0496a3f5104583f2 Mon Sep 17 00:00:00 2001 From: miriam-z Date: Mon, 20 Oct 2025 18:03:02 +0100 Subject: [PATCH 3/5] Update README with setup instructions and prerequisites --- README.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b96a505b..2a8b9e71 100644 --- a/README.md +++ b/README.md @@ -19,15 +19,31 @@ The following software packages, or their equivalents, are expected to be instal - [Docker](https://www.docker.com/) container runtime or a compatible tool, e.g. [Podman](https://podman.io/), - [GNU make](https://www.gnu.org/software/make/) 3.82 or later +- [asdf](https://asdf-vm.com/) version manager for managing tool versions (ensure asdf is configured in your shell) ## Setup -To setup the pre commit hooks run +1. Copy the environment file: + +```shell +cp .env.example .env +``` + +2. Setup the pre-commit hooks and install dependencies: ```shell make config ``` +Note: If you encounter Python installation issues on macOS, you may need to install Python with SSL flags: + +```shell +CFLAGS="-I$(brew --prefix openssl@3)/include" \ +LDFLAGS="-L$(brew --prefix openssl@3)/lib" \ +PKG_CONFIG_PATH="$(brew --prefix openssl@3)/lib/pkgconfig" \ +asdf install python 3.13.7 +``` + ## Running the app locally The project runs locally inside docker. Please ensure you have docker installed. @@ -38,6 +54,12 @@ You can run the application by running: make dev-run ``` +After starting the application, apply the database migrations: + +```shell +make dev-migrate +``` + ## Testing 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. From 4110fe68b4e6504cbab524622b50c6528dc5072c Mon Sep 17 00:00:00 2001 From: miriam-z Date: Mon, 20 Oct 2025 18:50:58 +0100 Subject: [PATCH 4/5] Fix Markdown linting error in README --- README.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 2a8b9e71..375a13ca 100644 --- a/README.md +++ b/README.md @@ -25,24 +25,24 @@ The following software packages, or their equivalents, are expected to be instal 1. Copy the environment file: -```shell -cp .env.example .env -``` + ```shell + cp .env.example .env + ``` -2. Setup the pre-commit hooks and install dependencies: +1. Setup the pre-commit hooks and install dependencies: -```shell -make config -``` + ```shell + make config + ``` -Note: If you encounter Python installation issues on macOS, you may need to install Python with SSL flags: + Note: If you encounter Python installation issues on macOS, you may need to install Python with SSL flags: -```shell -CFLAGS="-I$(brew --prefix openssl@3)/include" \ -LDFLAGS="-L$(brew --prefix openssl@3)/lib" \ -PKG_CONFIG_PATH="$(brew --prefix openssl@3)/lib/pkgconfig" \ -asdf install python 3.13.7 -``` + ```shell + CFLAGS="-I$(brew --prefix openssl@3)/include" \ + LDFLAGS="-L$(brew --prefix openssl@3)/lib" \ + PKG_CONFIG_PATH="$(brew --prefix openssl@3)/lib/pkgconfig" \ + asdf install python 3.13.7 + ``` ## Running the app locally From c0af330aeb589fa3fb1514b6ceb38163d531860d Mon Sep 17 00:00:00 2001 From: miriam-z Date: Tue, 21 Oct 2025 11:04:08 +0100 Subject: [PATCH 5/5] Remove misleading 'after starting' --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 375a13ca..25c8e4d2 100644 --- a/README.md +++ b/README.md @@ -48,16 +48,16 @@ The following software packages, or their equivalents, are expected to be instal The project runs locally inside docker. Please ensure you have docker installed. -You can run the application by running: +Apply the database migrations: ```shell -make dev-run +make dev-migrate ``` -After starting the application, apply the database migrations: +Run the application: ```shell -make dev-migrate +make dev-run ``` ## Testing