Skip to content

Commit 00675f6

Browse files
committed
Mesh code refactoring
1 parent d40e851 commit 00675f6

File tree

18 files changed

+825
-201
lines changed

18 files changed

+825
-201
lines changed

.github/workflows/sonarcloud.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ jobs:
1313
if: ${{ !contains(github.event.pull_request.labels.*.name, 'dependency') }}
1414
runs-on: ubuntu-latest
1515

16-
1716
steps:
1817
- uses: actions/checkout@v4
1918
with:
@@ -26,10 +25,10 @@ jobs:
2625
run: |
2726
aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID
2827
aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY
29-
28+
3029
- name: Initialize Unit Test Failure Tracker
3130
run: echo "false" > test_failed.txt
32-
31+
3332
- name: Run unittest with filenameprocessor-coverage
3433
id: filenameprocessor
3534
continue-on-error: true
@@ -38,23 +37,20 @@ jobs:
3837
poetry run coverage run --source=filenameprocessor -m unittest discover -s filenameprocessor || echo "filenameprocessor tests failed" >> failed_tests.txt
3938
poetry run coverage xml -o sonarcloud-coverage-filenameprocessor-coverage.xml
4039
41-
4240
- name: Run unittest with recordprocessor-coverage
4341
id: recordprocessor
4442
continue-on-error: true
4543
run: |
4644
poetry run coverage run --source=recordprocessor -m unittest discover -s recordprocessor || echo "recordprocessor tests failed" >> failed_tests.txt
4745
poetry run coverage xml -o sonarcloud-coverage-recordprocessor-coverage.xml
4846
49-
5047
- name: Run unittest with recordforwarder-coverage
5148
id: recordforwarder
5249
continue-on-error: true
5350
run: |
5451
PYTHONPATH=$(pwd)/backend:$(pwd)/backend/tests poetry run coverage run --source=backend -m unittest discover -s backend/tests -p "*batch*.py" || echo "recordforwarder tests failed" >> failed_tests.txt
5552
poetry run coverage xml -o sonarcloud-coverage-recordforwarder-coverage.xml
5653
57-
5854
- name: Run unittest with coverage-ack-lambda
5955
id: acklambda
6056
continue-on-error: true
@@ -70,22 +66,22 @@ jobs:
7066
pip install poetry==1.8.4 mypy-boto3-dynamodb==1.35.54 boto3==1.26.165 coverage botocore==1.29.165 jmespath==1.0.1 python-dateutil==2.9.0 urllib3==1.26.20 s3transfer==0.6.2 typing-extensions==4.12.2
7167
poetry run coverage run --source=delta_backend -m unittest discover -s delta_backend || echo "delta tests failed" >> failed_tests.txt
7268
poetry run coverage xml -o sonarcloud-coverage-delta.xml
73-
69+
7470
- name: Run unittest with coverage-fhir-api
7571
id: fhirapi
7672
continue-on-error: true
7773
run: |
7874
pip install poetry==1.8.4 moto==4.2.11 coverage redis botocore==1.35.49 simplejson responses structlog fhir.resources jsonpath_ng pydantic==1.10.13 requests aws-lambda-typing cffi pyjwt boto3-stubs-lite[dynamodb]~=1.26.90 python-stdnum==1.20
7975
poetry run coverage run --source=backend -m unittest discover -s backend || echo "fhir-api tests failed" >> failed_tests.txt
8076
poetry run coverage xml -o sonarcloud-coverage.xml
81-
77+
8278
- name: Run unittest with coverage-mesh-processor
8379
id: meshprocessor
8480
continue-on-error: true
8581
run: |
8682
pip install poetry==1.8.4 moto==4.2.11 coverage redis botocore==1.35.49 simplejson responses structlog fhir.resources jsonpath_ng pydantic==1.10.13 requests aws-lambda-typing cffi pyjwt boto3-stubs-lite[dynamodb]~=1.26.90 python-stdnum==1.20
87-
poetry run coverage run --source=meshfileprocessor -m unittest discover -s meshfileprocessor || echo "meshfileprocessor tests failed" >> failed_tests.txt
88-
poetry run coverage xml -o sonarcloud-meshfileprocessor-coverage.xml
83+
poetry run coverage run --source=mesh_processor -m unittest discover -s mesh_processor || echo "mesh_processor tests failed" >> failed_tests.txt
84+
poetry run coverage xml -o sonarcloud-mesh_processor-coverage.xml
8985
9086
- name: Run Test Failure Summary
9187
id: check_failure
@@ -106,5 +102,5 @@ jobs:
106102
- name: SonarCloud Scan
107103
uses: SonarSource/sonarqube-scan-action@master
108104
env:
109-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
110-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
105+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
106+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,11 @@ RUN mkdir -p /home/appuser && \
66
echo 'appuser:x:1001:' >> /etc/group && \
77
chown -R 1001:1001 /home/appuser && pip install "poetry~=1.5.0"
88

9-
# Install Poetry as root
9+
10+
1011
COPY poetry.lock pyproject.toml README.md ./
1112
RUN poetry config virtualenvs.create false && poetry install --no-interaction --no-ansi --no-root --only main
1213

13-
# -----------------------------
14-
# FROM base AS test
15-
# COPY src src
16-
# COPY tests tests
17-
# RUN poetry install --no-interaction --no-ansi --no-root && \
18-
# pytest --disable-warnings tests
1914

2015
# -----------------------------
2116
FROM base AS build

mesh_processor/Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
build:
2+
docker build -t mesh-lambda-build .
3+
4+
package: build
5+
mkdir -p build
6+
docker run --rm -v $(shell pwd)/build:/build mesh-lambda-build
7+
8+
.PHONY: build package
File renamed without changes.

0 commit comments

Comments
 (0)