data-sourcerer 0.4.0__py3-none-any.whl → 0.5.0__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.
Files changed (42) hide show
  1. {data_sourcerer-0.4.0.dist-info → data_sourcerer-0.5.0.dist-info}/METADATA +9 -8
  2. {data_sourcerer-0.4.0.dist-info → data_sourcerer-0.5.0.dist-info}/RECORD +42 -23
  3. sourcerer/__init__.py +3 -1
  4. sourcerer/domain/package_meta/__init__.py +0 -0
  5. sourcerer/domain/package_meta/entities.py +9 -0
  6. sourcerer/domain/package_meta/services.py +9 -0
  7. sourcerer/domain/settings/__init__.py +0 -0
  8. sourcerer/domain/settings/entities.py +11 -0
  9. sourcerer/domain/settings/repositories.py +20 -0
  10. sourcerer/domain/settings/services.py +19 -0
  11. sourcerer/infrastructure/db/models.py +23 -0
  12. sourcerer/infrastructure/package_meta/__init__.py +0 -0
  13. sourcerer/infrastructure/package_meta/services.py +26 -0
  14. sourcerer/infrastructure/settings/__init__.py +0 -0
  15. sourcerer/infrastructure/settings/repositories.py +59 -0
  16. sourcerer/infrastructure/settings/services.py +16 -0
  17. sourcerer/infrastructure/storage_provider/services/gcp.py +0 -1
  18. sourcerer/infrastructure/utils.py +1 -0
  19. sourcerer/presentation/di_container.py +13 -0
  20. sourcerer/presentation/screens/about/__init__.py +0 -0
  21. sourcerer/presentation/screens/about/main.py +60 -0
  22. sourcerer/presentation/screens/about/styles.tcss +32 -0
  23. sourcerer/presentation/screens/file_system_finder/__init__.py +0 -0
  24. sourcerer/presentation/screens/main/main.py +89 -6
  25. sourcerer/presentation/screens/main/styles.tcss +13 -4
  26. sourcerer/presentation/screens/main/widgets/storage_list_sidebar.py +102 -18
  27. sourcerer/presentation/screens/provider_creds_list/main.py +14 -4
  28. sourcerer/presentation/screens/provider_creds_list/styles.tcss +9 -0
  29. sourcerer/presentation/screens/settings/__init__.py +0 -0
  30. sourcerer/presentation/screens/settings/main.py +70 -0
  31. sourcerer/presentation/screens/settings/styles.tcss +44 -0
  32. sourcerer/presentation/screens/shared/widgets/button.py +11 -0
  33. sourcerer/presentation/screens/shared/widgets/labeled_input.py +1 -3
  34. sourcerer/presentation/screens/storage_action_progress/main.py +1 -2
  35. sourcerer/presentation/screens/storages_list/main.py +15 -4
  36. sourcerer/presentation/screens/storages_list/styles.tcss +7 -0
  37. sourcerer/presentation/settings.py +1 -0
  38. sourcerer/presentation/utils.py +1 -0
  39. sourcerer/utils.py +19 -1
  40. {data_sourcerer-0.4.0.dist-info → data_sourcerer-0.5.0.dist-info}/WHEEL +0 -0
  41. {data_sourcerer-0.4.0.dist-info → data_sourcerer-0.5.0.dist-info}/entry_points.txt +0 -0
  42. {data_sourcerer-0.4.0.dist-info → data_sourcerer-0.5.0.dist-info}/licenses/LICENSE +0 -0
@@ -23,6 +23,13 @@ StoragesListScreen {
23
23
 
24
24
  .add_storage_button {
25
25
  color: $success-darken-2;
26
+
27
+ &:hover {
28
+ color: $primary;
29
+ }
30
+ &:focus {
31
+ color: $primary;
32
+ }
26
33
  }
27
34
 
28
35
  margin-bottom: 1;
@@ -3,6 +3,7 @@
3
3
  This module contains various configuration constants and settings used throughout
4
4
  the application, including UI elements and display configurations.
5
5
  """
6
+
6
7
  from enum import Enum
7
8
 
8
9
  NO_DATA_LOGO = """
@@ -4,6 +4,7 @@ Utility functions for the presentation layer.
4
4
  This module provides helper functions for the presentation layer,
5
5
  particularly for retrieving and initializing storage provider services.
6
6
  """
7
+
7
8
  from dependency_injector.wiring import Provide
8
9
 
9
10
  from sourcerer.domain.access_credentials.repositories import BaseCredentialsRepository
sourcerer/utils.py CHANGED
@@ -1,8 +1,10 @@
1
- # Generate and store encryption key in a file
1
+ import contextlib
2
2
  import os
3
3
  import uuid
4
4
  from pathlib import Path
5
5
 
6
+ import requests
7
+
6
8
 
7
9
  def get_encryption_key(path: Path) -> str:
8
10
  """
@@ -30,3 +32,19 @@ def get_encryption_key(path: Path) -> str:
30
32
  f.write(new_key)
31
33
 
32
34
  return new_key
35
+
36
+
37
+ def get_last_package_version(name):
38
+ """
39
+ Fetch the latest version of a package from PyPI.
40
+ Args:
41
+ name (str): The name of the package.
42
+ Returns:
43
+ str: The latest version of the package, or None if an error occurs.
44
+ """
45
+ with contextlib.suppress(Exception):
46
+ url = f"https://pypi.org/pypi/{name}/json"
47
+ response = requests.get(url, timeout=5)
48
+ response.raise_for_status()
49
+ return response.json()["info"]["version"]
50
+ return None