cave-cli 3.6.0b3__tar.gz → 3.6.0b4__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 (51) hide show
  1. {cave_cli-3.6.0b3/cave_cli.egg-info → cave_cli-3.6.0b4}/PKG-INFO +1 -1
  2. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli/utils/display.py +11 -6
  3. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4/cave_cli.egg-info}/PKG-INFO +1 -1
  4. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/pyproject.toml +1 -1
  5. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/test/test_display.py +19 -1
  6. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/LICENSE +0 -0
  7. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/NOTICE.md +0 -0
  8. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/README.md +0 -0
  9. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli/__init__.py +0 -0
  10. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli/cli.py +0 -0
  11. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli/commands/__init__.py +0 -0
  12. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli/commands/create.py +0 -0
  13. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli/commands/doctor.py +0 -0
  14. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli/commands/kill.py +0 -0
  15. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli/commands/list_cmd.py +0 -0
  16. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli/commands/list_versions.py +0 -0
  17. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli/commands/prettify.py +0 -0
  18. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli/commands/purge.py +0 -0
  19. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli/commands/reset.py +0 -0
  20. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli/commands/run.py +0 -0
  21. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli/commands/sync_cmd.py +0 -0
  22. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli/commands/test.py +0 -0
  23. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli/commands/theme.py +0 -0
  24. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli/commands/uninstall.py +0 -0
  25. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli/commands/update.py +0 -0
  26. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli/commands/upgrade.py +0 -0
  27. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli/commands/version.py +0 -0
  28. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli/utils/__init__.py +0 -0
  29. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli/utils/cache.py +0 -0
  30. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli/utils/constants.py +0 -0
  31. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli/utils/docker.py +0 -0
  32. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli/utils/env.py +0 -0
  33. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli/utils/git.py +0 -0
  34. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli/utils/logger.py +0 -0
  35. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli/utils/net.py +0 -0
  36. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli/utils/subprocess.py +0 -0
  37. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli/utils/sync.py +0 -0
  38. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli/utils/validate.py +0 -0
  39. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli/utils/version.py +0 -0
  40. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli.egg-info/SOURCES.txt +0 -0
  41. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli.egg-info/dependency_links.txt +0 -0
  42. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli.egg-info/entry_points.txt +0 -0
  43. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli.egg-info/requires.txt +0 -0
  44. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/cave_cli.egg-info/top_level.txt +0 -0
  45. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/setup.cfg +0 -0
  46. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/test/test_env.py +0 -0
  47. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/test/test_net.py +0 -0
  48. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/test/test_sync.py +0 -0
  49. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/test/test_upgrade.py +0 -0
  50. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/test/test_validate.py +0 -0
  51. {cave_cli-3.6.0b3 → cave_cli-3.6.0b4}/utils/prettify.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cave_cli
3
- Version: 3.6.0b3
3
+ Version: 3.6.0b4
4
4
  Summary: CLI for creating and managing Docker-based CAVE web applications.
5
5
  Author-email: MIT-CAVE <cave-contact@mit.edu>
6
6
  License: Apache-2.0
@@ -220,6 +220,9 @@ _SKIP_PATTERNS: tuple[str, ...] = (
220
220
  "connection closed",
221
221
  "Will watch for changes in these directories",
222
222
  "Started reloader process",
223
+ "StatReload",
224
+ "Reloading",
225
+ "reloading",
223
226
 
224
227
  # Custom socket markers (processed for client count, not displayed)
225
228
  "SOCKET CONNECTION OPENED",
@@ -253,16 +256,18 @@ _LOADING_TRIGGERS = (
253
256
  "Starting development server",
254
257
  "Started server process ",
255
258
  "Waiting for application startup",
256
- "Reloading",
257
259
  )
258
260
  _READY_TRIGGERS = (
259
261
  "Quit the server with CONTROL-C",
260
262
  "Application startup complete",
261
- "Ready"
263
+ "Ready",
264
+ "App Ready",
262
265
  )
263
266
  _RELOAD_TRIGGERS = (
264
267
  "changed, reloading",
265
268
  "detected changes in",
269
+ "Reloading",
270
+ "reloading",
266
271
  )
267
272
 
268
273
  _WS_CONNECT = "WebSocket CONNECT "
@@ -340,10 +345,10 @@ class LogFilter:
340
345
  """
341
346
  if any(t in stripped for t in _READY_TRIGGERS):
342
347
  return READY
343
- if any(t in stripped for t in _LOADING_TRIGGERS):
344
- return LOADING
345
348
  if any(t in stripped for t in _RELOAD_TRIGGERS):
346
349
  return RELOADING
350
+ if any(t in stripped for t in _LOADING_TRIGGERS):
351
+ return LOADING
347
352
  return None
348
353
 
349
354
  @staticmethod
@@ -794,13 +799,13 @@ class RunDashboard:
794
799
  self._status = new_status
795
800
  if new_status == RELOADING:
796
801
  self._ws_clients = 0
797
- reloading_entry = LogLine(timestamp=ts, text="Reloading", raw=f"INFO: {stripped}")
802
+ reloading_entry = LogLine(timestamp=ts, text="App Reloading", raw="INFO: App Reloading")
798
803
  add_minimal(reloading_entry)
799
804
  add_all(reloading_entry)
800
805
  if self._show_all and self._scroll_offset > 0:
801
806
  self._scroll_offset += 1
802
807
  elif new_status == READY:
803
- ready_entry = LogLine(timestamp=ts, text="Ready", raw="INFO: Ready")
808
+ ready_entry = LogLine(timestamp=ts, text="App Ready", raw="INFO: App Ready")
804
809
  add_minimal(ready_entry)
805
810
  add_all(ready_entry)
806
811
  if self._show_all and self._scroll_offset > 0:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cave_cli
3
- Version: 3.6.0b3
3
+ Version: 3.6.0b4
4
4
  Summary: CLI for creating and managing Docker-based CAVE web applications.
5
5
  Author-email: MIT-CAVE <cave-contact@mit.edu>
6
6
  License: Apache-2.0
@@ -12,7 +12,7 @@ build-backend = "setuptools.build_meta"
12
12
 
13
13
  [project]
14
14
  name = "cave_cli"
15
- version = "3.6.0b3"
15
+ version = "3.6.0b4"
16
16
  description = "CLI for creating and managing Docker-based CAVE web applications."
17
17
  authors = [
18
18
  {name = "MIT-CAVE", email = "cave-contact@mit.edu"}
@@ -1,5 +1,5 @@
1
1
  import pytest
2
- from cave_cli.utils.display import LogFilter, READY, LOADING, RELOADING
2
+ from cave_cli.utils.display import LogFilter, RunDashboard, READY, LOADING, RELOADING
3
3
 
4
4
  class TestLogFilter:
5
5
  def test_strip_level_prefix(self):
@@ -31,6 +31,8 @@ class TestLogFilter:
31
31
  assert filter_obj.classify_status("Application startup complete.") == READY
32
32
  assert filter_obj.classify_status("Started server process [134449]") == LOADING
33
33
  assert filter_obj.classify_status("detected changes in 'app.py', reloading") == RELOADING
34
+ assert filter_obj.classify_status("StatReload detected file change in 'app.py' - Reloading...") == RELOADING
35
+ assert filter_obj.classify_status("Reloading...") == RELOADING
34
36
  assert filter_obj.classify_status("Just some logging") is None
35
37
 
36
38
  def test_is_noise(self):
@@ -44,3 +46,19 @@ class TestLogFilter:
44
46
  assert filter_obj.is_noise("Started reloader process [48] using StatReload") is True
45
47
  assert filter_obj.is_noise("some actual log line") is False
46
48
 
49
+
50
+ class TestRunDashboard:
51
+ def test_reload_log_entry(self):
52
+ dashboard = RunDashboard(app_name="test_app", url="http://localhost:8000")
53
+ assert len(dashboard._log_lines) == 1
54
+ assert dashboard._log_lines[0].text == "App Loading"
55
+
56
+ dashboard._process_line("INFO: Application startup complete.")
57
+ assert dashboard._log_lines[-1].text == "App Ready"
58
+
59
+ dashboard._process_line("WARNING: StatReload detected file change in 'app.py' - Reloading...")
60
+ assert dashboard._log_lines[-1].text == "App Reloading"
61
+ assert dashboard._log_lines[-1].raw == "INFO: App Reloading"
62
+
63
+ dashboard._process_line("INFO: Application startup complete.")
64
+ assert dashboard._log_lines[-1].text == "App Ready"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes