arthexis 0.1.16__py3-none-any.whl → 0.1.28__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 arthexis might be problematic. Click here for more details.

Files changed (67) hide show
  1. {arthexis-0.1.16.dist-info → arthexis-0.1.28.dist-info}/METADATA +95 -41
  2. arthexis-0.1.28.dist-info/RECORD +112 -0
  3. config/asgi.py +1 -15
  4. config/middleware.py +47 -1
  5. config/settings.py +21 -30
  6. config/settings_helpers.py +176 -1
  7. config/urls.py +69 -1
  8. core/admin.py +805 -473
  9. core/apps.py +6 -8
  10. core/auto_upgrade.py +19 -4
  11. core/backends.py +13 -3
  12. core/celery_utils.py +73 -0
  13. core/changelog.py +66 -5
  14. core/environment.py +4 -5
  15. core/models.py +1825 -218
  16. core/notifications.py +1 -1
  17. core/reference_utils.py +10 -11
  18. core/release.py +55 -7
  19. core/sigil_builder.py +2 -2
  20. core/sigil_resolver.py +1 -66
  21. core/system.py +285 -4
  22. core/tasks.py +439 -138
  23. core/test_system_info.py +43 -5
  24. core/tests.py +516 -18
  25. core/user_data.py +94 -21
  26. core/views.py +348 -186
  27. nodes/admin.py +904 -67
  28. nodes/apps.py +12 -1
  29. nodes/feature_checks.py +30 -0
  30. nodes/models.py +800 -127
  31. nodes/rfid_sync.py +1 -1
  32. nodes/tasks.py +98 -3
  33. nodes/tests.py +1381 -152
  34. nodes/urls.py +15 -1
  35. nodes/utils.py +51 -3
  36. nodes/views.py +1382 -152
  37. ocpp/admin.py +1970 -152
  38. ocpp/consumers.py +839 -34
  39. ocpp/models.py +968 -17
  40. ocpp/network.py +398 -0
  41. ocpp/store.py +411 -43
  42. ocpp/tasks.py +261 -3
  43. ocpp/test_export_import.py +1 -0
  44. ocpp/test_rfid.py +194 -6
  45. ocpp/tests.py +1918 -87
  46. ocpp/transactions_io.py +9 -1
  47. ocpp/urls.py +8 -3
  48. ocpp/views.py +700 -53
  49. pages/admin.py +262 -30
  50. pages/apps.py +35 -0
  51. pages/context_processors.py +28 -21
  52. pages/defaults.py +1 -1
  53. pages/forms.py +31 -8
  54. pages/middleware.py +6 -2
  55. pages/models.py +86 -2
  56. pages/module_defaults.py +5 -5
  57. pages/site_config.py +137 -0
  58. pages/tests.py +1050 -126
  59. pages/urls.py +14 -2
  60. pages/utils.py +70 -0
  61. pages/views.py +622 -56
  62. arthexis-0.1.16.dist-info/RECORD +0 -111
  63. core/workgroup_urls.py +0 -17
  64. core/workgroup_views.py +0 -94
  65. {arthexis-0.1.16.dist-info → arthexis-0.1.28.dist-info}/WHEEL +0 -0
  66. {arthexis-0.1.16.dist-info → arthexis-0.1.28.dist-info}/licenses/LICENSE +0 -0
  67. {arthexis-0.1.16.dist-info → arthexis-0.1.28.dist-info}/top_level.txt +0 -0
nodes/apps.py CHANGED
@@ -1,6 +1,7 @@
1
1
  import logging
2
2
  import os
3
3
  import socket
4
+ import sys
4
5
  import threading
5
6
  import time
6
7
  from pathlib import Path
@@ -20,7 +21,7 @@ def _startup_notification() -> None:
20
21
 
21
22
  host = socket.gethostname()
22
23
 
23
- port = os.environ.get("PORT", "8000")
24
+ port = os.environ.get("PORT", "8888")
24
25
 
25
26
  version = ""
26
27
  ver_path = Path(settings.BASE_DIR) / "VERSION"
@@ -66,6 +67,10 @@ def _startup_notification() -> None:
66
67
  def _trigger_startup_notification(**_: object) -> None:
67
68
  """Attempt to send the startup notification in the background."""
68
69
 
70
+ if _is_running_migration_command():
71
+ logger.debug("Startup notification skipped: running migration command")
72
+ return
73
+
69
74
  try:
70
75
  connections["default"].ensure_connection()
71
76
  except OperationalError:
@@ -74,6 +79,12 @@ def _trigger_startup_notification(**_: object) -> None:
74
79
  _startup_notification()
75
80
 
76
81
 
82
+ def _is_running_migration_command() -> bool:
83
+ """Return ``True`` when Django's ``migrate`` command is executing."""
84
+
85
+ return len(sys.argv) > 1 and sys.argv[1] == "migrate"
86
+
87
+
77
88
  class NodesConfig(AppConfig):
78
89
  default_auto_field = "django.db.models.BigAutoField"
79
90
  name = "nodes"
nodes/feature_checks.py CHANGED
@@ -91,6 +91,36 @@ class FeatureCheckRegistry:
91
91
  feature_checks = FeatureCheckRegistry()
92
92
 
93
93
 
94
+ @feature_checks.register("audio-capture")
95
+ def _check_audio_capture(feature: "NodeFeature", node: Optional["Node"]):
96
+ from .models import Node
97
+
98
+ target: Optional["Node"] = node or Node.get_local()
99
+ if target is None:
100
+ return FeatureCheckResult(
101
+ False,
102
+ f"No local node is registered; cannot verify {feature.display}.",
103
+ messages.WARNING,
104
+ )
105
+ if not Node._has_audio_capture_device():
106
+ return FeatureCheckResult(
107
+ False,
108
+ f"No audio recording device detected on {target.hostname} for {feature.display}.",
109
+ messages.WARNING,
110
+ )
111
+ if not target.has_feature("audio-capture"):
112
+ return FeatureCheckResult(
113
+ False,
114
+ f"{feature.display} is not enabled on {target.hostname}.",
115
+ messages.WARNING,
116
+ )
117
+ return FeatureCheckResult(
118
+ True,
119
+ f"{feature.display} is enabled on {target.hostname} and a recording device is available.",
120
+ messages.SUCCESS,
121
+ )
122
+
123
+
94
124
  @feature_checks.register_default
95
125
  def _default_feature_check(
96
126
  feature: "NodeFeature", node: Optional["Node"]