tinyfan 0.2.5__tar.gz → 0.2.7__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.
- {tinyfan-0.2.5 → tinyfan-0.2.7}/PKG-INFO +1 -1
- {tinyfan-0.2.5 → tinyfan-0.2.7}/pyproject.toml +1 -1
- {tinyfan-0.2.5 → tinyfan-0.2.7}/src/tinyfan/codegen.py +28 -8
- {tinyfan-0.2.5 → tinyfan-0.2.7}/src/tinyfan/flow.py +1 -1
- {tinyfan-0.2.5 → tinyfan-0.2.7}/uv.lock +1 -1
- {tinyfan-0.2.5 → tinyfan-0.2.7}/.github/workflows/publish.yml +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/.gitignore +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/.python-version +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/README.md +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/examples/README.md +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/examples/configmap.yaml +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/examples/configs.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/examples/getting-started.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/examples/packaged/.python-version +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/examples/packaged/Dockerfile +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/examples/packaged/README.md +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/examples/packaged/pyproject.toml +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/examples/packaged/src/tinyfan_examples_packaged/__init__.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/examples/packaged/src/tinyfan_examples_packaged/asset.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/examples/resource.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/examples/secret.yaml +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/src/tinyfan/__init__.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/src/tinyfan/argo_typing.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/src/tinyfan/cli.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/src/tinyfan/config.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/src/tinyfan/dagviz.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/src/tinyfan/flowrundata.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/src/tinyfan/py.typed +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/src/tinyfan/resources/__init__.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/src/tinyfan/resources/base.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/src/tinyfan/stores/__init__.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/src/tinyfan/stores/base.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/src/tinyfan/stores/bigquery.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/src/tinyfan/stores/gcs_pickle.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/src/tinyfan/stores/naive.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/src/tinyfan/utils/__init__.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/src/tinyfan/utils/embed.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/src/tinyfan/utils/exjson.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/src/tinyfan/utils/merge.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/src/tinyfan/utils/typing.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/src/tinyfan/utils/yaml.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/tests/__init__.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/tests/codegen_samples/directory/__init__.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/tests/codegen_samples/directory/asset.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/tests/codegen_samples/directory/asset2.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/tests/codegen_samples/singlefile.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/tests/conftest.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/tests/helpers.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/tests/openapi2jsonschema.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/tests/test_codegen.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/tests/test_config.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/tests/test_decorators.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/tests/utils/__init__.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/tests/utils/embed_samples/directory/__init__.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/tests/utils/embed_samples/directory/dep.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/tests/utils/embed_samples/singlefile.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/tests/utils/test_embed.py +0 -0
- {tinyfan-0.2.5 → tinyfan-0.2.7}/tests/utils/test_exjson.py +0 -0
|
@@ -66,6 +66,10 @@ def import_all_submodules(location: str):
|
|
|
66
66
|
importlib.import_module(name)
|
|
67
67
|
|
|
68
68
|
|
|
69
|
+
def assetname2template(name: str):
|
|
70
|
+
return name.replace("_", "-")
|
|
71
|
+
|
|
72
|
+
|
|
69
73
|
class AssetNode:
|
|
70
74
|
asset: Asset
|
|
71
75
|
refs: list[Config | ConfigValue | str | None]
|
|
@@ -106,7 +110,8 @@ class AssetNode:
|
|
|
106
110
|
DATETIME_ANNOTATION: "{{workflow.scheduledTime}}",
|
|
107
111
|
},
|
|
108
112
|
"parents": {
|
|
109
|
-
p.asset.name: "{{tasks.%s.outputs.parameters.rundata}}" % p.asset.name
|
|
113
|
+
p.asset.name: "{{tasks.%s.outputs.parameters.rundata}}" % p.asset.name.replace("_", "-")
|
|
114
|
+
for p in self.parents
|
|
110
115
|
},
|
|
111
116
|
"asset_name": self.asset.name,
|
|
112
117
|
"flow_name": self.asset.flow.name,
|
|
@@ -224,12 +229,11 @@ class AssetTree:
|
|
|
224
229
|
root_location = get_root_path(list(self.nodes.values())[0].asset.func)
|
|
225
230
|
source += embed(root_location)
|
|
226
231
|
if not root_location.endswith(".py"):
|
|
227
|
-
source += "
|
|
232
|
+
source += """{{=join(map(fromJSON(inputs.parameters.moduledata), {"from " + .module + " import " + .name}), "\\n")}}\n"""
|
|
228
233
|
source += "asset = {{inputs.parameters.asset_name}}.asset\n"
|
|
229
234
|
else:
|
|
230
235
|
source = (
|
|
231
|
-
"
|
|
232
|
-
" import {{inputs.parameters.asset_name}}\n"
|
|
236
|
+
"""{{=join(map(fromJSON(inputs.parameters.moduledata), {"from " + .module + " import " + .name}), "\\n")}}\n"""
|
|
233
237
|
"asset = {{inputs.parameters.asset_name}}.asset\n"
|
|
234
238
|
)
|
|
235
239
|
source += (
|
|
@@ -347,7 +351,9 @@ class AssetTree:
|
|
|
347
351
|
]
|
|
348
352
|
}
|
|
349
353
|
),
|
|
350
|
-
"synchronization": {
|
|
354
|
+
"synchronization": {
|
|
355
|
+
"mutexes": [{"name": f"{self.flow.name}-{node.asset.name.replace('_', '-')}"}]
|
|
356
|
+
},
|
|
351
357
|
"inputs": {
|
|
352
358
|
"parameters": [
|
|
353
359
|
{
|
|
@@ -359,7 +365,7 @@ class AssetTree:
|
|
|
359
365
|
"value": "{{= nil }}",
|
|
360
366
|
},
|
|
361
367
|
{
|
|
362
|
-
"name": "
|
|
368
|
+
"name": "moduledata",
|
|
363
369
|
"value": "{{= nil }}",
|
|
364
370
|
},
|
|
365
371
|
]
|
|
@@ -399,8 +405,22 @@ class AssetTree:
|
|
|
399
405
|
"value": node.asset.name,
|
|
400
406
|
},
|
|
401
407
|
{
|
|
402
|
-
"name": "
|
|
403
|
-
"value":
|
|
408
|
+
"name": "moduledata",
|
|
409
|
+
"value": json.dumps(
|
|
410
|
+
[
|
|
411
|
+
{
|
|
412
|
+
"module": node.asset_module_name(),
|
|
413
|
+
"name": node.asset.name,
|
|
414
|
+
},
|
|
415
|
+
*(
|
|
416
|
+
{
|
|
417
|
+
"module": p.asset_module_name(),
|
|
418
|
+
"name": p.asset.name,
|
|
419
|
+
}
|
|
420
|
+
for p in node.parents
|
|
421
|
+
),
|
|
422
|
+
]
|
|
423
|
+
),
|
|
404
424
|
},
|
|
405
425
|
]
|
|
406
426
|
},
|
|
@@ -81,7 +81,7 @@ class Asset(Generic[Ret, UMeta, StoreIdx]):
|
|
|
81
81
|
for name, prundata in parent_flowrundatas.items():
|
|
82
82
|
parent = self.flow.assets[name]
|
|
83
83
|
index = prundata.get("store_entry_idx", None)
|
|
84
|
-
data = parent.store.retrieve(index, source_rundata=prundata, target_rundata=rundata)
|
|
84
|
+
data = index and parent.store.retrieve(index, source_rundata=prundata, target_rundata=rundata)
|
|
85
85
|
if name in func_param_names:
|
|
86
86
|
params[name] = data
|
|
87
87
|
ret = self.func(**params)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|