RemoteRF 2.13.2__tar.gz → 2.13.3__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.
Files changed (125) hide show
  1. {remoterf-2.13.2/src/remoterf.egg-info → remoterf-2.13.3}/PKG-INFO +21 -1
  2. {remoterf-2.13.2 → remoterf-2.13.3}/README.md +20 -0
  3. {remoterf-2.13.2 → remoterf-2.13.3}/pyproject.toml +1 -1
  4. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/core/app.py +8 -16
  5. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/remoterf_cli.py +4 -4
  6. {remoterf-2.13.2 → remoterf-2.13.3/src/remoterf.egg-info}/PKG-INFO +21 -1
  7. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_cli_login_fresh.py +77 -2
  8. {remoterf-2.13.2 → remoterf-2.13.3}/LICENSE +0 -0
  9. {remoterf-2.13.2 → remoterf-2.13.3}/setup.cfg +0 -0
  10. {remoterf-2.13.2 → remoterf-2.13.3}/setup.py +0 -0
  11. {remoterf-2.13.2 → remoterf-2.13.3}/src/_remoterf_alias.py +0 -0
  12. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/__init__.py +0 -0
  13. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/admin.py +0 -0
  14. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/agent_cli.py +0 -0
  15. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/agent_docs.py +0 -0
  16. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/common/__init__.py +0 -0
  17. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/common/grpc/__init__.py +0 -0
  18. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/common/grpc/deployment_capabilities.proto +0 -0
  19. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/common/grpc/deployment_capabilities_pb2.py +0 -0
  20. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/common/grpc/deployment_capabilities_pb2_grpc.py +0 -0
  21. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/common/grpc/grpc.proto +0 -0
  22. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/common/grpc/grpc_pb2.py +0 -0
  23. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/common/grpc/grpc_pb2_grpc.py +0 -0
  24. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/common/grpc/v2_codec.py +0 -0
  25. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/common/tos_notice.txt +0 -0
  26. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/common/utils/__init__.py +0 -0
  27. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/common/utils/ansi_codes.py +0 -0
  28. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/common/utils/api_token.py +0 -0
  29. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/common/utils/banner.py +0 -0
  30. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/common/utils/list_string.py +0 -0
  31. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/common/utils/process_arg.py +0 -0
  32. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/config/__init__.py +0 -0
  33. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/config/cert_fetcher.py +0 -0
  34. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/config/config.py +0 -0
  35. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/core/__init__.py +0 -0
  36. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/core/acc_login.py +0 -0
  37. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/core/availability.py +0 -0
  38. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/core/banner_note.txt +0 -0
  39. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/core/direct_path.py +0 -0
  40. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/core/dynamic_v2_transport.py +0 -0
  41. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/core/grpc_acc.py +0 -0
  42. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/core/grpc_client.py +0 -0
  43. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/core/messages.py +0 -0
  44. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/core/secure_channel.py +0 -0
  45. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/core/v2_errors.py +0 -0
  46. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/data/agent_guide.md +0 -0
  47. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/data/mcp_tools.json +0 -0
  48. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/deployment/__init__.py +0 -0
  49. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/deployment/backend.py +0 -0
  50. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/deployment/direct.py +0 -0
  51. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/deployment/homes.py +0 -0
  52. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/deployment/http.py +0 -0
  53. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/deployment/lanpass.py +0 -0
  54. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/deployment/state.py +0 -0
  55. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/drivers/__init__.py +0 -0
  56. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/drivers/_virtual.py +0 -0
  57. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/drivers/adalm_pluto/__init__.py +0 -0
  58. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/drivers/adalm_pluto/adalm_pluto_remote.py +0 -0
  59. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/drivers/dynamic_device.py +0 -0
  60. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/drivers/dynamic_v2.py +0 -0
  61. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/drivers/hackrf/__init__.py +0 -0
  62. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/drivers/hackrf/hackrf_remote.py +0 -0
  63. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/drivers/rtl_sdr/__init__.py +0 -0
  64. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/drivers/rtl_sdr/rtl_sdr_remote.py +0 -0
  65. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/drivers/schema_review.py +0 -0
  66. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/drivers/sim_sdr/__init__.py +0 -0
  67. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/drivers/sim_sdr/sim_sdr_remote.py +0 -0
  68. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/drivers/support/__init__.py +0 -0
  69. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/drivers/support/ti_mmwave.py +0 -0
  70. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/drivers/support/uhd.py +0 -0
  71. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/drivers/support/uhd_dsp.py +0 -0
  72. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/drivers/support/uhd_v2.py +0 -0
  73. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/drivers/ti_mmwave/__init__.py +0 -0
  74. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/drivers/ti_mmwave/ti_mmwave_remote.py +0 -0
  75. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/drivers/usrp/__init__.py +0 -0
  76. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/drivers/usrp/usrp_remote.py +0 -0
  77. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/drivers/usrp/usrp_remote.pyi +0 -0
  78. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/mcp_server.py +0 -0
  79. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/ops.py +0 -0
  80. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf/version.py +0 -0
  81. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf.egg-info/SOURCES.txt +0 -0
  82. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf.egg-info/dependency_links.txt +0 -0
  83. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf.egg-info/entry_points.txt +0 -0
  84. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf.egg-info/requires.txt +0 -0
  85. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf.egg-info/top_level.txt +0 -0
  86. {remoterf-2.13.2 → remoterf-2.13.3}/src/remoterf.py +0 -0
  87. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_agent_cli.py +0 -0
  88. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_agent_docs.py +0 -0
  89. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_banner.py +0 -0
  90. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_batch.py +0 -0
  91. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_bundled_drivers.py +0 -0
  92. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_config_address.py +0 -0
  93. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_deployment_accounts.py +0 -0
  94. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_device_routes.py +0 -0
  95. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_devices_api.py +0 -0
  96. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_direct_path_fixed.py +0 -0
  97. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_direct_path_global.py +0 -0
  98. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_direct_path_partner.py +0 -0
  99. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_direct_path_race.py +0 -0
  100. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_direct_path_relay.py +0 -0
  101. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_dynamic_device_codegen.py +0 -0
  102. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_dynamic_v2.py +0 -0
  103. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_federated_devices.py +0 -0
  104. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_fetch_idl_fallback.py +0 -0
  105. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_finish_prompt.py +0 -0
  106. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_gate_i_direct_path.py +0 -0
  107. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_grpc_client_target.py +0 -0
  108. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_homes.py +0 -0
  109. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_lan_fallback.py +0 -0
  110. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_mcp_server.py +0 -0
  111. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_messages.py +0 -0
  112. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_native_account_credentials.py +0 -0
  113. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_native_devices.py +0 -0
  114. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_old_import_name.py +0 -0
  115. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_ops.py +0 -0
  116. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_partner_dynamic_v2.py +0 -0
  117. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_pluto_virtual.py +0 -0
  118. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_process_arg.py +0 -0
  119. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_relay_paging.py +0 -0
  120. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_remote_admin.py +0 -0
  121. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_remoterf_cli.py +0 -0
  122. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_rx_readahead.py +0 -0
  123. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_schema_review.py +0 -0
  124. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_ti_mmwave.py +0 -0
  125. {remoterf-2.13.2 → remoterf-2.13.3}/tests/test_upgrade_rescue.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: remoterf
3
- Version: 2.13.2
3
+ Version: 2.13.3
4
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-email: Ethan Ge <84103791+ethange1@users.noreply.github.com>
6
6
  License-Expression: GPL-3.0-or-later
@@ -121,6 +121,26 @@ generic native dispatch, but are not release-qualified as exact UHD overload
121
121
  parity until the server's UHD 4.10 target-introspection and hardware
122
122
  differential gates pass.
123
123
 
124
+ ## Wi-Fi
125
+
126
+ USB Wi-Fi clients are generated from the server's `wifi` schema and installed
127
+ under the matching package name:
128
+
129
+ ```python
130
+ from remoterf.drivers import ensure_driver
131
+
132
+ token = "reservation-token"
133
+ ensure_driver(token=token)
134
+
135
+ from remoterf.drivers.wifi import WifiDongle
136
+
137
+ radio = WifiDongle(token)
138
+ print(radio.scan())
139
+ ```
140
+
141
+ Existing server inventories that use `device_type: wifi_dongle` are accepted
142
+ as `wifi` during upgrade. New inventory entries should use `device_type: wifi`.
143
+
124
144
  ## RTL-SDR
125
145
 
126
146
  RTL-SDR clients are generated from the server's `rtl_sdr` schema. The machine
@@ -94,6 +94,26 @@ generic native dispatch, but are not release-qualified as exact UHD overload
94
94
  parity until the server's UHD 4.10 target-introspection and hardware
95
95
  differential gates pass.
96
96
 
97
+ ## Wi-Fi
98
+
99
+ USB Wi-Fi clients are generated from the server's `wifi` schema and installed
100
+ under the matching package name:
101
+
102
+ ```python
103
+ from remoterf.drivers import ensure_driver
104
+
105
+ token = "reservation-token"
106
+ ensure_driver(token=token)
107
+
108
+ from remoterf.drivers.wifi import WifiDongle
109
+
110
+ radio = WifiDongle(token)
111
+ print(radio.scan())
112
+ ```
113
+
114
+ Existing server inventories that use `device_type: wifi_dongle` are accepted
115
+ as `wifi` during upgrade. New inventory entries should use `device_type: wifi`.
116
+
97
117
  ## RTL-SDR
98
118
 
99
119
  RTL-SDR clients are generated from the server's `rtl_sdr` schema. The machine
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "remoterf"
7
- version = "2.13.2"
7
+ version = "2.13.3"
8
8
  description = "A python API to remotely access signal centric hardware. Client-side only! Courtesy of Wireless Lab @ UCLA & Prof. Ian Roberts."
9
9
  readme = "README.md"
10
10
  license = "GPL-3.0-or-later"
@@ -422,15 +422,7 @@ def _account_command(command):
422
422
  if command in ('forgot-password', 'reset-password'):
423
423
  if not account.is_https_home:
424
424
  raise AccountBackendError('Contact the local administrator to reset a password')
425
- if command == 'forgot-password':
426
- _note("Forgot password", (Sty.BOLD, Sty.BLUE))
427
- account.backend.forgot(_ask('Email'))
428
- _note('If eligible, check your email for a password reset token.', Sty.DEFAULT)
429
- else:
430
- _panel("Reset password", [("Set a new password with the emailed reset token.", Sty.DEFAULT), (_PASSWORD_HINT, Sty.GRAY)])
431
- token = _ask('Password reset token', hidden=True)
432
- account.backend.reset(token, _password_confirmation(enforce_policy=True))
433
- _note('Password reset. Log in again.', (Sty.BOLD, Sty.GREEN))
425
+ _note('Reset a RemoteRF Global password from your terminal: remoterf --reset-password', Sty.DEFAULT)
434
426
  return False
435
427
  if command in ('l', 'login'):
436
428
  _note(f"Login to {_home_name()}", (Sty.BOLD, Sty.BLUE))
@@ -454,7 +446,7 @@ def _account_command(command):
454
446
  _remember_login()
455
447
  _sync_labs()
456
448
  return ok
457
- printf('Choose login or register' + (', verify, forgot-password or reset-password.' if account.is_https_home else '.'), Sty.WARNING)
449
+ printf('Choose login or register' + (' or verify.' if account.is_https_home else '.'), Sty.WARNING)
458
450
  return False
459
451
 
460
452
 
@@ -510,7 +502,8 @@ def welcome(*, show_banner: bool = True, initial=(), route=None):
510
502
  else:
511
503
  prompt = 'Please login or register to continue. (l/r): '
512
504
  if account.is_https_home:
513
- prompt = 'Choose register, verify, login, forgot-password or reset-password: '
505
+ printf('Forgot your password? Run: remoterf --reset-password', Sty.GRAY)
506
+ prompt = 'Choose register, verify or login: '
514
507
  command = session.prompt(stylize(prompt, Sty.DEFAULT)).strip().lower()
515
508
  if command in ('exit', 'quit'):
516
509
  return False
@@ -519,7 +512,7 @@ def welcome(*, show_banner: bool = True, initial=(), route=None):
519
512
  except (AccountBackendError, ValidationError) as exc:
520
513
  _error(exc)
521
514
  if command in ('l', 'login') and account.is_https_home and getattr(exc, 'code', None) == 'invalid_credentials':
522
- printf('Forgot your password? Run: remoterf --reset-pass', Sty.GRAY)
515
+ printf('Forgot your password? Run: remoterf --reset-password', Sty.GRAY)
523
516
  queue.clear()
524
517
  except (KeyboardInterrupt, EOFError):
525
518
  return False
@@ -609,7 +602,6 @@ def commands():
609
602
  ("'logout'", "Log out and forget the stored login"),
610
603
  ("'status'", "Show connection and device transport status"),
611
604
  ("'direct on|off'", "Enable or disable direct device transport"),
612
- *([("'reset-password'", "Set a new password with an emailed token")] if account.is_https_home else []),
613
605
  ("'exit' or 'quit'", "Exit"),
614
606
  ]
615
607
  width = max(len(name) for name, _ in rows)
@@ -1740,12 +1732,12 @@ def run(backend=None, *, register=False, enrollment_code=None, server_label=None
1740
1732
  completer=command_completer,
1741
1733
  )
1742
1734
  inpu = inpu.strip()
1743
- if inpu in ('register', 'verify', 'login', 'forgot-password', 'reset-password'):
1735
+ if inpu in ('register', 'verify', 'login'):
1744
1736
  authenticated = _account_command(inpu)
1745
1737
  if inpu == 'login' and authenticated:
1746
1738
  session_line()
1747
- if inpu == 'reset-password' and not welcome(show_banner=False):
1748
- break
1739
+ elif inpu in ('forgot-password', 'reset-password'):
1740
+ _account_command(inpu)
1749
1741
  elif inpu == 'refresh':
1750
1742
  if not account.is_https_home:
1751
1743
  raise AccountBackendError('Local passwords do not use refresh sessions')
@@ -154,7 +154,7 @@ def print_help() -> None:
154
154
  printf(" remoterf -l | --login [target]", Sty.CYAN, " Login: last used, 'global', a home name, or an account (username@deployment)", Sty.DEFAULT)
155
155
  printf(" remoterf -r | --register", Sty.CYAN, " Create a RemoteRF Global account", Sty.DEFAULT)
156
156
  printf(" remoterf -r --local-only", Sty.CYAN, " Register at a deployment with an enrollment code", Sty.DEFAULT)
157
- printf(" remoterf --reset-pass", Sty.CYAN, " Reset a RemoteRF Global password by email", Sty.DEFAULT)
157
+ printf(" remoterf --reset-password", Sty.CYAN, " Reset a RemoteRF Global password by email", Sty.DEFAULT)
158
158
  printf(" remoterf homes", Sty.CYAN, " List saved deployment homes", Sty.DEFAULT)
159
159
  printf(" remoterf --remote-admin [lab]", Sty.CYAN, " Open a lab's remote-admin console (-h for more)", Sty.DEFAULT)
160
160
  printf(" remoterf -v | --version", Sty.CYAN, " Print version", Sty.DEFAULT)
@@ -186,7 +186,7 @@ def print_help() -> None:
186
186
  print()
187
187
  printf("Examples:", (Sty.BOLD, Sty.MAGENTA))
188
188
  printf(" remoterf --register --local-only", Sty.GREEN, " then: ucla.global.remoterf.net/QEHN7", Sty.GRAY)
189
- printf(" remoterf --reset-pass", Sty.GREEN)
189
+ printf(" remoterf --reset-password", Sty.GREEN)
190
190
  printf(" remoterf --login ucla", Sty.GREEN)
191
191
  printf(" remoterf --login global", Sty.GREEN)
192
192
  printf(" remoterf --login jdoe@ucla", Sty.GREEN)
@@ -593,9 +593,9 @@ def main() -> int:
593
593
  print("remoterf: --register takes no arguments (or '--local-only')", file=sys.stderr)
594
594
  return 2
595
595
 
596
- if argv[0] in ("--reset-pass", "--reset-password"):
596
+ if argv[0] == "--reset-password":
597
597
  if len(argv) > 1:
598
- print("remoterf: --reset-pass takes no arguments", file=sys.stderr)
598
+ print("remoterf: --reset-password takes no arguments", file=sys.stderr)
599
599
  return 2
600
600
  return _reset_password()
601
601
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: remoterf
3
- Version: 2.13.2
3
+ Version: 2.13.3
4
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-email: Ethan Ge <84103791+ethange1@users.noreply.github.com>
6
6
  License-Expression: GPL-3.0-or-later
@@ -121,6 +121,26 @@ generic native dispatch, but are not release-qualified as exact UHD overload
121
121
  parity until the server's UHD 4.10 target-introspection and hardware
122
122
  differential gates pass.
123
123
 
124
+ ## Wi-Fi
125
+
126
+ USB Wi-Fi clients are generated from the server's `wifi` schema and installed
127
+ under the matching package name:
128
+
129
+ ```python
130
+ from remoterf.drivers import ensure_driver
131
+
132
+ token = "reservation-token"
133
+ ensure_driver(token=token)
134
+
135
+ from remoterf.drivers.wifi import WifiDongle
136
+
137
+ radio = WifiDongle(token)
138
+ print(radio.scan())
139
+ ```
140
+
141
+ Existing server inventories that use `device_type: wifi_dongle` are accepted
142
+ as `wifi` during upgrade. New inventory entries should use `device_type: wifi`.
143
+
124
144
  ## RTL-SDR
125
145
 
126
146
  RTL-SDR clients are generated from the server's `rtl_sdr` schema. The machine
@@ -183,15 +183,90 @@ def test_reset_password_uses_the_global_email_code_flow(monkeypatch):
183
183
  backend.close.assert_called_once_with()
184
184
 
185
185
 
186
- def test_reset_pass_dispatches_without_an_existing_login(monkeypatch):
186
+ def test_reset_password_dispatches_without_an_existing_login(monkeypatch):
187
187
  from remoterf import remoterf_cli
188
188
 
189
- monkeypatch.setattr("sys.argv", ["remoterf", "--reset-pass"])
189
+ monkeypatch.setattr("sys.argv", ["remoterf", "--reset-password"])
190
190
  with mock.patch.object(remoterf_cli, "_reset_password", return_value=0) as reset:
191
191
  assert remoterf_cli.main() == 0
192
192
  reset.assert_called_once_with()
193
193
 
194
194
 
195
+ def test_reset_pass_is_an_unknown_command(monkeypatch, capsys):
196
+ from remoterf import remoterf_cli
197
+
198
+ monkeypatch.setattr("sys.argv", ["remoterf", "--reset-pass"])
199
+ with mock.patch.object(remoterf_cli, "_reset_password", return_value=0) as reset:
200
+ assert remoterf_cli.main() == 2
201
+ assert "unknown command" in capsys.readouterr().err
202
+ reset.assert_not_called()
203
+
204
+
205
+ def test_reset_password_takes_no_arguments(monkeypatch, capsys):
206
+ from remoterf import remoterf_cli
207
+
208
+ monkeypatch.setattr("sys.argv", ["remoterf", "--reset-password", "x"])
209
+ with mock.patch.object(remoterf_cli, "_reset_password", return_value=0) as reset:
210
+ assert remoterf_cli.main() == 2
211
+ assert "--reset-password takes no arguments" in capsys.readouterr().err
212
+ reset.assert_not_called()
213
+
214
+
215
+ def test_help_names_only_reset_password(monkeypatch):
216
+ from remoterf import remoterf_cli
217
+
218
+ lines = []
219
+ monkeypatch.setattr(remoterf_cli, "printf", lambda *parts: lines.append("".join(parts[::2])))
220
+ remoterf_cli.print_help()
221
+ out = "\n".join(lines)
222
+ assert "remoterf --reset-password" in out
223
+ assert "--reset-pass " not in out
224
+
225
+
226
+ def _reset_command_at(https, command):
227
+ from remoterf.core import app
228
+
229
+ backend = mock.Mock(capabilities={"registration_policy": {}})
230
+ account = mock.Mock(is_https_home=https, backend=backend)
231
+ with mock.patch.object(app, "account", account):
232
+ try:
233
+ return app._account_command(command)
234
+ finally:
235
+ backend.forgot.assert_not_called()
236
+ backend.reset.assert_not_called()
237
+
238
+
239
+ def test_in_app_reset_commands_point_to_the_cli_flag(monkeypatch):
240
+ from remoterf.core import app
241
+
242
+ for command in ("forgot-password", "reset-password"):
243
+ lines = []
244
+ monkeypatch.setattr(app, "printf", lambda *parts: lines.append("".join(parts[::2])))
245
+ assert _reset_command_at(True, command) is False
246
+ assert any("remoterf --reset-password" in line for line in lines)
247
+
248
+
249
+ def test_in_app_reset_commands_at_a_local_home_name_the_administrator():
250
+ import pytest
251
+ from remoterf.deployment.http import AccountBackendError
252
+
253
+ for command in ("forgot-password", "reset-password"):
254
+ with pytest.raises(AccountBackendError, match="local administrator"):
255
+ _reset_command_at(False, command)
256
+
257
+
258
+ def test_session_help_has_no_reset_password_row(monkeypatch):
259
+ from remoterf.core import app
260
+
261
+ lines = []
262
+ monkeypatch.setattr(app, "printf", lambda *parts: lines.append("".join(parts[::2])))
263
+ for https in (True, False):
264
+ with mock.patch.object(app, "account", mock.Mock(is_https_home=https, is_admin=False)):
265
+ app.commands()
266
+ assert any("'logout'" in line for line in lines)
267
+ assert not any("reset-password" in line for line in lines)
268
+
269
+
195
270
  def _login_at(home, typed, *, https=False, pending=None):
196
271
  from remoterf.core import app
197
272
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes