Skip to content

Commit 8afb8d1

Browse files
committed
Improving upgrading
1 parent 6766be6 commit 8afb8d1

File tree

3 files changed

+3
-28
lines changed

3 files changed

+3
-28
lines changed

README.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@ This will install the current `main` branch to your project. If you would like a
1616

1717
`pip install git+https://YOUR_ACCESS_TOKEN@github.com/viamrobotics/python-sdk.git@FULL_COMMIT_HASH`
1818

19-
It is recommended that you install using a commit hash, as that will allow you to upgrade/install over an existing installation, rather than having to uninstall and reinstall to upgrade.
20-
2119
### Upgrading
22-
To upgrade the SDK, you must either
23-
* First uninstall the SDK (`pip uninstall viam`) and then re-install using the above instructions
24-
* Install using a specific commit hash
20+
Because the SDK is under active development, we suggest that you upgrade the package frequently. To do so, simply run the `pip install` command with the `-U` option:
21+
22+
`pip install -U git+https://YOUR_ACCESS_TOKEN@github.com/viamrobotics/python-sdk.git`
2523

2624
**Somewhat-Automatic Updates**
2725

setup.py

-3
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,4 @@ def get_packages(root: str) -> List[str]:
6363
'Pillow',
6464
'typing-extensions',
6565
],
66-
entry_points={
67-
'console_scripts': ['viam-update=viam.utils:update', ],
68-
}
6966
)

viam/utils.py

-20
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import os
2-
import sys
31
from typing import Any, Dict, List, SupportsFloat
42

53
from google.protobuf.json_format import MessageToDict
@@ -102,21 +100,3 @@ def message_to_struct(message: Message) -> Struct:
102100
struct = Struct()
103101
struct.update(MessageToDict(message))
104102
return struct
105-
106-
107-
def update() -> None:
108-
"""
109-
TODO (njooma): Only here while we don't have this package published on pypi
110-
"""
111-
try:
112-
token = sys.argv[1]
113-
except IndexError:
114-
token = os.environ.get('GITHUB_ACCESS_TOKEN', None)
115-
if not token:
116-
print("[ERROR] GitHub Personal Access Token is required")
117-
return
118-
os.system('pip uninstall -y viam')
119-
os.system(
120-
f'pip install git+https://{token}' +
121-
'@github.com/viamrobotics/python-sdk.git'
122-
)

0 commit comments

Comments
 (0)