fractal-task-tools 0.0.4__py3-none-any.whl → 0.0.5__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.

@@ -2,4 +2,4 @@ import logging
2
2
 
3
3
  logging.basicConfig(level=logging.INFO)
4
4
 
5
- __VERSION__ = "0.0.4"
5
+ __VERSION__ = "0.0.5"
@@ -2,13 +2,12 @@ from typing import Any
2
2
  from typing import Optional
3
3
 
4
4
  from pydantic import BaseModel
5
+ from pydantic import ConfigDict
5
6
  from pydantic import Field
6
7
 
7
8
 
8
9
  class _BaseTask(BaseModel):
9
- class Config:
10
- arbitrary_types_allowed = True
11
- extra = "forbid"
10
+ model_config = ConfigDict(extra="forbid", arbitrary_types_allowed=True)
12
11
 
13
12
  name: str
14
13
  executable: str
@@ -12,16 +12,14 @@ from typing import Optional
12
12
  class TaskParameterEncoder(JSONEncoder):
13
13
  """
14
14
  Custom JSONEncoder that transforms Path objects to strings.
15
+
16
+ Ref https://docs.python.org/3/library/json.html
15
17
  """
16
18
 
17
- def default(self, value):
18
- """
19
- Subclass implementation of `default`, to serialize Path objects as
20
- strings.
21
- """
22
- if isinstance(value, Path):
23
- return value.as_posix()
24
- return JSONEncoder.default(self, value)
19
+ def default(self, obj):
20
+ if isinstance(obj, Path):
21
+ return obj.as_posix()
22
+ return super().default(obj)
25
23
 
26
24
 
27
25
  def run_fractal_task(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: fractal-task-tools
3
- Version: 0.0.4
3
+ Version: 0.0.5
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
@@ -1,4 +1,4 @@
1
- fractal_task_tools/__init__.py,sha256=uWJsphgKkHSVpBiZcVd3e8XP9NZ9RA5QAbsJOjThLJ8,79
1
+ fractal_task_tools/__init__.py,sha256=MnFTaW45JfhnCV-zkWHY7mQ_mXPAF8ISIYUTznGWs2M,79
2
2
  fractal_task_tools/_args_schemas.py,sha256=Ka5IAAEdC7xg03ZHMl5jFbv4Sk8JR1QKbxFl7soevlQ,7829
3
3
  fractal_task_tools/_cli.py,sha256=6x2wWG6cFTw0m8HsxLmeboT3AMNf7ofhAI2kWEZMkx8,1849
4
4
  fractal_task_tools/_create_manifest.py,sha256=DTl1gV4XvQy_ArOAOSUzKLcTHYuE_un94dBvpfdkeeI,6922
@@ -8,11 +8,11 @@ fractal_task_tools/_pydantic_generatejsonschema.py,sha256=qZuID7YUXOdAcL8OqsWjNF
8
8
  fractal_task_tools/_signature_constraints.py,sha256=RzJwoL-NMD0HXEACR4_4aD8OOc59lxqEreT7oTc6xJo,3188
9
9
  fractal_task_tools/_task_docs.py,sha256=aEXozSKf3a7weOwJMHyTVJTvHlCKgDr1qoU-AAO3bZI,3401
10
10
  fractal_task_tools/_titles.py,sha256=GLWn-06fgQD6qzOM75H59EV0MMCXc8jVpHqGanYzNbw,3000
11
- fractal_task_tools/task_models.py,sha256=xTbdk3lf6T70o8idEWw-bdjA2dDz0KDIrBjdoh_A9Lc,2243
12
- fractal_task_tools/task_wrapper.py,sha256=IO2wyD1ph23V_xPNGnjtXewuJ4TOGzq3U4KBlEzB4to,1959
13
- fractal_task_tools-0.0.4.dist-info/LICENSE,sha256=1SGAsQ3Jm_nIU7c2TgtTZe_IOKjm9BDsrcf2r98xrdk,1584
14
- fractal_task_tools-0.0.4.dist-info/METADATA,sha256=6jYc6G00qJU60AFxYD9kxkBLWpCsDWB03JNvcFeVJGE,4212
15
- fractal_task_tools-0.0.4.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
16
- fractal_task_tools-0.0.4.dist-info/entry_points.txt,sha256=zE4qv7QhuiqN6DaPkmJV18X1xyYoUi0HIJ-uAg2M6TU,66
17
- fractal_task_tools-0.0.4.dist-info/top_level.txt,sha256=2VBpiMDIBMJGOEPiHHX3njYEZGLhr4L0nu8vfkcNVzw,19
18
- fractal_task_tools-0.0.4.dist-info/RECORD,,
11
+ fractal_task_tools/task_models.py,sha256=kgvEv5NQD8e8I9tyaFrnvxUxbKm6vH63r-cnID1jHE8,2269
12
+ fractal_task_tools/task_wrapper.py,sha256=dhphKgxDm4EUxZnsrAy20hJPD6bGdqx7tNg9N_QzlCo,1878
13
+ fractal_task_tools-0.0.5.dist-info/LICENSE,sha256=1SGAsQ3Jm_nIU7c2TgtTZe_IOKjm9BDsrcf2r98xrdk,1584
14
+ fractal_task_tools-0.0.5.dist-info/METADATA,sha256=rlEyaK2tRYJxgoVaFyCdAbs0TNhk3t2s6c75z9Utj0o,4212
15
+ fractal_task_tools-0.0.5.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
16
+ fractal_task_tools-0.0.5.dist-info/entry_points.txt,sha256=zE4qv7QhuiqN6DaPkmJV18X1xyYoUi0HIJ-uAg2M6TU,66
17
+ fractal_task_tools-0.0.5.dist-info/top_level.txt,sha256=2VBpiMDIBMJGOEPiHHX3njYEZGLhr4L0nu8vfkcNVzw,19
18
+ fractal_task_tools-0.0.5.dist-info/RECORD,,