codeflowhub 0.2.2__tar.gz → 0.2.4__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 (32) hide show
  1. {codeflowhub-0.2.2 → codeflowhub-0.2.4}/PKG-INFO +1 -1
  2. {codeflowhub-0.2.2 → codeflowhub-0.2.4}/codeflowhub/airflow/xcom.py +15 -2
  3. {codeflowhub-0.2.2 → codeflowhub-0.2.4}/codeflowhub/flow.py +2 -2
  4. {codeflowhub-0.2.2 → codeflowhub-0.2.4}/codeflowhub.egg-info/PKG-INFO +1 -1
  5. {codeflowhub-0.2.2 → codeflowhub-0.2.4}/setup.py +1 -1
  6. {codeflowhub-0.2.2 → codeflowhub-0.2.4}/LICENSE +0 -0
  7. {codeflowhub-0.2.2 → codeflowhub-0.2.4}/README.md +0 -0
  8. {codeflowhub-0.2.2 → codeflowhub-0.2.4}/codeflowhub/__init__.py +0 -0
  9. {codeflowhub-0.2.2 → codeflowhub-0.2.4}/codeflowhub/action.py +0 -0
  10. {codeflowhub-0.2.2 → codeflowhub-0.2.4}/codeflowhub/airflow/__init__.py +0 -0
  11. {codeflowhub-0.2.2 → codeflowhub-0.2.4}/codeflowhub/base.py +0 -0
  12. {codeflowhub-0.2.2 → codeflowhub-0.2.4}/codeflowhub/model.py +0 -0
  13. {codeflowhub-0.2.2 → codeflowhub-0.2.4}/codeflowhub/service/__init__.py +0 -0
  14. {codeflowhub-0.2.2 → codeflowhub-0.2.4}/codeflowhub/service/airflow_exporter.py +0 -0
  15. {codeflowhub-0.2.2 → codeflowhub-0.2.4}/codeflowhub/storage/__init__.py +0 -0
  16. {codeflowhub-0.2.2 → codeflowhub-0.2.4}/codeflowhub/storage/local_storage.py +0 -0
  17. {codeflowhub-0.2.2 → codeflowhub-0.2.4}/codeflowhub/storage/s3_storage.py +0 -0
  18. {codeflowhub-0.2.2 → codeflowhub-0.2.4}/codeflowhub/storage/storage.py +0 -0
  19. {codeflowhub-0.2.2 → codeflowhub-0.2.4}/codeflowhub/task.py +0 -0
  20. {codeflowhub-0.2.2 → codeflowhub-0.2.4}/codeflowhub/template/__init__.py +0 -0
  21. {codeflowhub-0.2.2 → codeflowhub-0.2.4}/codeflowhub/template/analyze_speaker_pkg/__init__.py +0 -0
  22. {codeflowhub-0.2.2 → codeflowhub-0.2.4}/codeflowhub/template/analyze_speaker_pkg/main.py +0 -0
  23. {codeflowhub-0.2.2 → codeflowhub-0.2.4}/codeflowhub/template/extract_voice_pkg/__init__.py +0 -0
  24. {codeflowhub-0.2.2 → codeflowhub-0.2.4}/codeflowhub/template/extract_voice_pkg/main.py +0 -0
  25. {codeflowhub-0.2.2 → codeflowhub-0.2.4}/codeflowhub/template/read_pdf_pkg/__init__.py +0 -0
  26. {codeflowhub-0.2.2 → codeflowhub-0.2.4}/codeflowhub/template/read_pdf_pkg/main.py +0 -0
  27. {codeflowhub-0.2.2 → codeflowhub-0.2.4}/codeflowhub/template/transcript_pkg/__init__.py +0 -0
  28. {codeflowhub-0.2.2 → codeflowhub-0.2.4}/codeflowhub/template/transcript_pkg/main.py +0 -0
  29. {codeflowhub-0.2.2 → codeflowhub-0.2.4}/codeflowhub.egg-info/SOURCES.txt +0 -0
  30. {codeflowhub-0.2.2 → codeflowhub-0.2.4}/codeflowhub.egg-info/dependency_links.txt +0 -0
  31. {codeflowhub-0.2.2 → codeflowhub-0.2.4}/codeflowhub.egg-info/top_level.txt +0 -0
  32. {codeflowhub-0.2.2 → codeflowhub-0.2.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codeflowhub
3
- Version: 0.2.2
3
+ Version: 0.2.4
4
4
  Summary: workflow development tools
5
5
  Author: creaddiscans
6
6
  Author-email: creaddiscans@gmail.com
@@ -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
- f.write(content)
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
 
@@ -353,8 +353,8 @@ class FlowDecorator(BaseDecorator):
353
353
  """개별 task 결과를 run.json에 저장"""
354
354
  run_log = self._load_log_file()
355
355
  run_log[task_name] = {
356
- 'input': result,
357
- 'output': result
356
+ 'input': self._strip_context(result),
357
+ 'output': self._strip_context(result)
358
358
  }
359
359
  self._write_log_file(run_log)
360
360
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codeflowhub
3
- Version: 0.2.2
3
+ Version: 0.2.4
4
4
  Summary: workflow development tools
5
5
  Author: creaddiscans
6
6
  Author-email: creaddiscans@gmail.com
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='codeflowhub',
5
- version='0.2.2',
5
+ version='0.2.4',
6
6
  description='workflow development tools',
7
7
  author='creaddiscans',
8
8
  author_email='creaddiscans@gmail.com',
File without changes
File without changes
File without changes