Skip to content

Commit e8785a0

Browse files
authored
Merge pull request #67 from CMSgov/jimfuqian/BB2-Dependabot-version-bumps-python-sample-client
jimfuqian/BB2-python-sample-bump-versions-and-cleanups
2 parents e7a12e2 + 3055648 commit e8785a0

File tree

7 files changed

+1789
-1687
lines changed

7 files changed

+1789
-1687
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Please review our SDK documentation for more information and additional features
6464

6565
Debugging server component
6666
--------------------------
67-
debugpy remote debugging enabled on port 5678 for server in docker compose, developer can attach to server from IDE e.g. vscode.
67+
debugpy remote debugging enabled on port 10678 for server in docker compose, developer can attach to server from IDE e.g. vscode.
6868

6969
Error Responses and handling:
7070
-----------------------------

client/yarn.lock

Lines changed: 1768 additions & 1673 deletions
Large diffs are not rendered by default.

docker-compose.selenium.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: '3'
2-
31
services:
42
server:
53
build:
@@ -10,7 +8,7 @@ services:
108
- DANGEROUSLY_DISABLE_HOST_CHECK=true
119
ports:
1210
- "3001:3001"
13-
- "5678:5678"
11+
- "10678:10678"
1412
client:
1513
build:
1614
context: ./client
@@ -29,6 +27,17 @@ services:
2927
- chrome
3028
- server
3129
- client
30+
selenium-tests-debug:
31+
build:
32+
context: ./selenium_tests
33+
dockerfile: ./Dockerfile
34+
command: python3 -m debugpy --listen 0.0.0.0:10679 --wait-for-client -m pytest ./src/test_python_sample.py
35+
ports:
36+
- "10679:10679"
37+
depends_on:
38+
- chrome
39+
- server
40+
- client
3241
chrome:
3342
image: selenium/standalone-chrome-debug
3443
hostname: chrome

docker-compose.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
version: '3'
2-
31
services:
42
server:
53
build:
64
context: ./server
75
dockerfile: ./Dockerfile
86
args:
97
BUILD_DEVELOPMENT: ${BUILD_DEVELOPMENT}
8+
command: bash -c "python -m debugpy --listen 0.0.0.0:10678 app.py"
109
ports:
1110
- "3001:3001"
12-
- "5678:5678"
11+
- "10678:10678"
1312
volumes:
1413
- ./server:/server
1514
client:

selenium_tests/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
FROM selenium/standalone-chrome-debug
22

3+
ENV PYDEVD_DISABLE_FILE_VALIDATION 1
34
ENV PYTHONUNBUFFERED 1
45
USER root
56
RUN apt-get update && apt-get install -yq python3.8 python3-pip
@@ -8,4 +9,4 @@ ADD . /code/
89
WORKDIR /code
910
RUN ln -s /usr/bin/python3 /usr/local/bin/python
1011
RUN pip3 install --upgrade pip
11-
RUN pip3 install selenium pytest
12+
RUN pip3 install selenium pytest debugpy

server/Dockerfile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
FROM python:3.11-slim
1+
FROM python:3.9
22

33
ARG BUILD_DEVELOPMENT="False"
44

5+
ENV PYDEVD_DISABLE_FILE_VALIDATION 1
56
LABEL version="1.1.0"
67
LABEL description="Demo of a Medicare claims data sample app"
78

@@ -18,8 +19,5 @@ RUN if [ "$BUILD_DEVELOPMENT" = "True" ]; then \
1819
pip install cms-bluebutton-sdk; \
1920
fi
2021

22+
RUN pipenv lock
2123
RUN pipenv install --system --deploy --ignore-pipfile
22-
23-
EXPOSE 3001
24-
25-
CMD ["sh", "-c", "python -m debugpy --listen 0.0.0.0:5678 app.py"]

server/Pipfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ flask = "*"
99
[dev-packages]
1010

1111
[requires]
12-
python_version = "3.11.6"
12+
python_version = "3.11"

0 commit comments

Comments
 (0)