arthexis 0.1.8__py3-none-any.whl → 0.1.10__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 (84) hide show
  1. {arthexis-0.1.8.dist-info → arthexis-0.1.10.dist-info}/METADATA +87 -6
  2. arthexis-0.1.10.dist-info/RECORD +95 -0
  3. arthexis-0.1.10.dist-info/licenses/LICENSE +674 -0
  4. config/__init__.py +0 -1
  5. config/auth_app.py +0 -1
  6. config/celery.py +1 -2
  7. config/context_processors.py +1 -1
  8. config/offline.py +2 -0
  9. config/settings.py +352 -37
  10. config/urls.py +71 -6
  11. core/admin.py +1601 -200
  12. core/admin_history.py +50 -0
  13. core/admindocs.py +108 -1
  14. core/apps.py +161 -3
  15. core/auto_upgrade.py +57 -0
  16. core/backends.py +123 -7
  17. core/entity.py +62 -48
  18. core/fields.py +98 -0
  19. core/github_helper.py +25 -0
  20. core/github_issues.py +172 -0
  21. core/lcd_screen.py +1 -0
  22. core/liveupdate.py +25 -0
  23. core/log_paths.py +100 -0
  24. core/mailer.py +83 -0
  25. core/middleware.py +57 -0
  26. core/models.py +1279 -267
  27. core/notifications.py +11 -1
  28. core/public_wifi.py +227 -0
  29. core/reference_utils.py +97 -0
  30. core/release.py +27 -20
  31. core/sigil_builder.py +144 -0
  32. core/sigil_context.py +20 -0
  33. core/sigil_resolver.py +284 -0
  34. core/system.py +162 -29
  35. core/tasks.py +269 -27
  36. core/test_system_info.py +59 -1
  37. core/tests.py +644 -73
  38. core/tests_liveupdate.py +17 -0
  39. core/urls.py +2 -2
  40. core/user_data.py +425 -168
  41. core/views.py +627 -59
  42. core/widgets.py +51 -0
  43. core/workgroup_urls.py +7 -3
  44. core/workgroup_views.py +43 -6
  45. nodes/actions.py +0 -2
  46. nodes/admin.py +168 -285
  47. nodes/apps.py +9 -15
  48. nodes/backends.py +145 -0
  49. nodes/lcd.py +24 -10
  50. nodes/models.py +579 -179
  51. nodes/tasks.py +1 -5
  52. nodes/tests.py +894 -130
  53. nodes/utils.py +13 -2
  54. nodes/views.py +204 -28
  55. ocpp/admin.py +212 -63
  56. ocpp/apps.py +1 -1
  57. ocpp/consumers.py +642 -68
  58. ocpp/evcs.py +30 -10
  59. ocpp/models.py +452 -70
  60. ocpp/simulator.py +75 -11
  61. ocpp/store.py +288 -30
  62. ocpp/tasks.py +11 -7
  63. ocpp/test_export_import.py +8 -7
  64. ocpp/test_rfid.py +211 -16
  65. ocpp/tests.py +1576 -137
  66. ocpp/transactions_io.py +68 -22
  67. ocpp/urls.py +35 -2
  68. ocpp/views.py +701 -123
  69. pages/admin.py +173 -13
  70. pages/checks.py +0 -1
  71. pages/context_processors.py +39 -6
  72. pages/forms.py +131 -0
  73. pages/middleware.py +153 -0
  74. pages/models.py +37 -9
  75. pages/tests.py +1182 -42
  76. pages/urls.py +4 -0
  77. pages/utils.py +0 -1
  78. pages/views.py +844 -51
  79. arthexis-0.1.8.dist-info/RECORD +0 -80
  80. arthexis-0.1.8.dist-info/licenses/LICENSE +0 -21
  81. config/workgroup_app.py +0 -7
  82. core/checks.py +0 -29
  83. {arthexis-0.1.8.dist-info → arthexis-0.1.10.dist-info}/WHEEL +0 -0
  84. {arthexis-0.1.8.dist-info → arthexis-0.1.10.dist-info}/top_level.txt +0 -0
ocpp/evcs.py CHANGED
@@ -172,10 +172,12 @@ for key, val in _load_state_file().items(): # pragma: no cover - simple load
172
172
  async def simulate_cp(
173
173
  cp_idx: int,
174
174
  host: str,
175
- ws_port: int,
175
+ ws_port: Optional[int],
176
176
  rfid: str,
177
177
  vin: str,
178
178
  cp_path: str,
179
+ serial_number: str,
180
+ connector_id: int,
179
181
  duration: int,
180
182
  kw_min: float,
181
183
  kw_max: float,
@@ -194,7 +196,10 @@ async def simulate_cp(
194
196
  if the server closes the connection.
195
197
  """
196
198
 
197
- uri = f"ws://{host}:{ws_port}/{cp_path}"
199
+ if ws_port:
200
+ uri = f"ws://{host}:{ws_port}/{cp_path}"
201
+ else:
202
+ uri = f"ws://{host}/{cp_path}"
198
203
  headers = {}
199
204
  if username and password:
200
205
  userpass = f"{username}:{password}"
@@ -273,6 +278,7 @@ async def simulate_cp(
273
278
  {
274
279
  "chargePointModel": "Simulator",
275
280
  "chargePointVendor": "SimVendor",
281
+ "serialNumber": serial_number,
276
282
  },
277
283
  ]
278
284
  )
@@ -310,7 +316,7 @@ async def simulate_cp(
310
316
  "meter",
311
317
  "MeterValues",
312
318
  {
313
- "connectorId": 1,
319
+ "connectorId": connector_id,
314
320
  "meterValue": [
315
321
  {
316
322
  "timestamp": time.strftime(
@@ -364,6 +370,7 @@ async def simulate_cp(
364
370
  {
365
371
  "chargePointModel": "Simulator",
366
372
  "chargePointVendor": "SimVendor",
373
+ "serialNumber": serial_number,
367
374
  },
368
375
  ]
369
376
  )
@@ -401,7 +408,7 @@ async def simulate_cp(
401
408
  "meter",
402
409
  "MeterValues",
403
410
  {
404
- "connectorId": 1,
411
+ "connectorId": connector_id,
405
412
  "meterValue": [
406
413
  {
407
414
  "timestamp": time.strftime(
@@ -431,7 +438,7 @@ async def simulate_cp(
431
438
  "start",
432
439
  "StartTransaction",
433
440
  {
434
- "connectorId": 1,
441
+ "connectorId": connector_id,
435
442
  "idTag": rfid,
436
443
  "meterStart": meter_start,
437
444
  "vin": vin,
@@ -459,7 +466,7 @@ async def simulate_cp(
459
466
  "meter",
460
467
  "MeterValues",
461
468
  {
462
- "connectorId": 1,
469
+ "connectorId": connector_id,
463
470
  "transactionId": tx_id,
464
471
  "meterValue": [
465
472
  {
@@ -522,7 +529,7 @@ async def simulate_cp(
522
529
  "meter",
523
530
  "MeterValues",
524
531
  {
525
- "connectorId": 1,
532
+ "connectorId": connector_id,
526
533
  "meterValue": [
527
534
  {
528
535
  "timestamp": time.strftime("%Y-%m-%dT%H:%M:%S")
@@ -578,10 +585,12 @@ async def simulate_cp(
578
585
  def simulate(
579
586
  *,
580
587
  host: str = "127.0.0.1",
581
- ws_port: int = 9000,
588
+ ws_port: Optional[int] = 8000,
582
589
  rfid: str = "FFFFFFFF",
583
590
  cp_path: str = "CPX",
584
591
  vin: str = "",
592
+ serial_number: str = "",
593
+ connector_id: int = 1,
585
594
  duration: int = 600,
586
595
  kw_min: float = 30.0,
587
596
  kw_max: float = 60.0,
@@ -614,6 +623,8 @@ def simulate(
614
623
  "rfid": rfid,
615
624
  "cp_path": cp_path,
616
625
  "vin": vin,
626
+ "serial_number": serial_number,
627
+ "connector_id": connector_id,
617
628
  "duration": duration,
618
629
  "kw_min": kw_min,
619
630
  "kw_max": kw_max,
@@ -642,6 +653,8 @@ def simulate(
642
653
  rfid,
643
654
  vin,
644
655
  this_cp_path,
656
+ serial_number,
657
+ connector_id,
645
658
  duration,
646
659
  kw_min,
647
660
  kw_max,
@@ -662,6 +675,8 @@ def simulate(
662
675
  rfid,
663
676
  vin,
664
677
  this_cp_path,
678
+ serial_number,
679
+ connector_id,
665
680
  duration,
666
681
  kw_min,
667
682
  kw_max,
@@ -712,6 +727,8 @@ def simulate(
712
727
  rfid,
713
728
  vin,
714
729
  cp_path,
730
+ serial_number,
731
+ connector_id,
715
732
  duration,
716
733
  kw_min,
717
734
  kw_max,
@@ -736,6 +753,8 @@ def simulate(
736
753
  rfid,
737
754
  vin,
738
755
  this_cp_path,
756
+ serial_number,
757
+ connector_id,
739
758
  duration,
740
759
  kw_min,
741
760
  kw_max,
@@ -850,7 +869,9 @@ def _simulator_status_json(cp: Optional[int] = None) -> str:
850
869
 
851
870
  if cp is not None:
852
871
  return json.dumps(_export_state(_simulators[cp]), indent=2)
853
- return json.dumps({str(idx): _export_state(st) for idx, st in _simulators.items()}, indent=2)
872
+ return json.dumps(
873
+ {str(idx): _export_state(st) for idx, st in _simulators.items()}, indent=2
874
+ )
854
875
 
855
876
 
856
877
  def get_simulator_state(cp: Optional[int] = None, refresh_file: bool = False):
@@ -908,4 +929,3 @@ __all__ = [
908
929
  "view_cp_simulator",
909
930
  "view_simulator",
910
931
  ]
911
-