remoterf 0.0.7.36__py3-none-any.whl → 0.0.7.38__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of remoterf might be problematic. Click here for more details.
- remoteRF/core/app.py +39 -12
- {remoterf-0.0.7.36.dist-info → remoterf-0.0.7.38.dist-info}/METADATA +2 -2
- {remoterf-0.0.7.36.dist-info → remoterf-0.0.7.38.dist-info}/RECORD +6 -6
- {remoterf-0.0.7.36.dist-info → remoterf-0.0.7.38.dist-info}/WHEEL +0 -0
- {remoterf-0.0.7.36.dist-info → remoterf-0.0.7.38.dist-info}/entry_points.txt +0 -0
- {remoterf-0.0.7.36.dist-info → remoterf-0.0.7.38.dist-info}/top_level.txt +0 -0
remoteRF/core/app.py
CHANGED
|
@@ -13,7 +13,7 @@ account = RemoteRFAccount()
|
|
|
13
13
|
session = PromptSession()
|
|
14
14
|
|
|
15
15
|
def welcome():
|
|
16
|
-
printf("Welcome to RemoteRF
|
|
16
|
+
printf(f"Welcome to the RemoteRF Platform", (Sty.BOLD, Sty.BLUE), f"\nCurrent version: {print_my_version()} \nAll times are in Pacific Time (Los Angeles)", (Sty.GRAY))
|
|
17
17
|
try:
|
|
18
18
|
inpu = session.prompt(stylize("Please ", Sty.DEFAULT, "login", Sty.GREEN, " or ", Sty.DEFAULT, "register", Sty.RED, " to continue. (", Sty.DEFAULT, 'l', Sty.GREEN, "/", Sty.DEFAULT, 'r', Sty.RED, "): ", Sty.DEFAULT))
|
|
19
19
|
if inpu == 'r':
|
|
@@ -49,21 +49,21 @@ def welcome():
|
|
|
49
49
|
exit()
|
|
50
50
|
|
|
51
51
|
def title():
|
|
52
|
-
printf(f"RemoteRF
|
|
52
|
+
printf(f"Welcome to the RemoteRF Platform", (Sty.BOLD, Sty.BLUE), f"\nCurrent version: {print_my_version()} \nAll times are in Pacific Time (Los Angeles)", (Sty.GRAY))
|
|
53
53
|
# printf(f"Logged in as: ", Sty.DEFAULT, f'{account.username}', Sty.MAGENTA)
|
|
54
|
-
printf(f"Input ", Sty.DEFAULT, "'help' ", Sty.BRIGHT_GREEN, "for avaliable commands.", Sty.DEFAULT)
|
|
54
|
+
printf(f"Input ", Sty.DEFAULT, "'help' ", Sty.BRIGHT_GREEN, "for a list of avaliable commands.", Sty.DEFAULT)
|
|
55
55
|
|
|
56
56
|
def commands():
|
|
57
57
|
printf("Commands:", Sty.BOLD)
|
|
58
|
-
printf("'clear' ", Sty.MAGENTA, "
|
|
59
|
-
printf("'getdev' ", Sty.MAGENTA, "
|
|
60
|
-
printf("'help' or 'h'", Sty.MAGENTA, "
|
|
61
|
-
printf("'perms' ", Sty.MAGENTA, "
|
|
62
|
-
printf("'exit' or 'quit'", Sty.MAGENTA, "
|
|
63
|
-
printf("'getres' ", Sty.MAGENTA, "
|
|
64
|
-
printf("'myres' ", Sty.MAGENTA, "
|
|
65
|
-
printf("'cancelres' ", Sty.MAGENTA, "
|
|
66
|
-
printf("'resdev' ", Sty.MAGENTA, "
|
|
58
|
+
printf("'clear' ", Sty.MAGENTA, " : Clear terminal", Sty.DEFAULT)
|
|
59
|
+
printf("'getdev' ", Sty.MAGENTA, " : View devices", Sty.DEFAULT)
|
|
60
|
+
printf("'help' or 'h' ", Sty.MAGENTA, " : Show this help message", Sty.DEFAULT)
|
|
61
|
+
printf("'perms' ", Sty.MAGENTA, " : View permissions", Sty.DEFAULT)
|
|
62
|
+
printf("'exit' or 'quit' ", Sty.MAGENTA, ": Exit", Sty.DEFAULT)
|
|
63
|
+
printf("'getres' ", Sty.MAGENTA, " : View all reservations", Sty.DEFAULT)
|
|
64
|
+
printf("'myres' ", Sty.MAGENTA, " : View my reservations", Sty.DEFAULT)
|
|
65
|
+
printf("'cancelres' ", Sty.MAGENTA, " : Cancel a reservation", Sty.DEFAULT)
|
|
66
|
+
printf("'resdev' ", Sty.MAGENTA, " : Reserve a device", Sty.DEFAULT)
|
|
67
67
|
# printf("'resdev -n' ", Sty.MAGENTA, "- naive reserve device", Sty.DEFAULT)
|
|
68
68
|
# printf("'resdev s' ", Sty.MAGENTA, "- Reserve a Device (by single date)", Sty.DEFAULT)
|
|
69
69
|
# check if user is admin
|
|
@@ -73,6 +73,33 @@ def clear():
|
|
|
73
73
|
os.system('cls' if os.name == 'nt' else 'clear')
|
|
74
74
|
title()
|
|
75
75
|
|
|
76
|
+
def print_my_version():
|
|
77
|
+
import sys
|
|
78
|
+
latest = newest_version_pip("remoterf")
|
|
79
|
+
try:
|
|
80
|
+
import importlib.metadata as md # Py3.8+
|
|
81
|
+
top = __name__.split('.')[0]
|
|
82
|
+
# Try mapping package → distribution (Py3.10+); fall back to same name.
|
|
83
|
+
for dist in getattr(md, "packages_distributions", lambda: {})().get(top, []):
|
|
84
|
+
if (latest == md.version(dist)):
|
|
85
|
+
return f"{md.version(dist)} (LATEST)"
|
|
86
|
+
else:
|
|
87
|
+
return f"{md.version(dist)} (OUTDATED)"
|
|
88
|
+
return md.version(top)
|
|
89
|
+
except Exception:
|
|
90
|
+
# Last resort: __version__ attribute if you define it.
|
|
91
|
+
return getattr(sys.modules.get(__name__.split('.')[0]), "__version__", "unknown")
|
|
92
|
+
|
|
93
|
+
def newest_version_pip(project="remoterf"):
|
|
94
|
+
import sys, subprocess, re
|
|
95
|
+
out = subprocess.check_output(
|
|
96
|
+
[sys.executable, "-m", "pip", "index", "versions", project],
|
|
97
|
+
text=True, stderr=subprocess.STDOUT
|
|
98
|
+
)
|
|
99
|
+
m = re.search(r"(?i)\blatest\s*:\s*([^\s,]+)", out)
|
|
100
|
+
return m.group(1) if m else None
|
|
101
|
+
|
|
102
|
+
|
|
76
103
|
def reservations():
|
|
77
104
|
data = account.get_reservations()
|
|
78
105
|
if 'ace' in data.results:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: remoterf
|
|
3
|
-
Version: 0.0.7.
|
|
4
|
-
Summary: A python API to remotely access signal centric hardware. Client-side only!
|
|
3
|
+
Version: 0.0.7.38
|
|
4
|
+
Summary: A python API to remotely access signal centric hardware. Client-side only! Courtesy of Wireless Lab @ UCLA & Prof. Ian Roberts.
|
|
5
5
|
Author: Ethan Ge
|
|
6
6
|
Author-email: ethoGalaxy@gmail.com
|
|
7
7
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -10,7 +10,7 @@ remoteRF/common/utils/list_string.py,sha256=qsch666vX2e3CZ2W5EdYi62dOk37k1v2yPpH
|
|
|
10
10
|
remoteRF/common/utils/process_arg.py,sha256=J1REqgjm-1daqTBdVASgDd-16y-KneOJpCZXPEOklVk,2971
|
|
11
11
|
remoteRF/core/__init__.py,sha256=XQiCe8kyzM7XLxA883-uDndBmbr-NXo1uvtMJT2h6oA,73
|
|
12
12
|
remoteRF/core/acc_login.py,sha256=UcY3rDLAwHoJ9lYXRfm26z_6yJX0JSoKv-u1mF6n0Gs,49
|
|
13
|
-
remoteRF/core/app.py,sha256=
|
|
13
|
+
remoteRF/core/app.py,sha256=sR_zexVcamLoVWaeKN-LdC6k9lYBcq9XFZIenQ7AoO4,22545
|
|
14
14
|
remoteRF/core/grpc_acc.py,sha256=bspLTzblhqYVVEFPwdvXrDZjREBWJVvD_SaT_cja6kU,2441
|
|
15
15
|
remoteRF/core/grpc_client.py,sha256=540JkGsJ8_poN_aRn3FJmuGN4078or06ke00T6A7qEo,3143
|
|
16
16
|
remoteRF/core/version.py,sha256=iMcmRB5ZxCliJZgPU6utwCia5M9HJ-J8E-LpPmcEgS8,182
|
|
@@ -24,8 +24,8 @@ remoteRF/core/certs/server.key,sha256=aUbQk7TKZJyhp-l5noj4nnfmtLDendTiR_sGq4amX6
|
|
|
24
24
|
remoteRF/drivers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
25
|
remoteRF/drivers/adalm_pluto/__init__.py,sha256=_IOOeQXR6paCP7Eciw2aeKBUNvZs-jeBTwW8QqUlFyU,33
|
|
26
26
|
remoteRF/drivers/adalm_pluto/pluto_remote.py,sha256=6TTp6v6HCXnULHFh90GVbLDWk7RXY2oZo7iiCl8EZdI,7460
|
|
27
|
-
remoterf-0.0.7.
|
|
28
|
-
remoterf-0.0.7.
|
|
29
|
-
remoterf-0.0.7.
|
|
30
|
-
remoterf-0.0.7.
|
|
31
|
-
remoterf-0.0.7.
|
|
27
|
+
remoterf-0.0.7.38.dist-info/METADATA,sha256=UMRM5lKcfLZqZkr38NDHMsUio6Mr9fgPR7UiLIt-OCM,5173
|
|
28
|
+
remoterf-0.0.7.38.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
29
|
+
remoterf-0.0.7.38.dist-info/entry_points.txt,sha256=XUNbXzexoN1D7mmv6Q-5Bpwa6lZd0j55y15Ba6kSaT4,104
|
|
30
|
+
remoterf-0.0.7.38.dist-info/top_level.txt,sha256=XQJoVTmAOsHV9qtPSP_QSh0ma4jKxsDkxn4IjM_ZuZk,9
|
|
31
|
+
remoterf-0.0.7.38.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|