tinyfan 0.1.0__tar.gz → 0.1.2__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.1.0 → tinyfan-0.1.2}/PKG-INFO +1 -1
- {tinyfan-0.1.0 → tinyfan-0.1.2}/pyproject.toml +1 -1
- {tinyfan-0.1.0 → tinyfan-0.1.2}/src/tinyfan/codegen.py +2 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/src/tinyfan/config.py +12 -4
- {tinyfan-0.1.0 → tinyfan-0.1.2}/tests/test_codegen.py +1 -1
- {tinyfan-0.1.0 → tinyfan-0.1.2}/uv.lock +1 -1
- {tinyfan-0.1.0 → tinyfan-0.1.2}/.github/workflows/publish.yml +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/.gitignore +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/.python-version +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/README.md +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/examples/configmap.yaml +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/examples/configs.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/examples/getting-started.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/examples/packaged/.python-version +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/examples/packaged/Dockerfile +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/examples/packaged/README.md +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/examples/packaged/pyproject.toml +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/examples/packaged/src/tinyfan_examples_packaged/__init__.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/examples/packaged/src/tinyfan_examples_packaged/asset.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/examples/resource.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/examples/secret.yaml +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/src/tinyfan/__init__.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/src/tinyfan/argo_typing.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/src/tinyfan/cli.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/src/tinyfan/flow.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/src/tinyfan/flowrundata.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/src/tinyfan/resources/__init__.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/src/tinyfan/resources/base.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/src/tinyfan/stores/__init__.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/src/tinyfan/stores/base.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/src/tinyfan/stores/bigquery.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/src/tinyfan/stores/gcs_pickle.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/src/tinyfan/stores/naive.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/src/tinyfan/utils/__init__.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/src/tinyfan/utils/embed.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/src/tinyfan/utils/exjson.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/src/tinyfan/utils/merge.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/src/tinyfan/utils/typing.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/src/tinyfan/utils/yaml.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/tests/__init__.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/tests/codegen_samples/directory/__init__.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/tests/codegen_samples/directory/asset.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/tests/codegen_samples/directory/asset2.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/tests/codegen_samples/singlefile.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/tests/conftest.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/tests/helpers.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/tests/openapi2jsonschema.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/tests/test_decorators.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/tests/utils/__init__.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/tests/utils/embed_samples/directory/__init__.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/tests/utils/embed_samples/directory/dep.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/tests/utils/embed_samples/singlefile.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/tests/utils/test_embed.py +0 -0
- {tinyfan-0.1.0 → tinyfan-0.1.2}/tests/utils/test_exjson.py +0 -0
|
@@ -15,6 +15,7 @@ from .argo_typing import ScriptTemplate
|
|
|
15
15
|
from .utils.embed import embed
|
|
16
16
|
from .utils.merge import deepmerge
|
|
17
17
|
from .config import CLI_CONFIG_STATE, Config, ConfigValue, ConfigMapKeyRef, ConfigMapRef, SecretKeyRef, SecretRef
|
|
18
|
+
from .flowrundata import FlowRunData
|
|
18
19
|
|
|
19
20
|
VALID_CRON_REGEXP = r"^(?:(?:(?:(?:\d+,)+\d+|(?:\d+(?:\/|-|#)\d+)|\d+L?|\*(?:\/\d+)?|L(?:-\d+)?|\?|[A-Z]{3}(?:-[A-Z]{3})?) ?){5,7})|(@hourly|@daily|@midnight|@weekly|@monthly|@yearly|@annually)$"
|
|
20
21
|
VALID_DEPENDS_REGEXP = r"^(?!.*\.[A-Za-z0-9_]+\.[A-Za-z0-9_]+)(?!.*\.(?!Succeeded|Failed|Errored|Skipped|Omitted|Daemoned)\w+)(?!.*(?:&&|\|\|)\s*(?:&&|\|\|))(?!.*!!)[A-Za-z0-9_&|!().\s]+$"
|
|
@@ -136,6 +137,7 @@ class AssetTree:
|
|
|
136
137
|
set(self.flow.assets.keys())
|
|
137
138
|
| set((self.flow.resources or {}).keys())
|
|
138
139
|
| set((self.flow.configs or {}).keys())
|
|
140
|
+
| set(inspect.get_annotations(FlowRunData).keys())
|
|
139
141
|
)
|
|
140
142
|
unknown_names = [n for n in func_param_names if n not in known_names]
|
|
141
143
|
if len(unknown_names) > 0:
|
|
@@ -12,19 +12,27 @@ class CliConfigState:
|
|
|
12
12
|
CLI_CONFIG_STATE = CliConfigState()
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
def cli_arg(name: str, from_env: str | None = None):
|
|
15
|
+
def cli_arg(name: str, from_env: str | None = None, default: str | None = None) -> str:
|
|
16
16
|
if CLI_CONFIG_STATE.codegen:
|
|
17
17
|
if name not in CLI_CONFIG_STATE.cli_args:
|
|
18
18
|
if from_env is not None:
|
|
19
|
-
val = os.environ.get(from_env)
|
|
19
|
+
val = os.environ.get(from_env, default)
|
|
20
20
|
if val is None:
|
|
21
21
|
raise Exception(f"neither of cli arg `{name}` nor env var `{from_env}` not setted.")
|
|
22
22
|
return val
|
|
23
|
-
|
|
23
|
+
elif default is not None:
|
|
24
|
+
return default
|
|
25
|
+
else:
|
|
26
|
+
raise Exception(f"cli arg `{name}` is not setted.")
|
|
24
27
|
else:
|
|
25
28
|
return CLI_CONFIG_STATE.cli_args[name]
|
|
26
29
|
else:
|
|
27
|
-
|
|
30
|
+
if default is not None:
|
|
31
|
+
return CLI_CONFIG_STATE.cli_args.get(name, default)
|
|
32
|
+
elif name not in CLI_CONFIG_STATE.cli_args:
|
|
33
|
+
raise Exception(f"cli arg `{name}` is not setted.")
|
|
34
|
+
else:
|
|
35
|
+
return CLI_CONFIG_STATE.cli_args[name]
|
|
28
36
|
|
|
29
37
|
|
|
30
38
|
class ConfigValue(ABC):
|
|
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
|