tinyfan 0.2.6__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.
Files changed (58) hide show
  1. {tinyfan-0.2.6 → tinyfan-0.2.7}/PKG-INFO +1 -1
  2. {tinyfan-0.2.6 → tinyfan-0.2.7}/pyproject.toml +1 -1
  3. {tinyfan-0.2.6 → tinyfan-0.2.7}/src/tinyfan/codegen.py +19 -6
  4. {tinyfan-0.2.6 → tinyfan-0.2.7}/src/tinyfan/flow.py +1 -1
  5. {tinyfan-0.2.6 → tinyfan-0.2.7}/uv.lock +1 -1
  6. {tinyfan-0.2.6 → tinyfan-0.2.7}/.github/workflows/publish.yml +0 -0
  7. {tinyfan-0.2.6 → tinyfan-0.2.7}/.gitignore +0 -0
  8. {tinyfan-0.2.6 → tinyfan-0.2.7}/.python-version +0 -0
  9. {tinyfan-0.2.6 → tinyfan-0.2.7}/README.md +0 -0
  10. {tinyfan-0.2.6 → tinyfan-0.2.7}/examples/README.md +0 -0
  11. {tinyfan-0.2.6 → tinyfan-0.2.7}/examples/configmap.yaml +0 -0
  12. {tinyfan-0.2.6 → tinyfan-0.2.7}/examples/configs.py +0 -0
  13. {tinyfan-0.2.6 → tinyfan-0.2.7}/examples/getting-started.py +0 -0
  14. {tinyfan-0.2.6 → tinyfan-0.2.7}/examples/packaged/.python-version +0 -0
  15. {tinyfan-0.2.6 → tinyfan-0.2.7}/examples/packaged/Dockerfile +0 -0
  16. {tinyfan-0.2.6 → tinyfan-0.2.7}/examples/packaged/README.md +0 -0
  17. {tinyfan-0.2.6 → tinyfan-0.2.7}/examples/packaged/pyproject.toml +0 -0
  18. {tinyfan-0.2.6 → tinyfan-0.2.7}/examples/packaged/src/tinyfan_examples_packaged/__init__.py +0 -0
  19. {tinyfan-0.2.6 → tinyfan-0.2.7}/examples/packaged/src/tinyfan_examples_packaged/asset.py +0 -0
  20. {tinyfan-0.2.6 → tinyfan-0.2.7}/examples/resource.py +0 -0
  21. {tinyfan-0.2.6 → tinyfan-0.2.7}/examples/secret.yaml +0 -0
  22. {tinyfan-0.2.6 → tinyfan-0.2.7}/src/tinyfan/__init__.py +0 -0
  23. {tinyfan-0.2.6 → tinyfan-0.2.7}/src/tinyfan/argo_typing.py +0 -0
  24. {tinyfan-0.2.6 → tinyfan-0.2.7}/src/tinyfan/cli.py +0 -0
  25. {tinyfan-0.2.6 → tinyfan-0.2.7}/src/tinyfan/config.py +0 -0
  26. {tinyfan-0.2.6 → tinyfan-0.2.7}/src/tinyfan/dagviz.py +0 -0
  27. {tinyfan-0.2.6 → tinyfan-0.2.7}/src/tinyfan/flowrundata.py +0 -0
  28. {tinyfan-0.2.6 → tinyfan-0.2.7}/src/tinyfan/py.typed +0 -0
  29. {tinyfan-0.2.6 → tinyfan-0.2.7}/src/tinyfan/resources/__init__.py +0 -0
  30. {tinyfan-0.2.6 → tinyfan-0.2.7}/src/tinyfan/resources/base.py +0 -0
  31. {tinyfan-0.2.6 → tinyfan-0.2.7}/src/tinyfan/stores/__init__.py +0 -0
  32. {tinyfan-0.2.6 → tinyfan-0.2.7}/src/tinyfan/stores/base.py +0 -0
  33. {tinyfan-0.2.6 → tinyfan-0.2.7}/src/tinyfan/stores/bigquery.py +0 -0
  34. {tinyfan-0.2.6 → tinyfan-0.2.7}/src/tinyfan/stores/gcs_pickle.py +0 -0
  35. {tinyfan-0.2.6 → tinyfan-0.2.7}/src/tinyfan/stores/naive.py +0 -0
  36. {tinyfan-0.2.6 → tinyfan-0.2.7}/src/tinyfan/utils/__init__.py +0 -0
  37. {tinyfan-0.2.6 → tinyfan-0.2.7}/src/tinyfan/utils/embed.py +0 -0
  38. {tinyfan-0.2.6 → tinyfan-0.2.7}/src/tinyfan/utils/exjson.py +0 -0
  39. {tinyfan-0.2.6 → tinyfan-0.2.7}/src/tinyfan/utils/merge.py +0 -0
  40. {tinyfan-0.2.6 → tinyfan-0.2.7}/src/tinyfan/utils/typing.py +0 -0
  41. {tinyfan-0.2.6 → tinyfan-0.2.7}/src/tinyfan/utils/yaml.py +0 -0
  42. {tinyfan-0.2.6 → tinyfan-0.2.7}/tests/__init__.py +0 -0
  43. {tinyfan-0.2.6 → tinyfan-0.2.7}/tests/codegen_samples/directory/__init__.py +0 -0
  44. {tinyfan-0.2.6 → tinyfan-0.2.7}/tests/codegen_samples/directory/asset.py +0 -0
  45. {tinyfan-0.2.6 → tinyfan-0.2.7}/tests/codegen_samples/directory/asset2.py +0 -0
  46. {tinyfan-0.2.6 → tinyfan-0.2.7}/tests/codegen_samples/singlefile.py +0 -0
  47. {tinyfan-0.2.6 → tinyfan-0.2.7}/tests/conftest.py +0 -0
  48. {tinyfan-0.2.6 → tinyfan-0.2.7}/tests/helpers.py +0 -0
  49. {tinyfan-0.2.6 → tinyfan-0.2.7}/tests/openapi2jsonschema.py +0 -0
  50. {tinyfan-0.2.6 → tinyfan-0.2.7}/tests/test_codegen.py +0 -0
  51. {tinyfan-0.2.6 → tinyfan-0.2.7}/tests/test_config.py +0 -0
  52. {tinyfan-0.2.6 → tinyfan-0.2.7}/tests/test_decorators.py +0 -0
  53. {tinyfan-0.2.6 → tinyfan-0.2.7}/tests/utils/__init__.py +0 -0
  54. {tinyfan-0.2.6 → tinyfan-0.2.7}/tests/utils/embed_samples/directory/__init__.py +0 -0
  55. {tinyfan-0.2.6 → tinyfan-0.2.7}/tests/utils/embed_samples/directory/dep.py +0 -0
  56. {tinyfan-0.2.6 → tinyfan-0.2.7}/tests/utils/embed_samples/singlefile.py +0 -0
  57. {tinyfan-0.2.6 → tinyfan-0.2.7}/tests/utils/test_embed.py +0 -0
  58. {tinyfan-0.2.6 → tinyfan-0.2.7}/tests/utils/test_exjson.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tinyfan
3
- Version: 0.2.6
3
+ Version: 0.2.7
4
4
  Summary: Tiny Argo Workflows python devkit
5
5
  Project-URL: Documentation, https://github.com/eunchuldev/tinyfan#readme
6
6
  Project-URL: Issues, https://github.com/eunchuldev/tinyfan/issues
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "tinyfan"
3
- version = "0.2.6"
3
+ version = "0.2.7"
4
4
  description = 'Tiny Argo Workflows python devkit'
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -229,12 +229,11 @@ class AssetTree:
229
229
  root_location = get_root_path(list(self.nodes.values())[0].asset.func)
230
230
  source += embed(root_location)
231
231
  if not root_location.endswith(".py"):
232
- source += "from {{inputs.parameters.module_name}} import {{inputs.parameters.asset_name}}\n"
232
+ source += """{{=join(map(fromJSON(inputs.parameters.moduledata), {"from " + .module + " import " + .name}), "\\n")}}\n"""
233
233
  source += "asset = {{inputs.parameters.asset_name}}.asset\n"
234
234
  else:
235
235
  source = (
236
- "from {{inputs.parameters.module_name}}"
237
- " import {{inputs.parameters.asset_name}}\n"
236
+ """{{=join(map(fromJSON(inputs.parameters.moduledata), {"from " + .module + " import " + .name}), "\\n")}}\n"""
238
237
  "asset = {{inputs.parameters.asset_name}}.asset\n"
239
238
  )
240
239
  source += (
@@ -366,7 +365,7 @@ class AssetTree:
366
365
  "value": "{{= nil }}",
367
366
  },
368
367
  {
369
- "name": "module_name",
368
+ "name": "moduledata",
370
369
  "value": "{{= nil }}",
371
370
  },
372
371
  ]
@@ -406,8 +405,22 @@ class AssetTree:
406
405
  "value": node.asset.name,
407
406
  },
408
407
  {
409
- "name": "module_name",
410
- "value": node.asset_module_name(),
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
+ ),
411
424
  },
412
425
  ]
413
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)
@@ -784,7 +784,7 @@ wheels = [
784
784
 
785
785
  [[package]]
786
786
  name = "tinyfan"
787
- version = "0.2.6"
787
+ version = "0.2.7"
788
788
  source = { editable = "." }
789
789
  dependencies = [
790
790
  { name = "croniter" },
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