fractal-task-tools 0.0.11__py3-none-any.whl → 0.0.13__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 fractal-task-tools might be problematic. Click here for more details.
- fractal_task_tools/__init__.py +1 -1
- fractal_task_tools/_args_schemas.py +37 -12
- {fractal_task_tools-0.0.11.dist-info → fractal_task_tools-0.0.13.dist-info}/METADATA +4 -3
- {fractal_task_tools-0.0.11.dist-info → fractal_task_tools-0.0.13.dist-info}/RECORD +8 -8
- {fractal_task_tools-0.0.11.dist-info → fractal_task_tools-0.0.13.dist-info}/WHEEL +1 -1
- {fractal_task_tools-0.0.11.dist-info → fractal_task_tools-0.0.13.dist-info}/entry_points.txt +0 -0
- {fractal_task_tools-0.0.11.dist-info → fractal_task_tools-0.0.13.dist-info}/licenses/LICENSE +0 -0
- {fractal_task_tools-0.0.11.dist-info → fractal_task_tools-0.0.13.dist-info}/top_level.txt +0 -0
fractal_task_tools/__init__.py
CHANGED
|
@@ -6,10 +6,8 @@ from typing import Any
|
|
|
6
6
|
from typing import Callable
|
|
7
7
|
from typing import Optional
|
|
8
8
|
|
|
9
|
+
import pydantic
|
|
9
10
|
from docstring_parser import parse as docparse
|
|
10
|
-
from pydantic._internal import _generate_schema
|
|
11
|
-
from pydantic._internal import _typing_extra
|
|
12
|
-
from pydantic._internal._config import ConfigWrapper
|
|
13
11
|
|
|
14
12
|
from ._descriptions import _get_class_attrs_descriptions
|
|
15
13
|
from ._descriptions import _get_function_args_descriptions
|
|
@@ -64,16 +62,43 @@ def _remove_attributes_from_descriptions(old_schema: _Schema) -> _Schema:
|
|
|
64
62
|
|
|
65
63
|
|
|
66
64
|
def _create_schema_for_function(function: Callable) -> _Schema:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
65
|
+
from packaging.version import parse
|
|
66
|
+
|
|
67
|
+
if parse(pydantic.__version__) >= parse("2.11.0"):
|
|
68
|
+
|
|
69
|
+
from pydantic.experimental.arguments_schema import (
|
|
70
|
+
generate_arguments_schema,
|
|
71
|
+
) # noqa
|
|
72
|
+
|
|
73
|
+
core_schema = generate_arguments_schema(
|
|
74
|
+
function,
|
|
75
|
+
schema_type="arguments",
|
|
76
|
+
)
|
|
77
|
+
elif parse(pydantic.__version__) >= parse("2.9.0"):
|
|
78
|
+
|
|
79
|
+
from pydantic._internal._config import ConfigWrapper # noqa
|
|
80
|
+
from pydantic._internal import _generate_schema # noqa
|
|
81
|
+
|
|
82
|
+
gen_core_schema = _generate_schema.GenerateSchema(
|
|
83
|
+
ConfigWrapper(None),
|
|
84
|
+
None,
|
|
85
|
+
)
|
|
86
|
+
core_schema = gen_core_schema.generate_schema(function)
|
|
87
|
+
core_schema = gen_core_schema.clean_schema(core_schema)
|
|
88
|
+
else:
|
|
89
|
+
from pydantic._internal._typing_extra import add_module_globals # noqa
|
|
90
|
+
from pydantic._internal import _generate_schema # noqa
|
|
91
|
+
from pydantic._internal._config import ConfigWrapper # noqa
|
|
92
|
+
|
|
93
|
+
namespace = add_module_globals(function, None)
|
|
94
|
+
gen_core_schema = _generate_schema.GenerateSchema(
|
|
95
|
+
ConfigWrapper(None), namespace
|
|
96
|
+
)
|
|
97
|
+
core_schema = gen_core_schema.generate_schema(function)
|
|
98
|
+
core_schema = gen_core_schema.clean_schema(core_schema)
|
|
99
|
+
|
|
73
100
|
gen_json_schema = CustomGenerateJsonSchema()
|
|
74
|
-
json_schema = gen_json_schema.generate(
|
|
75
|
-
clean_core_schema, mode="validation"
|
|
76
|
-
)
|
|
101
|
+
json_schema = gen_json_schema.generate(core_schema, mode="validation")
|
|
77
102
|
return json_schema
|
|
78
103
|
|
|
79
104
|
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fractal-task-tools
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.13
|
|
4
4
|
Summary: Shared tools for Fractal tasks
|
|
5
5
|
Author-email: Tommaso Comparin <tommaso.comparin@exact-lab.it>
|
|
6
6
|
License: BSD-3-Clause
|
|
7
7
|
Project-URL: homepage, https://github.com/fractal-analytics-platform/fractal-task-tools
|
|
8
8
|
Project-URL: repository, https://github.com/fractal-analytics-platform/fractal-task-tools
|
|
9
9
|
Project-URL: changelog, https://github.com/fractal-analytics-platform/fractal-task-tools/blob/main/CHANGELOG.md
|
|
10
|
-
Requires-Python: <3.
|
|
10
|
+
Requires-Python: <3.14,>=3.10
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
License-File: LICENSE
|
|
13
|
-
Requires-Dist: pydantic<=2.
|
|
13
|
+
Requires-Dist: pydantic<=2.11.7,>=2.0.0
|
|
14
14
|
Requires-Dist: docstring-parser<=0.16,>=0.15
|
|
15
|
+
Requires-Dist: packaging
|
|
15
16
|
Provides-Extra: dev
|
|
16
17
|
Requires-Dist: bumpver==2024.1130; extra == "dev"
|
|
17
18
|
Requires-Dist: devtools==0.12.2; extra == "dev"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
fractal_task_tools/__init__.py,sha256=
|
|
2
|
-
fractal_task_tools/_args_schemas.py,sha256=
|
|
1
|
+
fractal_task_tools/__init__.py,sha256=d38l6QAX81NKMZH36oT3OjrbTySBP8TNLhTnGMWpeWc,80
|
|
2
|
+
fractal_task_tools/_args_schemas.py,sha256=8n4OH3judg4FsOSsl-pTa9uN2VOysSrYnkj9IOFFCCk,8681
|
|
3
3
|
fractal_task_tools/_cli.py,sha256=ARy3PWjAr92hBk0ZHnFIEAqTskipBIaLRW6COTJ4X-k,2936
|
|
4
4
|
fractal_task_tools/_cli_tools.py,sha256=6G7zXvL6o5t7n4HvVAqP6an0o7qx5fEau5KjtoDXFuc,2622
|
|
5
5
|
fractal_task_tools/_create_manifest.py,sha256=aPolxXH5Ug1xh_g5acuEF_GdMCYWApZnrb_N8gA3sqg,5796
|
|
@@ -13,9 +13,9 @@ fractal_task_tools/_task_docs.py,sha256=aEXozSKf3a7weOwJMHyTVJTvHlCKgDr1qoU-AAO3
|
|
|
13
13
|
fractal_task_tools/_titles.py,sha256=GLWn-06fgQD6qzOM75H59EV0MMCXc8jVpHqGanYzNbw,3000
|
|
14
14
|
fractal_task_tools/task_models.py,sha256=4qBDUAoqIgdfAV-7CKkVO5--Y_2Y6CflNVMIiwJxn9g,4177
|
|
15
15
|
fractal_task_tools/task_wrapper.py,sha256=dhphKgxDm4EUxZnsrAy20hJPD6bGdqx7tNg9N_QzlCo,1878
|
|
16
|
-
fractal_task_tools-0.0.
|
|
17
|
-
fractal_task_tools-0.0.
|
|
18
|
-
fractal_task_tools-0.0.
|
|
19
|
-
fractal_task_tools-0.0.
|
|
20
|
-
fractal_task_tools-0.0.
|
|
21
|
-
fractal_task_tools-0.0.
|
|
16
|
+
fractal_task_tools-0.0.13.dist-info/licenses/LICENSE,sha256=1SGAsQ3Jm_nIU7c2TgtTZe_IOKjm9BDsrcf2r98xrdk,1584
|
|
17
|
+
fractal_task_tools-0.0.13.dist-info/METADATA,sha256=2MhXVd46Ilf_yX6pkWPN2otoUBfK5rMud_3svrzoVuc,4742
|
|
18
|
+
fractal_task_tools-0.0.13.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
19
|
+
fractal_task_tools-0.0.13.dist-info/entry_points.txt,sha256=zE4qv7QhuiqN6DaPkmJV18X1xyYoUi0HIJ-uAg2M6TU,66
|
|
20
|
+
fractal_task_tools-0.0.13.dist-info/top_level.txt,sha256=2VBpiMDIBMJGOEPiHHX3njYEZGLhr4L0nu8vfkcNVzw,19
|
|
21
|
+
fractal_task_tools-0.0.13.dist-info/RECORD,,
|
{fractal_task_tools-0.0.11.dist-info → fractal_task_tools-0.0.13.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{fractal_task_tools-0.0.11.dist-info → fractal_task_tools-0.0.13.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|