codeflowhub 0.2.1__tar.gz → 0.2.3__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.
- {codeflowhub-0.2.1 → codeflowhub-0.2.3}/PKG-INFO +1 -1
- {codeflowhub-0.2.1 → codeflowhub-0.2.3}/codeflowhub/airflow/xcom.py +15 -2
- {codeflowhub-0.2.1 → codeflowhub-0.2.3}/codeflowhub/flow.py +5 -1
- {codeflowhub-0.2.1 → codeflowhub-0.2.3}/codeflowhub.egg-info/PKG-INFO +1 -1
- {codeflowhub-0.2.1 → codeflowhub-0.2.3}/setup.py +1 -1
- {codeflowhub-0.2.1 → codeflowhub-0.2.3}/LICENSE +0 -0
- {codeflowhub-0.2.1 → codeflowhub-0.2.3}/README.md +0 -0
- {codeflowhub-0.2.1 → codeflowhub-0.2.3}/codeflowhub/__init__.py +0 -0
- {codeflowhub-0.2.1 → codeflowhub-0.2.3}/codeflowhub/action.py +0 -0
- {codeflowhub-0.2.1 → codeflowhub-0.2.3}/codeflowhub/airflow/__init__.py +0 -0
- {codeflowhub-0.2.1 → codeflowhub-0.2.3}/codeflowhub/base.py +0 -0
- {codeflowhub-0.2.1 → codeflowhub-0.2.3}/codeflowhub/model.py +0 -0
- {codeflowhub-0.2.1 → codeflowhub-0.2.3}/codeflowhub/service/__init__.py +0 -0
- {codeflowhub-0.2.1 → codeflowhub-0.2.3}/codeflowhub/service/airflow_exporter.py +0 -0
- {codeflowhub-0.2.1 → codeflowhub-0.2.3}/codeflowhub/storage/__init__.py +0 -0
- {codeflowhub-0.2.1 → codeflowhub-0.2.3}/codeflowhub/storage/local_storage.py +0 -0
- {codeflowhub-0.2.1 → codeflowhub-0.2.3}/codeflowhub/storage/s3_storage.py +0 -0
- {codeflowhub-0.2.1 → codeflowhub-0.2.3}/codeflowhub/storage/storage.py +0 -0
- {codeflowhub-0.2.1 → codeflowhub-0.2.3}/codeflowhub/task.py +0 -0
- {codeflowhub-0.2.1 → codeflowhub-0.2.3}/codeflowhub/template/__init__.py +0 -0
- {codeflowhub-0.2.1 → codeflowhub-0.2.3}/codeflowhub/template/analyze_speaker_pkg/__init__.py +0 -0
- {codeflowhub-0.2.1 → codeflowhub-0.2.3}/codeflowhub/template/analyze_speaker_pkg/main.py +0 -0
- {codeflowhub-0.2.1 → codeflowhub-0.2.3}/codeflowhub/template/extract_voice_pkg/__init__.py +0 -0
- {codeflowhub-0.2.1 → codeflowhub-0.2.3}/codeflowhub/template/extract_voice_pkg/main.py +0 -0
- {codeflowhub-0.2.1 → codeflowhub-0.2.3}/codeflowhub/template/read_pdf_pkg/__init__.py +0 -0
- {codeflowhub-0.2.1 → codeflowhub-0.2.3}/codeflowhub/template/read_pdf_pkg/main.py +0 -0
- {codeflowhub-0.2.1 → codeflowhub-0.2.3}/codeflowhub/template/transcript_pkg/__init__.py +0 -0
- {codeflowhub-0.2.1 → codeflowhub-0.2.3}/codeflowhub/template/transcript_pkg/main.py +0 -0
- {codeflowhub-0.2.1 → codeflowhub-0.2.3}/codeflowhub.egg-info/SOURCES.txt +0 -0
- {codeflowhub-0.2.1 → codeflowhub-0.2.3}/codeflowhub.egg-info/dependency_links.txt +0 -0
- {codeflowhub-0.2.1 → codeflowhub-0.2.3}/codeflowhub.egg-info/top_level.txt +0 -0
- {codeflowhub-0.2.1 → codeflowhub-0.2.3}/setup.cfg +0 -0
|
@@ -69,11 +69,24 @@ def _api_request(path: str):
|
|
|
69
69
|
|
|
70
70
|
|
|
71
71
|
def _write_json(content, output_path: str):
|
|
72
|
-
"""Write JSON content to file.
|
|
72
|
+
"""Write JSON content to file.
|
|
73
|
+
|
|
74
|
+
Handles both parsed objects (dict/list) and string values.
|
|
75
|
+
String values may be valid JSON or Python repr (single quotes) —
|
|
76
|
+
both are normalized to valid JSON output.
|
|
77
|
+
"""
|
|
73
78
|
os.makedirs(os.path.dirname(output_path) or '.', exist_ok=True)
|
|
74
79
|
with open(output_path, 'w') as f:
|
|
75
80
|
if isinstance(content, str):
|
|
76
|
-
|
|
81
|
+
# Airflow XCom API가 Python repr 문자열로 반환할 수 있음
|
|
82
|
+
# e.g. "{'key': 'value'}" (싱글쿼트) → valid JSON으로 변환 필요
|
|
83
|
+
try:
|
|
84
|
+
json.loads(content) # 이미 valid JSON이면 그대로 출력
|
|
85
|
+
f.write(content)
|
|
86
|
+
except json.JSONDecodeError:
|
|
87
|
+
import ast
|
|
88
|
+
parsed = ast.literal_eval(content)
|
|
89
|
+
json.dump(parsed, f)
|
|
77
90
|
else:
|
|
78
91
|
json.dump(content, f)
|
|
79
92
|
|
|
@@ -81,7 +81,7 @@ class FlowDecorator(BaseDecorator):
|
|
|
81
81
|
def _create_parser(cls, add_help=True):
|
|
82
82
|
"""FlowhHub CLI 파서 생성"""
|
|
83
83
|
parser = argparse.ArgumentParser(description='FlowhHub Workflow', add_help=add_help)
|
|
84
|
-
parser.add_argument('--env', type=str, default=
|
|
84
|
+
parser.add_argument('--env', type=str, default=None, help='Environment to use (default: default, or --export value if exporting)')
|
|
85
85
|
parser.add_argument('--id', type=str, default=None, help='Workflow run ID (default: run)')
|
|
86
86
|
parser.add_argument('--export', type=str, default=None, help='Export to external system (airflow)')
|
|
87
87
|
parser.add_argument('--job', type=str, default=None, help='Job directory path (auto-sets --input-data and --run-log)')
|
|
@@ -186,6 +186,10 @@ class FlowDecorator(BaseDecorator):
|
|
|
186
186
|
parser = self._create_parser(add_help=False)
|
|
187
187
|
args, _ = parser.parse_known_args()
|
|
188
188
|
|
|
189
|
+
# --env 미지정 시: --export가 있으면 export 값, 없으면 'default'
|
|
190
|
+
if args.env is None:
|
|
191
|
+
args.env = args.export if args.export and args.export in self.env_config else 'default'
|
|
192
|
+
|
|
189
193
|
if args.env and args.env in self.env_config:
|
|
190
194
|
self.select_env(args.env)
|
|
191
195
|
print(f'Using environment: {args.env}')
|
|
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
|
{codeflowhub-0.2.1 → codeflowhub-0.2.3}/codeflowhub/template/analyze_speaker_pkg/__init__.py
RENAMED
|
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
|