Skip to content

Commit 4709feb

Browse files
committed
removing .whl and adding steps around testing locally
1 parent 3e9542c commit 4709feb

File tree

3 files changed

+48
-1
lines changed

3 files changed

+48
-1
lines changed

README-bb2-dev.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,51 @@ To show the version installed:
7575
docker-compose exec server pip show cms-bluebutton-sdk
7676
```
7777

78+
### Testing Locally
79+
80+
This information is repeated from the SDK (https://github.com/CMSgov/cms-bb2-python-sdk/blob/main/README-sdk-dev.md). It is here for ease of reference as it contains steps relating to the sample client as well.
81+
The current method for seeing the SDK in action is fairly complex, as it requires also setting up the Python sample client (this repo). These both, of course, depend upon the web-server repo for most of their logic. It is possible that in order to fully understand an issue that arises within the SDK or the sample client, a developer would have to track changes across 3 separate projects. There should be some future work to simplify this process as it is very manual and laborious.
82+
83+
The steps listed here are listed elsewhere in the documentation but for the sake of convenience, they are partially repeated here
84+
and written together so that a developer should be able to follow this step by step.
85+
86+
The overall goals are to:
87+
88+
- Build a local version of the SDK
89+
- Run a local version of sample client that consumes a local version of the SDK
90+
91+
### Building a local version of the SDK
92+
93+
Run the following commands in the base of the SDK repository. The commands suppose that you have the Python sample client cloned in the same folder as this SDK repo. Do not be in a virtualenv while running these commands.
94+
95+
```
96+
rm -rf build/
97+
python -m build --wheel --o ../bluebutton-sample-client-python-react/server
98+
```
99+
100+
The --o (or outdir) command should effectively 'copy paste' the built version of the .whl file into where it would be needed for the sample client. If you do not want it in the sample client, omit the --o and file path.
101+
102+
### Run a local version of sample client that consumes a local version of the SDK
103+
104+
Ensure that in bluebutton-sample-client-python-react/server/Dockerfile, uncomment the following line. Replace the version number (1.0.4 in the example) of the .whl file with what has been generated from the previous build command.
105+
106+
```
107+
RUN pip install cms_bluebutton_sdk-1.0.4-py3-none-any.whl
108+
```
109+
110+
In bluebutton-sample-client-python-react/server/Pipfile, add this line:
111+
112+
```
113+
cms-bluebutton-sdk = {file = "./cms_bluebutton_sdk-1.0.4-py3-none-any.whl"}
114+
```
115+
116+
In the base repository of bluebutton-sample-client-python-react, run the following commands. Ensure that you have no currently running containers or images of the sample client.
117+
118+
```
119+
cd server
120+
unzip -l cms_bluebutton_sdk-1.0.4-py3-none-any.whl
121+
pip install cms_bluebutton_sdk-1.0.4-py3-none-any.whl
122+
docker compose up
123+
```
124+
125+
Each time a change is made in the SDK, you must repeat all of the previous steps of building and re-running a local sample client. You must also ensure that the containers and images are removed each time.

server/Pipfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ name = "pypi"
66
[packages]
77
flask = "*"
88
jinja2 = "==3.1.*"
9-
cms-bluebutton-sdk = {file = "./cms_bluebutton_sdk-1.0.4-py3-none-any.whl"}
109

1110
[dev-packages]
1211

-14.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)