Skip to content

Commit 3ca621d

Browse files
committed
init
1 parent 3bb91ac commit 3ca621d

39 files changed

+117
-72
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ version: 2
77
updates:
88
- package-ecosystem: "docker"
99
directories:
10-
- "/ack_backend"
10+
- "/lambdas/ack_backend"
1111
- "/delta_backend"
1212
- "/filenameprocessor"
1313
- "/grafana/non-prod/docker"
@@ -49,7 +49,7 @@ updates:
4949
- package-ecosystem: "pip"
5050
directories:
5151
- "/"
52-
- "/ack_backend"
52+
- "/lambdas/ack_backend"
5353
- "/backend"
5454
- "/batch_processor_filter"
5555
- "/delta_backend"

.github/workflows/sonarcloud.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,15 @@ jobs:
8181
poetry run coverage xml -o ../recordforwarder-coverage.xml
8282
8383
- name: Run unittest with coverage-ack-lambda
84-
working-directory: ack_backend
84+
working-directory: lambdas/ack_backend
8585
id: acklambda
8686
env:
87-
PYTHONPATH: ${{ github.workspace }}/ack_backend/src:${{ github.workspace }}/ack_backend/tests
87+
PYTHONPATH: ${{ env.LAMBDA_PATH }}/ack_backend/src:${{ github.workspace }}/ack_backend/tests
8888
continue-on-error: true
8989
run: |
90-
poetry install
91-
poetry run coverage run -m unittest discover || echo "ack-lambda tests failed" >> ../failed_tests.txt
92-
poetry run coverage xml -o ../ack-lambda-coverage.xml
90+
poetry install
91+
poetry run coverage run -m unittest discover || echo "ack-lambda tests failed" >> ../../failed_tests.txt
92+
poetry run coverage xml -o ../../ack-lambda-coverage.xml
9393
9494
- name: Run unittest with coverage-delta
9595
working-directory: delta_backend

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
SHELL=/usr/bin/env bash -euo pipefail
22

3-
PYTHON_PROJECT_DIRS_WITH_UNIT_TESTS = ack_backend backend batch_processor_filter delta_backend filenameprocessor mesh_processor recordprocessor redis_sync lambdas/id_sync lambdas/shared mns_subscription
3+
PYTHON_PROJECT_DIRS_WITH_UNIT_TESTS = lambdas/ack_backend backend batch_processor_filter delta_backend filenameprocessor mesh_processor recordprocessor redis_sync lambdas/id_sync lambdas/shared mns_subscription
44
PYTHON_PROJECT_DIRS = e2e e2e_batch $(PYTHON_PROJECT_DIRS_WITH_UNIT_TESTS)
55

66
#Installs dependencies using poetry.

ack_backend/Makefile

Lines changed: 0 additions & 11 deletions
This file was deleted.

ack_backend/src/clients.py

Lines changed: 0 additions & 23 deletions
This file was deleted.

ack_backend/src/errors.py

Lines changed: 0 additions & 5 deletions
This file was deleted.

immunisation-fhir-api.code-workspace

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"path": "recordprocessor"
1414
},
1515
{
16-
"path": "ack_backend"
16+
"path": "lambdas/ack_backend"
1717
},
1818
{
1919
"path": "delta_backend"

lambdas/.coveragerc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ omit =
66
id_sync/tests/*
77
id_sync/tests/*/*
88
id_sync/tests/*/*/*
9+
ack_backend/tests/*
10+
ack_backend/tests/*/*
11+
ack_backend/tests/*/*/*
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"python.analysis.extraPaths": [
3+
"./src"
4+
],
5+
"python.testing.unittestArgs": [
6+
"-v",
7+
"-s",
8+
"./",
9+
"-p",
10+
"test_*.py"
11+
],
12+
"python.testing.pytestEnabled": false,
13+
"python.testing.unittestEnabled": true,
14+
"pylint.args": [
15+
"--init-hook",
16+
"import sys; sys.path.append('./src')"
17+
]
18+
}
Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,33 @@ RUN mkdir -p /home/appuser && \
55
echo 'appuser:x:1001:' >> /etc/group && \
66
chown -R 1001:1001 /home/appuser && pip install "poetry~=2.1.4"
77

8-
COPY poetry.lock pyproject.toml README.md ./
8+
# Install Poetry dependencies
9+
# Copy ack_backend Poetry files
10+
COPY ./ack_backend/poetry.lock ./ack_backend/pyproject.toml ./
11+
COPY ./shared/src/common ./src/common
12+
13+
RUN echo "Listing /var/task after source code copy:" && ls -R /var/task
14+
15+
# Install ack_backend dependencies
16+
WORKDIR /var/task
917
RUN poetry config virtualenvs.create false && poetry install --no-interaction --no-ansi --no-root --only main
1018
# -----------------------------
1119
FROM base AS build
12-
COPY src .
20+
21+
# Set working directory back to Lambda task root
22+
WORKDIR /var/task
23+
24+
# Copy shared source code
25+
COPY ./shared/src/common ./common
26+
27+
# Copy ack_backend source code
28+
COPY ./ack_backend/src .
29+
30+
# Set correct permissions
1331
RUN chmod 644 $(find . -type f) && chmod 755 $(find . -type d)
32+
1433
# Switch to the non-root user for running the container
1534
USER 1001:1001
35+
36+
# Set the Lambda handler
1637
CMD ["ack_processor.lambda_handler"]

0 commit comments

Comments
 (0)