Skip to content

Commit ad6cd5c

Browse files
committed
parked
1 parent 0be681c commit ad6cd5c

31 files changed

+1976
-11
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ updates:
6060
- "/recordprocessor"
6161
- "/redis_sync"
6262
- "/lambdas/id_sync"
63+
- "/lambdas/mns_subscription"
6364
- "/lambdas/shared"
64-
- "/mns_subscription"
6565
schedule:
6666
interval: "daily"
6767
open-pull-requests-limit: 1

.github/workflows/sonarcloud.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,16 +123,16 @@ jobs:
123123
poetry run coverage xml -o ../mesh_processor-coverage.xml
124124
125125
- name: Run unittest with coverage-mns-subscription
126-
working-directory: mns_subscription
126+
working-directory: lambdas/mns_subscription
127+
id: id_sync
127128
env:
128-
PYTHONPATH: ${{ github.workspace }}/mns_subscription/src:${{ github.workspace }}/mns_subscription/tests
129-
id: mns_subscription
129+
PYTHONPATH: ${{ env.LAMBDA_PATH }}/mns_subscription/src:${{ env.SHARED_PATH }}/src
130130
continue-on-error: true
131131
run: |
132-
poetry install
133-
poetry run coverage run -m unittest discover || echo "mns_subscription tests failed" >> ../failed_tests.txt
134-
poetry run coverage report -m
135-
poetry run coverage xml -o ../mns_subscription-coverage.xml
132+
poetry install
133+
poetry run coverage run --rcfile=.coveragerc --source=src -m unittest discover || echo "mns_subscription tests failed" >> ../../failed_tests.txt
134+
poetry run coverage report -m
135+
poetry run coverage xml -o ../../mns_subscription-coverage.xml
136136
137137
- name: Run unittest with redis_sync
138138
working-directory: redis_sync

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 = ack_backend backend batch_processor_filter delta_backend filenameprocessor mesh_processor recordprocessor redis_sync lambdas/id_sync lambdas/mns_subscription lambdas/shared
44
PYTHON_PROJECT_DIRS = e2e e2e_batch $(PYTHON_PROJECT_DIRS_WITH_UNIT_TESTS)
55

66
#Installs dependencies using poetry.

immunisation-fhir-api.code-workspace

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@
3131
"path": "redis_sync"
3232
},
3333
{
34-
"path": "mns_subscription"
34+
"path": "lambdas/id_sync"
3535
},
3636
{
37-
"path": "lambdas/id_sync"
37+
"path": "lambdas/mns_subscription"
3838
},
3939
{
4040
"path": "lambdas/shared"

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+
mns_subscription/tests/*
10+
mns_subscription/tests/*/*
11+
mns_subscription/tests/*/*/*
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
"[makefile]": {
19+
"editor.insertSpaces": false,
20+
"editor.detectIndentation": false
21+
},
22+
"files.trimTrailingWhitespace": true,
23+
"[python]": {
24+
"files.trimTrailingWhitespace": true
25+
},
26+
"files.insertFinalNewline": true
27+
}

lambdas/mns_subscription/Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
subscribe:
2+
@PYTHONPATH=src poetry run python src/subscribe_mns.py
3+
4+
unsubscribe:
5+
@PYTHONPATH=src poetry run python src/unsubscribe_mns.py
6+
7+
TEST_ENV := @PYTHONPATH=src:tests:../shared/src
8+
9+
test:
10+
$(TEST_ENV) python -m unittest
11+
12+
coverage-run:
13+
$(TEST_ENV) coverage run -m unittest discover
14+
15+
coverage-report:
16+
$(TEST_ENV) coverage report -m
17+
18+
coverage-html:
19+
$(TEST_ENV) coverage html
20+
21+
.PHONY: build package test

lambdas/mns_subscription/poetry.lock

Lines changed: 793 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[tool.poetry]
2+
name = "mns-subscription"
3+
version = "0.1.0"
4+
description = ""
5+
authors = ["Your Name <[email protected]>"]
6+
packages = [
7+
{include = "src"},
8+
{include = "common", from = "../shared/src"}
9+
]
10+
11+
[tool.poetry.dependencies]
12+
python = "~3.11"
13+
boto3 = "~1.40.22"
14+
pyjwt = "~2.10.1"
15+
moto = "^5.1.11"
16+
coverage = "^7.10.6"
17+
requests = "~2.32.5"
18+
responses = "~0.25.8"
19+
20+
21+
[build-system]
22+
requires = ["poetry-core"]
23+
build-backend = "poetry.core.masonry.api"

lambdas/mns_subscription/src/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)