pythagoras 0.20.8__tar.gz → 0.20.9__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 (68) hide show
  1. {pythagoras-0.20.8 → pythagoras-0.20.9}/PKG-INFO +2 -2
  2. {pythagoras-0.20.8 → pythagoras-0.20.9}/README.md +1 -1
  3. {pythagoras-0.20.8 → pythagoras-0.20.9}/pyproject.toml +1 -1
  4. pythagoras-0.20.9/src/pythagoras/_100_top_level_API/__init__.py +2 -0
  5. pythagoras-0.20.9/src/pythagoras/_100_top_level_API/top_level_API.py +30 -0
  6. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/core/__init__.py +2 -1
  7. pythagoras-0.20.8/src/pythagoras/_100_top_level_API/__init__.py +0 -2
  8. pythagoras-0.20.8/src/pythagoras/_100_top_level_API/top_level_API.py +0 -0
  9. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/.DS_Store +0 -0
  10. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_010_basic_portals/__init__.py +0 -0
  11. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_010_basic_portals/basic_portal_core_classes.py +0 -0
  12. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_010_basic_portals/exceptions.py +0 -0
  13. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_010_basic_portals/long_infoname.py +0 -0
  14. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_010_basic_portals/not_picklable_class.py +0 -0
  15. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_010_basic_portals/portal_tester.py +0 -0
  16. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_010_basic_portals/post_init_metaclass.py +0 -0
  17. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_020_ordinary_code_portals/__init__.py +0 -0
  18. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_020_ordinary_code_portals/code_normalizer.py +0 -0
  19. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_020_ordinary_code_portals/function_processing.py +0 -0
  20. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_020_ordinary_code_portals/ordinary_decorator.py +0 -0
  21. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_020_ordinary_code_portals/ordinary_portal_core_classes.py +0 -0
  22. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_030_data_portals/__init__.py +0 -0
  23. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_030_data_portals/data_portal_core_classes.py +0 -0
  24. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_030_data_portals/ready_and_get.py +0 -0
  25. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_030_data_portals/storable_decorator.py +0 -0
  26. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_040_logging_code_portals/__init__.py +0 -0
  27. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_040_logging_code_portals/exception_processing_tracking.py +0 -0
  28. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_040_logging_code_portals/execution_environment_summary.py +0 -0
  29. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_040_logging_code_portals/kw_args.py +0 -0
  30. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_040_logging_code_portals/logging_decorator.py +0 -0
  31. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_040_logging_code_portals/logging_portal_core_classes.py +0 -0
  32. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_040_logging_code_portals/notebook_checker.py +0 -0
  33. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_040_logging_code_portals/output_capturer.py +0 -0
  34. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_040_logging_code_portals/uncaught_exceptions.py +0 -0
  35. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_050_safe_code_portals/__init__.py +0 -0
  36. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_050_safe_code_portals/safe_decorator.py +0 -0
  37. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_050_safe_code_portals/safe_portal_core_classes.py +0 -0
  38. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_060_autonomous_code_portals/__init__.py +0 -0
  39. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_060_autonomous_code_portals/autonomous_decorators.py +0 -0
  40. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_060_autonomous_code_portals/autonomous_portal_core_classes.py +0 -0
  41. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_060_autonomous_code_portals/names_usage_analyzer.py +0 -0
  42. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_070_protected_code_portals/GPU_guards.py +0 -0
  43. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_070_protected_code_portals/OK_const.py +0 -0
  44. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_070_protected_code_portals/RAM_guards.py +0 -0
  45. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_070_protected_code_portals/__init__.py +0 -0
  46. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_070_protected_code_portals/fn_arg_names_checker.py +0 -0
  47. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_070_protected_code_portals/list_flattener.py +0 -0
  48. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_070_protected_code_portals/package_manager.py +0 -0
  49. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_070_protected_code_portals/protected_decorators.py +0 -0
  50. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_070_protected_code_portals/protected_portal_core_classes.py +0 -0
  51. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_070_protected_code_portals/python_packages_guards.py +0 -0
  52. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_080_pure_code_portals/__init__.py +0 -0
  53. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_080_pure_code_portals/pure_core_classes.py +0 -0
  54. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_080_pure_code_portals/pure_decorator.py +0 -0
  55. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_090_swarming_portals/__init__.py +0 -0
  56. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_090_swarming_portals/output_suppressor.py +0 -0
  57. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_090_swarming_portals/swarming_portals.py +0 -0
  58. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_090_swarming_portals/system_utils.py +0 -0
  59. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_100_top_level_API/default_local_portal.py +0 -0
  60. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_800_signatures_and_converters/__init__.py +0 -0
  61. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_800_signatures_and_converters/base_16_32_convertors.py +0 -0
  62. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_800_signatures_and_converters/current_date_gmt_str.py +0 -0
  63. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_800_signatures_and_converters/hash_signatures.py +0 -0
  64. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_800_signatures_and_converters/node_signatures.py +0 -0
  65. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_800_signatures_and_converters/random_signatures.py +0 -0
  66. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_900_project_stats_collector/__init__.py +0 -0
  67. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_900_project_stats_collector/project_analyzer.py +0 -0
  68. {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pythagoras
3
- Version: 0.20.8
3
+ Version: 0.20.9
4
4
  Summary: Planet-scale distributed computing in Python.
5
5
  Keywords: cloud,ML,AI,serverless,distributed,parallel,machine-learning,deep-learning,pythagoras
6
6
  Author: Volodymyr (Vlad) Pavlov
@@ -61,7 +61,7 @@ data science, machine learning, and AI workflows.
61
61
  Pythagoras offers:
62
62
 
63
63
  * seamless parallel execution of Python code, locally or
64
- in diverse distributed environments of any scale;
64
+ in diverse distributed environments of virtually any scale;
65
65
  * ubiquitous caching for intermediate program states,
66
66
  with intelligent data and code change tracking;
67
67
  * simple and budget-friendly orchestration backend.
@@ -11,7 +11,7 @@ data science, machine learning, and AI workflows.
11
11
  Pythagoras offers:
12
12
 
13
13
  * seamless parallel execution of Python code, locally or
14
- in diverse distributed environments of any scale;
14
+ in diverse distributed environments of virtually any scale;
15
15
  * ubiquitous caching for intermediate program states,
16
16
  with intelligent data and code change tracking;
17
17
  * simple and budget-friendly orchestration backend.
@@ -4,7 +4,7 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "pythagoras"
7
- version = "0.20.8"
7
+ version = "0.20.9"
8
8
  authors = [
9
9
  {name = "Volodymyr (Vlad) Pavlov", email = "vlpavlov@ieee.org"},
10
10
  ]
@@ -0,0 +1,2 @@
1
+ from .top_level_API import *
2
+ from .default_local_portal import *
@@ -0,0 +1,30 @@
1
+ import os
2
+ from urllib.parse import urlparse
3
+
4
+ from .._090_swarming_portals import SwarmingPortal
5
+
6
+
7
+ def _is_valid_url(url: str) -> bool:
8
+ try:
9
+ result = urlparse(url)
10
+ return all([result.scheme, result.netloc])
11
+ except ValueError:
12
+ return False
13
+
14
+ def _is_valid_folder_name(path_str):
15
+ if os.path.isdir(path_str):
16
+ return True
17
+ try:
18
+ os.makedirs(path_str, exist_ok=True)
19
+ return True
20
+ except OSError:
21
+ return False
22
+
23
+ def get_portal(url_or_foldername:str) -> SwarmingPortal:
24
+ """Create a return a portal object based on a URL or a directory. """
25
+ if _is_valid_folder_name(url_or_foldername):
26
+ return SwarmingPortal(url_or_foldername)
27
+ elif _is_valid_url(url_or_foldername):
28
+ raise NotImplementedError("URLы not supported yet ... stay turned")
29
+ else:
30
+ raise ValueError(f"Invalid folder name: {url_or_foldername}")
@@ -1,4 +1,5 @@
1
1
  from .._030_data_portals import ready, get
2
2
  from .._060_autonomous_code_portals import autonomous
3
3
  from .._080_pure_code_portals import pure
4
- from .._090_swarming_portals import SwarmingPortal
4
+ from .._090_swarming_portals import SwarmingPortal
5
+ from .._100_top_level_API import get_portal
@@ -1,2 +0,0 @@
1
- from .top_level_API import *
2
- from .default_local_portal import instantiate_default_local_portal