pydiagral 1.5.0b2__tar.gz → 1.5.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 (41) hide show
  1. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/CHANGELOG.md +14 -0
  2. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/PKG-INFO +1 -1
  3. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/example_code.py +3 -0
  4. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/src/pydiagral/api.py +23 -1
  5. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/.devcontainer/Dockerfile.dev +0 -0
  6. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/.devcontainer/devcontainer.json +0 -0
  7. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/.github/FUNDING.yml +0 -0
  8. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  9. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  10. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/.github/copilot-commit-message-instructions.md +0 -0
  11. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/.github/dependabot.yml +0 -0
  12. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/.github/labels.yml +0 -0
  13. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/.github/workflows/labeler.yml +0 -0
  14. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/.github/workflows/lint.yaml +0 -0
  15. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/.github/workflows/lock.yml +0 -0
  16. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/.github/workflows/pytest.yaml +0 -0
  17. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/.github/workflows/release_and_doc.yaml +0 -0
  18. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/.github/workflows/semantic-prs.yml +0 -0
  19. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/.gitignore +0 -0
  20. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/.releaserc +0 -0
  21. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/.vscode/extensions.json +0 -0
  22. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/.vscode/settings.json +0 -0
  23. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/LICENSE +0 -0
  24. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/README.md +0 -0
  25. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/docs/api.md +0 -0
  26. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/docs/exceptions.md +0 -0
  27. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/docs/how-to-find-diagral-serial.png +0 -0
  28. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/docs/index.md +0 -0
  29. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/docs/models.md +0 -0
  30. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/docs/pydiagral-Logo.png +0 -0
  31. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/mkdocs.yml +0 -0
  32. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/pyproject.toml +0 -0
  33. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/src/pydiagral/__init__.py +0 -0
  34. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/src/pydiagral/constants.py +0 -0
  35. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/src/pydiagral/exceptions.py +0 -0
  36. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/src/pydiagral/models.py +0 -0
  37. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/src/pydiagral/utils.py +0 -0
  38. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/tests/__init__.py +0 -0
  39. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/tests/data/configuration_sample.json +0 -0
  40. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/tests/data/system_details_sample.json +0 -0
  41. {pydiagral-1.5.0b2 → pydiagral-1.5.0b4}/tests/test_pydiagral_api.py +0 -0
@@ -1,3 +1,17 @@
1
+ # [1.5.0-beta.4](https://github.com/mguyard/pydiagral/compare/v1.5.0-beta.3...v1.5.0-beta.4) (2025-02-28)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **api:** 🔧 Update log message for alarm name retrieval ([fca40e4](https://github.com/mguyard/pydiagral/commit/fca40e44bccd59f6399ae2b89a29c2b4fcc80172))
7
+
8
+ # [1.5.0-beta.3](https://github.com/mguyard/pydiagral/compare/v1.5.0-beta.2...v1.5.0-beta.3) (2025-02-28)
9
+
10
+
11
+ ### Features
12
+
13
+ * **api:** 🚀 Add `get_alarm_name` method and log alarm name in tests ([96e727f](https://github.com/mguyard/pydiagral/commit/96e727fe851a1086d8689c6fb7204efdb702938d))
14
+
1
15
  # [1.5.0-beta.2](https://github.com/mguyard/pydiagral/compare/v1.5.0-beta.1...v1.5.0-beta.2) (2025-02-28)
2
16
 
3
17
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pydiagral
3
- Version: 1.5.0b2
3
+ Version: 1.5.0b4
4
4
  Summary: A Python library for interacting with Diagral systems
5
5
  Project-URL: Homepage, https://github.com/mguyard/pydiagral
6
6
  Project-URL: Documentation, https://github.com/mguyard/pydiagral
@@ -239,6 +239,9 @@ async def test_diagral_api() -> None: # noqa: D103,C901
239
239
  stop_result = await alarm.stop_system()
240
240
  _LOGGER.info("Stop System with result: %s", stop_result)
241
241
 
242
+ alarm_name: str = await alarm.get_alarm_name() # Get the alarm name
243
+ _LOGGER.info("Alarm Name is: %s", alarm_name)
244
+
242
245
  if (
243
246
  APIKEY_DELETION and APIKEY_CREATION
244
247
  ): # Only when the API key has been created
@@ -400,7 +400,7 @@ class DiagralAPI:
400
400
  self.__apikey = None
401
401
  self.__secret_key = None
402
402
 
403
- async def try_connection(self, ephemeral: bool = True) -> bool:
403
+ async def try_connection(self, ephemeral: bool = True) -> TryConnectResult:
404
404
  """Test connection with the Diagral system.
405
405
 
406
406
  This method tests the connection by either using provided API credentials or generating
@@ -489,6 +489,28 @@ class DiagralAPI:
489
489
  )
490
490
  return self.alarm_configuration
491
491
 
492
+ async def get_alarm_name(self) -> str:
493
+ """Get the name of the alarm from the configuration.
494
+
495
+ Returns:
496
+ str: The name of the alarm from the configuration.
497
+
498
+ Raises:
499
+ ConfigurationError: If unable to retrieve the alarm configuration.
500
+
501
+ Note:
502
+ This method will attempt to fetch the configuration if it hasn't been loaded yet.
503
+
504
+ """
505
+
506
+ if not self.alarm_configuration:
507
+ await self.get_configuration()
508
+
509
+ if not self.alarm_configuration:
510
+ raise ConfigurationError("Failed to retrieve alarm configuration")
511
+
512
+ return self.alarm_configuration.alarm.name
513
+
492
514
  async def get_devices_info(self) -> DeviceList:
493
515
  """Asynchronously retrieves information about various device types from the alarm configuration.
494
516
 
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