remoterf 0.0.7.36__tar.gz → 0.0.7.37__tar.gz

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.

Files changed (38) hide show
  1. {remoterf-0.0.7.36/src/remoteRF.egg-info → remoterf-0.0.7.37}/PKG-INFO +2 -2
  2. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/setup.py +2 -2
  3. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/src/remoteRF/core/app.py +81 -12
  4. {remoterf-0.0.7.36 → remoterf-0.0.7.37/src/remoteRF.egg-info}/PKG-INFO +2 -2
  5. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/LICENSE +0 -0
  6. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/MANIFEST.in +0 -0
  7. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/README.md +0 -0
  8. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/setup.cfg +0 -0
  9. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/src/remoteRF/__init__.py +0 -0
  10. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/src/remoteRF/common/__init__.py +0 -0
  11. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/src/remoteRF/common/grpc/__init__.py +0 -0
  12. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/src/remoteRF/common/grpc/grpc_pb2.py +0 -0
  13. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/src/remoteRF/common/grpc/grpc_pb2_grpc.py +0 -0
  14. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/src/remoteRF/common/utils/__init__.py +0 -0
  15. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/src/remoteRF/common/utils/ansi_codes.py +0 -0
  16. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/src/remoteRF/common/utils/api_token.py +0 -0
  17. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/src/remoteRF/common/utils/list_string.py +0 -0
  18. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/src/remoteRF/common/utils/process_arg.py +0 -0
  19. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/src/remoteRF/core/__init__.py +0 -0
  20. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/src/remoteRF/core/acc_login.py +0 -0
  21. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/src/remoteRF/core/certs/__init__.py +0 -0
  22. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/src/remoteRF/core/certs/ca.crt +0 -0
  23. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/src/remoteRF/core/certs/ca.key +0 -0
  24. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/src/remoteRF/core/certs/cert.pem +0 -0
  25. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/src/remoteRF/core/certs/key.pem +0 -0
  26. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/src/remoteRF/core/certs/server.crt +0 -0
  27. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/src/remoteRF/core/certs/server.key +0 -0
  28. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/src/remoteRF/core/grpc_acc.py +0 -0
  29. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/src/remoteRF/core/grpc_client.py +0 -0
  30. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/src/remoteRF/core/version.py +0 -0
  31. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/src/remoteRF/drivers/__init__.py +0 -0
  32. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/src/remoteRF/drivers/adalm_pluto/__init__.py +0 -0
  33. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/src/remoteRF/drivers/adalm_pluto/pluto_remote.py +0 -0
  34. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/src/remoteRF.egg-info/SOURCES.txt +0 -0
  35. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/src/remoteRF.egg-info/dependency_links.txt +0 -0
  36. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/src/remoteRF.egg-info/entry_points.txt +0 -0
  37. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/src/remoteRF.egg-info/requires.txt +0 -0
  38. {remoterf-0.0.7.36 → remoterf-0.0.7.37}/src/remoteRF.egg-info/top_level.txt +0 -0
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: remoterf
3
- Version: 0.0.7.36
4
- Summary: A python API to remotely access signal centric hardware. Client-side only!
3
+ Version: 0.0.7.37
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
@@ -6,10 +6,10 @@ with open("README.md", "r", encoding="utf-8") as fh:
6
6
 
7
7
  setup(
8
8
  name="remoterf",
9
- version="0.0.7.36",
9
+ version="0.0.7.37",
10
10
  author="Ethan Ge",
11
11
  author_email="ethoGalaxy@gmail.com",
12
- description="A python API to remotely access signal centric hardware. Client-side only!",
12
+ description="A python API to remotely access signal centric hardware. Client-side only! Courtesy of Wireless Lab @ UCLA & Prof. Ian Roberts.",
13
13
  long_description=long_description, # Set the README content here
14
14
  long_description_content_type="text/markdown", # Specify that it's Markdown
15
15
  packages=find_packages(where="src"), # Automatically finds subpackages like core, deviceA, deviceB
@@ -13,7 +13,7 @@ account = RemoteRFAccount()
13
13
  session = PromptSession()
14
14
 
15
15
  def welcome():
16
- printf("Welcome to RemoteRF Reservation System. (all times are in Pacific Time)", (Sty.BOLD, Sty.BLUE))
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 Reservation System", Sty.BOLD)
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, "- 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)
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,75 @@ 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
+ # try:
79
+ # import importlib.metadata as md # Py3.8+
80
+ # top = __name__.split('.')[0]
81
+ # # Try mapping package → distribution (Py3.10+); fall back to same name.
82
+ # for dist in getattr(md, "packages_distributions", lambda: {})().get(top, []):
83
+ # return md.version(dist)
84
+ # return md.version(top)
85
+ # except Exception:
86
+ # # Last resort: __version__ attribute if you define it.
87
+ # return getattr(sys.modules.get(__name__.split('.')[0]), "__version__", "unknown")
88
+
89
+ def print_my_version(timeout=3.0):
90
+ """
91
+ Return this package's installed version, tagged as (LATEST) or (OUTDATED → X).
92
+ Uses only the Python stdlib.
93
+ """
94
+ import sys, json, urllib.request, re
95
+ try:
96
+ import importlib.metadata as md # Py 3.8+
97
+ top = __name__.split('.')[0]
98
+ dists = getattr(md, "packages_distributions", lambda: {})().get(top, []) or [top]
99
+
100
+ # Simple PEP440-ish comparator using only stdlib
101
+ def _canon(v):
102
+ parts = re.split(r'[.\-+]', v)
103
+ out = []
104
+ for p in parts:
105
+ if p.isdigit():
106
+ out.append((0, int(p)))
107
+ continue
108
+ t = p.lower().replace("alpha", "a").replace("beta", "b").replace("pre", "rc")
109
+ m = re.match(r'([a-z]+)(\d*)', t)
110
+ if m:
111
+ rank = {'dev': -1, 'a': 0, 'b': 1, 'rc': 2, 'post': 4}.get(m.group(1), 3)
112
+ out.append((1, rank, int(m.group(2) or 0)))
113
+ else:
114
+ out.append((2, t))
115
+ return tuple(out)
116
+
117
+ def _cmp(v1, v2):
118
+ a, b = _canon(v1), _canon(v2)
119
+ return (a > b) - (a < b)
120
+
121
+ for dist in dists:
122
+ try:
123
+ installed = md.version(dist)
124
+ except Exception:
125
+ continue
126
+
127
+ latest = None
128
+ try:
129
+ with urllib.request.urlopen(f"https://pypi.org/pypi/{dist}/json", timeout=timeout) as r:
130
+ latest = (json.load(r)["info"]["version"] or "").strip() or None
131
+ except Exception:
132
+ pass
133
+
134
+ if not latest:
135
+ return installed # offline or project not on PyPI
136
+
137
+ return installed + (" (LATEST)" if _cmp(installed, latest) >= 0
138
+ else f" (OUTDATED \u2192 {latest})")
139
+
140
+ # Fallback: use __version__ if importlib metadata couldn't resolve
141
+ return getattr(sys.modules.get(top), "__version__", "unknown")
142
+ except Exception:
143
+ return "unknown"
144
+
76
145
  def reservations():
77
146
  data = account.get_reservations()
78
147
  if 'ace' in data.results:
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: remoterf
3
- Version: 0.0.7.36
4
- Summary: A python API to remotely access signal centric hardware. Client-side only!
3
+ Version: 0.0.7.37
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
File without changes
File without changes
File without changes
File without changes