Skip to content

Commit 90ede5b

Browse files
authored
[ BB2-1243 ] Finishing changes before publish (#26)
* Update BB2 team readme.md * Update setup.py w/ email and status * Update bb2 dev readme for command cut/paste * Update bb2 team readme note on filename reuse
1 parent eabb734 commit 90ede5b

2 files changed

Lines changed: 40 additions & 25 deletions

File tree

README-sdk-dev.md

Lines changed: 38 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,14 @@ See the following for more details: https://packaging.python.org/en/latest/guid
141141

142142
#### Upload project to TestPyPI
143143

144+
- In your user account settings, add an API token or use one that is already available to the team.
145+
144146
- Setup your configuration by adding the following lines to your $HOME/.pypirc file:
145147

146148
```
147149
[testpypi]
148-
username = <your TestPyPI username>
150+
username = __token__
151+
password = # either a user-scoped token or a project-scoped token you want to set as the default
149152
```
150153

151154
- Source the virtual environment from previous instruction.
@@ -154,14 +157,14 @@ See the following for more details: https://packaging.python.org/en/latest/guid
154157
source bb2_venv/bin/activate
155158
```
156159

157-
- Upload to the TestPyPI registry with the following command:
160+
- Upload to the TestPyPI registry with the following command for your intended version.
161+
162+
For example with target version = 1.0.0:
158163

159164
```bash
160-
twine upload --repository testpypi dist/cms_bluebutton_sdk-0.1.0-py3-none-any.whl
165+
twine upload --repository testpypi dist/cms_bluebutton_sdk-1.0.0-py3-none-any.whl
161166
```
162167

163-
Enter the account password.
164-
165168
- Confirm the project was uploaded via the following URL: https://test.pypi.org/project/cms-bluebutton-sdk
166169

167170

@@ -175,12 +178,21 @@ See the following for more details: https://packaging.python.org/en/latest/guid
175178
# Perform install and commands after sourcing the venv.
176179
```
177180

181+
- Remove the package, if it is already installed.
182+
183+
```bash
184+
pip show cms-bluebutton-sdk
185+
pip uninstall cms-bluebutton-sdk
186+
187+
```
188+
178189
- Install `cms-bluebutton-sdk` from TestPyPI. Extras are installed from the main PyPI registry.
179190

180191
```bash
181192
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ cms-bluebutton-sdk
182193
```
183194

195+
184196
- Show the installed package.
185197

186198
```bash
@@ -189,12 +201,12 @@ See the following for more details: https://packaging.python.org/en/latest/guid
189201

190202
- Test imports with the following.
191203

192-
```bash
193-
cat <<EOF >test_bb2_sdk.py
194-
from cms_bluebutton import BlueButton, AuthorizationToken
195-
EOF
196-
python test_bb2_sdk.py
197-
```
204+
```bash
205+
cat <<EOF >test_bb2_sdk.py
206+
from cms_bluebutton import BlueButton, AuthorizationToken
207+
EOF
208+
python test_bb2_sdk.py
209+
```
198210

199211
- If successful, there will be no errors in the output.
200212

@@ -222,11 +234,14 @@ See the following for more details: https://pypi.org/
222234

223235
#### Upload project to PyPI
224236

237+
- In your user account settings, add an API token or use one that is already available to the team.
238+
225239
- Setup your configuration by adding the following lines to your $HOME/.pypirc file:
226240

227241
```
228242
[pypi]
229-
username = <your PyPI username>
243+
username = __token__
244+
password = # either a user-scoped token or a project-scoped token you want to set as the default
230245
```
231246
232247
- Source the virtual environment from previous instruction.
@@ -238,11 +253,9 @@ See the following for more details: https://pypi.org/
238253
- Upload to the PyPI registry with the following command. Update the filename for the target version.
239254

240255
```bash
241-
twine upload dist/cms_bluebutton_sdk-0.1.0-py3-none-any.whl
256+
twine upload dist/cms_bluebutton_sdk-1.0.0-py3-none-any.whl
242257
```
243258

244-
Enter the account password.
245-
246259
- Confirm the project was uploaded at the following URL: https://pypi.org/project/cms-bluebutton-sdk
247260

248261

@@ -270,13 +283,13 @@ See the following for more details: https://pypi.org/
270283

271284
- Test imports with the following.
272285

273-
```bash
274-
cat <<EOF
275-
from cms_bluebutton import BlueButton, AuthorizationToken
276-
print("IMPORT TEST SUCCESSFUL!!!")
277-
EOF
278-
python test_bb2_sdk.py
279-
```
286+
```bash
287+
cat <<EOF
288+
from cms_bluebutton import BlueButton, AuthorizationToken
289+
print("IMPORT TEST SUCCESSFUL!!!")
290+
EOF
291+
python test_bb2_sdk.py
292+
```
280293

281294
- If successful, there will be no errors and the following message will output:
282295

@@ -294,9 +307,11 @@ New versions can be published using the previous build, TestPyPI and PyPI publis
294307

295308
Before building and publishing a new version, the version number needs to be increased.
296309

310+
NOTE: Once a file is uploaded, it can not be replaced with a new file. A new version is needed per: https://test.pypi.org/help/#file-name-reuse
311+
297312
To do this, edit the following line in the `setup.py` file with the desired release version:
298313

299314
```
300-
version="0.1.0",
315+
version="1.0.0",
301316
```
302317

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
name="cms-bluebutton-sdk",
99
version="1.0.0",
1010
author="CMS Blue Button 2.0 Team",
11-
author_email="bb2@example.com", # TODO: Do we want to include?
11+
author_email="BlueButtonAPI@cms.hhs.gov",
1212
license="CC0 1.0 Universal",
1313
description="An SDK used for interacting with the CMS Blue Button 2.0 API",
1414
long_description=long_description,
@@ -19,7 +19,7 @@
1919
"Programming Language :: Python :: 3",
2020
"License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication",
2121
"Operating System :: OS Independent",
22-
"Development Status :: 3 - Alpha",
22+
"Development Status :: 5 - Production/Stable",
2323
"Intended Audience :: Developers",
2424
"Intended Audience :: Healthcare Industry",
2525
"Topic :: Software Development",

0 commit comments

Comments
 (0)