pythagoras 0.20.52__py3-none-any.whl → 0.21.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.
- pythagoras/_020_ordinary_code_portals/code_normalizer.py +11 -3
- pythagoras/_020_ordinary_code_portals/ordinary_portal_core_classes.py +9 -6
- pythagoras/_030_data_portals/__init__.py +2 -2
- pythagoras/_030_data_portals/data_portal_core_classes.py +70 -56
- pythagoras/_040_logging_code_portals/kw_args.py +9 -5
- pythagoras/_040_logging_code_portals/logging_portal_core_classes.py +15 -16
- pythagoras/_060_autonomous_code_portals/autonomous_portal_core_classes.py +46 -28
- pythagoras/_070_protected_code_portals/GPU_pre_validators.py +0 -0
- pythagoras/_070_protected_code_portals/RAM_pre_validators.py +58 -0
- pythagoras/_070_protected_code_portals/__init__.py +4 -3
- pythagoras/_070_protected_code_portals/fn_arg_names_checker.py +3 -2
- pythagoras/_070_protected_code_portals/protected_decorators.py +13 -12
- pythagoras/_070_protected_code_portals/protected_portal_core_classes.py +95 -78
- pythagoras/{_090_swarming_portals → _070_protected_code_portals}/system_utils.py +29 -1
- pythagoras/_070_protected_code_portals/validator_fn_classes.py +95 -0
- pythagoras/_080_pure_code_portals/pure_core_classes.py +16 -18
- pythagoras/_080_pure_code_portals/pure_decorator.py +12 -12
- pythagoras/_090_swarming_portals/swarming_portals.py +4 -10
- pythagoras/__init__.py +14 -14
- {pythagoras-0.20.52.dist-info → pythagoras-0.21.0.dist-info}/METADATA +2 -1
- {pythagoras-0.20.52.dist-info → pythagoras-0.21.0.dist-info}/RECORD +23 -22
- {pythagoras-0.20.52.dist-info → pythagoras-0.21.0.dist-info}/WHEEL +1 -1
- pythagoras/_070_protected_code_portals/GPU_guards.py +0 -2
- pythagoras/_070_protected_code_portals/RAM_guards.py +0 -33
- /pythagoras/_070_protected_code_portals/{python_packages_guards.py → python_packages_pre_validators.py} +0 -0
|
@@ -7,20 +7,20 @@ pythagoras/_010_basic_portals/not_picklable_class.py,sha256=2f7405a32c530a68fae6
|
|
|
7
7
|
pythagoras/_010_basic_portals/portal_tester.py,sha256=cefdbf60bfc7697934ef8fd653303ac5295014884af780351baf84d859ec6de0,1817
|
|
8
8
|
pythagoras/_010_basic_portals/post_init_metaclass.py,sha256=6dbe6856e4e46627bc0ae64d4220274b1147d4d2a74f6440f2454f8a93485c7e,583
|
|
9
9
|
pythagoras/_020_ordinary_code_portals/__init__.py,sha256=a77912a9a4188f4c65864f41c29b45800d5449d4db7c790007943d307f80348d,1295
|
|
10
|
-
pythagoras/_020_ordinary_code_portals/code_normalizer.py,sha256=
|
|
10
|
+
pythagoras/_020_ordinary_code_portals/code_normalizer.py,sha256=ecbdcfe40699292f483eaac812fe5425cdc71c33f8f1fc3a1064165d973142d3,5004
|
|
11
11
|
pythagoras/_020_ordinary_code_portals/function_processing.py,sha256=ae5841d1da5a533b6fe92336c2551d6947444dc576a55508098b9f56b40245c7,3623
|
|
12
12
|
pythagoras/_020_ordinary_code_portals/ordinary_decorator.py,sha256=278ab1d37344120a585af8380fc52400bd0f76d02ddac43230dd68a7a2cc16c0,1028
|
|
13
|
-
pythagoras/_020_ordinary_code_portals/ordinary_portal_core_classes.py,sha256=
|
|
14
|
-
pythagoras/_030_data_portals/__init__.py,sha256=
|
|
15
|
-
pythagoras/_030_data_portals/data_portal_core_classes.py,sha256=
|
|
13
|
+
pythagoras/_020_ordinary_code_portals/ordinary_portal_core_classes.py,sha256=ff3ce5d740f6e19a32a4d1f3d516d825a50a53d53a8c483f388e008d69062838,9752
|
|
14
|
+
pythagoras/_030_data_portals/__init__.py,sha256=e7265c2dc7d6e8ceb0ae6057c086ec23417219e943360d6635018ff64532c6b4,1245
|
|
15
|
+
pythagoras/_030_data_portals/data_portal_core_classes.py,sha256=7f4b43c86ba167edb18ec16d2d2d5eac2dd23b4821ff6297fc037ef37d764a8d,20385
|
|
16
16
|
pythagoras/_030_data_portals/ready_and_get.py,sha256=d87d16a6747239f4ed6c30c2be95eab9ae58bc5b2742f0fd924fd2a3ace71382,1571
|
|
17
17
|
pythagoras/_030_data_portals/storable_decorator.py,sha256=97c5b71a156622c7208e80931aaded99d7a12860cb2159c56d333e196fb51b88,578
|
|
18
18
|
pythagoras/_040_logging_code_portals/__init__.py,sha256=62ff68021e955c0a96ddd89168a3db25a8f20b3384d5e1ca10df7d9a24c96837,1251
|
|
19
19
|
pythagoras/_040_logging_code_portals/exception_processing_tracking.py,sha256=cb280c8390d66e0da2b698f407160573ca1ce49a96c10b7f1f2463a120ebe192,612
|
|
20
20
|
pythagoras/_040_logging_code_portals/execution_environment_summary.py,sha256=853bd36da75802d8ac6781fcaeafa7fe1b0a3c24b7f23b12cfc970fc0d4322a6,2268
|
|
21
|
-
pythagoras/_040_logging_code_portals/kw_args.py,sha256=
|
|
21
|
+
pythagoras/_040_logging_code_portals/kw_args.py,sha256=8523b445ff1123cb9880147ab2849d7ee8e882a277e697fb33b8d81d2f75445f,2605
|
|
22
22
|
pythagoras/_040_logging_code_portals/logging_decorator.py,sha256=d3bf70dbf6791e15c52eb8325d07a48ee39bcbd09d5201541916d14f9969ba35,891
|
|
23
|
-
pythagoras/_040_logging_code_portals/logging_portal_core_classes.py,sha256=
|
|
23
|
+
pythagoras/_040_logging_code_portals/logging_portal_core_classes.py,sha256=76171d0adb83223dcc26bad99af36cd5f539c23e311062f2ec6c8cc3eb35198b,21868
|
|
24
24
|
pythagoras/_040_logging_code_portals/notebook_checker.py,sha256=e654090c80f38512114a65f54fcf2701110c10ca030c57f438829cbd3a678739,541
|
|
25
25
|
pythagoras/_040_logging_code_portals/output_capturer.py,sha256=a210a9eaaab12fb22e2467e716e088823e4e7381e60bc73bb99184feecd69199,4216
|
|
26
26
|
pythagoras/_040_logging_code_portals/uncaught_exceptions.py,sha256=0776cfbd7e679c9271e098cb486765d715ce054da9aa8dc23fe32898901f5da1,3121
|
|
@@ -29,25 +29,26 @@ pythagoras/_050_safe_code_portals/safe_decorator.py,sha256=085bb05724d02a3ff4f51
|
|
|
29
29
|
pythagoras/_050_safe_code_portals/safe_portal_core_classes.py,sha256=bb37bd2515f7982829308265951e4576aed11517b1c8c76de75ef726f96c3ea4,1808
|
|
30
30
|
pythagoras/_060_autonomous_code_portals/__init__.py,sha256=6c19fffb24a93aef9587f0abe9ef24732ef5971c94e9a0fa2c36f4d7a3664e35,2232
|
|
31
31
|
pythagoras/_060_autonomous_code_portals/autonomous_decorators.py,sha256=c315b37cbc30e3929f18e29bda409aad39b6d5d840dcdb8b70c737817d346af6,3947
|
|
32
|
-
pythagoras/_060_autonomous_code_portals/autonomous_portal_core_classes.py,sha256=
|
|
32
|
+
pythagoras/_060_autonomous_code_portals/autonomous_portal_core_classes.py,sha256=c655406ca62ad82632bf3cae7f0b41670e6b8ca8e5f081c4c3c494f074755fb7,5342
|
|
33
33
|
pythagoras/_060_autonomous_code_portals/names_usage_analyzer.py,sha256=1e0e84854ac630b204878fecde48a16739fd2663709fcee2ec0a8844f4fd4f13,7470
|
|
34
|
-
pythagoras/_070_protected_code_portals/
|
|
34
|
+
pythagoras/_070_protected_code_portals/GPU_pre_validators.py,sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855,0
|
|
35
35
|
pythagoras/_070_protected_code_portals/OK_const.py,sha256=17ea314496f44b422f9936585c3bb3749c960bc779b4f74962ec04e3fa4d2494,186
|
|
36
|
-
pythagoras/_070_protected_code_portals/
|
|
37
|
-
pythagoras/_070_protected_code_portals/__init__.py,sha256=
|
|
38
|
-
pythagoras/_070_protected_code_portals/fn_arg_names_checker.py,sha256=
|
|
36
|
+
pythagoras/_070_protected_code_portals/RAM_pre_validators.py,sha256=7d7df50788326b5d3ba4fbe0d031ba8975eb06aeb7d971ba531888d7d40846cb,1756
|
|
37
|
+
pythagoras/_070_protected_code_portals/__init__.py,sha256=4bb7fc29f18fc5018388f6f0c0f4ec66c29185f9e1396f9d106cc8c14ad61fc4,247
|
|
38
|
+
pythagoras/_070_protected_code_portals/fn_arg_names_checker.py,sha256=e858ce5099868030a39057177f93a893e13d7a210582e6ab636aaaccec898fb0,1230
|
|
39
39
|
pythagoras/_070_protected_code_portals/list_flattener.py,sha256=9a54b512ad9dc201db348e7908f5ca5f36d171ae3da433511d38023a6ba8d4b5,331
|
|
40
40
|
pythagoras/_070_protected_code_portals/package_manager.py,sha256=30adf8d75f55b9b2c587dc95f4aa1c2154fa9354d668af6f0d586bb42f0d5b17,2008
|
|
41
|
-
pythagoras/_070_protected_code_portals/protected_decorators.py,sha256=
|
|
42
|
-
pythagoras/_070_protected_code_portals/protected_portal_core_classes.py,sha256=
|
|
43
|
-
pythagoras/_070_protected_code_portals/
|
|
41
|
+
pythagoras/_070_protected_code_portals/protected_decorators.py,sha256=17459a1ad08e3e95f314636e670bce1dcc992631e38d1c08c5e55f3ee1459c2c,1613
|
|
42
|
+
pythagoras/_070_protected_code_portals/protected_portal_core_classes.py,sha256=899cf52300deec302c96c6d240651115957f714760e7169640206684bc6a854b,8057
|
|
43
|
+
pythagoras/_070_protected_code_portals/python_packages_pre_validators.py,sha256=a4ff97c250cbc94ad379edcab510fe10d4d590de9733bbff437bed71c025cecb,1025
|
|
44
|
+
pythagoras/_070_protected_code_portals/system_utils.py,sha256=dc584ffaca353ce23eff9f82bc2ccf19df667ced10996bda922a07298442d193,2363
|
|
45
|
+
pythagoras/_070_protected_code_portals/validator_fn_classes.py,sha256=4afa4bf0629f68e4b1623003272ffd7111ac9cbb739e81fde601049d19b84269,3232
|
|
44
46
|
pythagoras/_080_pure_code_portals/__init__.py,sha256=8ed33435bb03d96675537fc6a696625332f971698d56c6b22b5ca1bc9d1b4274,1856
|
|
45
|
-
pythagoras/_080_pure_code_portals/pure_core_classes.py,sha256=
|
|
46
|
-
pythagoras/_080_pure_code_portals/pure_decorator.py,sha256=
|
|
47
|
+
pythagoras/_080_pure_code_portals/pure_core_classes.py,sha256=503f4d97e2cfa2053572a71ad44dd647b1e13e2f204aff0838b69a21a124e016,18960
|
|
48
|
+
pythagoras/_080_pure_code_portals/pure_decorator.py,sha256=fd7acf43f2735146a4195d2a29d22e545f57b922489cd3baea7d9e4b5b88b5ae,1373
|
|
47
49
|
pythagoras/_090_swarming_portals/__init__.py,sha256=7041578f84ffa291f2752c7a2168007b9113f99482f0173f3729171b3bff551a,32
|
|
48
50
|
pythagoras/_090_swarming_portals/output_suppressor.py,sha256=83e6cc9bcc62a226babb1165912ef5095ea948499ce5136a7516ac8b54522607,626
|
|
49
|
-
pythagoras/_090_swarming_portals/swarming_portals.py,sha256=
|
|
50
|
-
pythagoras/_090_swarming_portals/system_utils.py,sha256=d125a0b705b9f8477712179c49441daaf2cd2b0b0d4494b6ac977b2df87b50b5,1370
|
|
51
|
+
pythagoras/_090_swarming_portals/swarming_portals.py,sha256=9c8fd9fa737508c90eea29bf03fe596ef3181596ea0c07a3485711b173962655,11584
|
|
51
52
|
pythagoras/_100_top_level_API/__init__.py,sha256=b392edc2c918da7c2444f14accfd0fac2cd0d5cf6849c64ed2433dfdb58b8b75,64
|
|
52
53
|
pythagoras/_100_top_level_API/default_local_portal.py,sha256=cfbe20499fed2f038b507b44fb58bb4cb6ea2fbe2fe93a3ab5ad7f3ac655005f,215
|
|
53
54
|
pythagoras/_100_top_level_API/top_level_API.py,sha256=4b63575b86df2fdf28e93c67e8d33411e05bd67cf016d3d297ec9635ebc04081,906
|
|
@@ -59,8 +60,8 @@ pythagoras/_800_signatures_and_converters/node_signatures.py,sha256=2de43f2cc4c3
|
|
|
59
60
|
pythagoras/_800_signatures_and_converters/random_signatures.py,sha256=c174f28c04ccf08c0c5eadaf1e1a00aba4fec88ec370def64afcadd39123141a,323
|
|
60
61
|
pythagoras/_900_project_stats_collector/__init__.py,sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855,0
|
|
61
62
|
pythagoras/_900_project_stats_collector/project_analyzer.py,sha256=d06e9d7b516cb7424ef777e70abe9d5220e09b0b19476326b8974b4dc3917f89,3506
|
|
62
|
-
pythagoras/__init__.py,sha256=
|
|
63
|
+
pythagoras/__init__.py,sha256=13b5aaf4128704dea052fc03a3a3488f1b14c3638dec45a9a29c74a4fbed7e24,1089
|
|
63
64
|
pythagoras/core/__init__.py,sha256=a6c3ec6f7d3e69221be505fd344061b774b0eb5c2f18431f39abb9426cb5d0cc,233
|
|
64
|
-
pythagoras-0.
|
|
65
|
-
pythagoras-0.
|
|
66
|
-
pythagoras-0.
|
|
65
|
+
pythagoras-0.21.0.dist-info/WHEEL,sha256=607c46fee47e440c91332c738096ff0f5e54ca3b0818ee85462dd5172a38e793,79
|
|
66
|
+
pythagoras-0.21.0.dist-info/METADATA,sha256=bba6bfba66b2a354786f2d914cd845130f9af11819ec872a3c910ab6e58025fc,4241
|
|
67
|
+
pythagoras-0.21.0.dist-info/RECORD,,
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
from .._060_autonomous_code_portals import AutonomousFn, autonomous
|
|
2
|
-
from .OK_const import OK
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
def free_ram_bytes(packed_kwargs, fn_addr, required_memory):
|
|
6
|
-
import psutil
|
|
7
|
-
mem_info = psutil.virtual_memory()
|
|
8
|
-
if mem_info.available >= required_memory:
|
|
9
|
-
return OK
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
def RAM_K(limit:int) -> AutonomousFn:
|
|
13
|
-
global free_ram_bytes
|
|
14
|
-
if not isinstance(free_ram_bytes, AutonomousFn):
|
|
15
|
-
free_ram_bytes = autonomous()(free_ram_bytes)
|
|
16
|
-
limit = int(limit/1024)
|
|
17
|
-
assert limit > 0
|
|
18
|
-
return free_ram_bytes.fix_kwargs(required_memory = limit)
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
def RAM_M(limit:int) -> AutonomousFn:
|
|
22
|
-
limit = int(limit/1024)
|
|
23
|
-
return RAM_K(limit)
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
def RAM_G(limit:int) -> AutonomousFn:
|
|
27
|
-
limit = int(limit/1024)
|
|
28
|
-
return RAM_M(limit)
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
def RAM_T(limit:int) -> AutonomousFn:
|
|
32
|
-
limit = int(limit/1024)
|
|
33
|
-
return RAM_G(limit)
|
|
File without changes
|