satif-ai 0.2.5__py3-none-any.whl → 0.2.6__py3-none-any.whl

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.
@@ -1,8 +1,9 @@
1
1
  import base64
2
2
  import os
3
3
  import re
4
+ from collections import defaultdict
4
5
  from pathlib import Path
5
- from typing import Dict, List, Optional, Union
6
+ from typing import Any, Dict, List, Optional, Union
6
7
 
7
8
  from agents import Agent, Runner, function_tool
8
9
  from agents.mcp.server import MCPServer
@@ -33,7 +34,7 @@ async def execute_transformation(code: str) -> str:
33
34
  generated_output_path = code_transformer.export(INPUT_SDIF_PATH)
34
35
 
35
36
  comparisons = []
36
- comparator_kwargs = {}
37
+ comparator_kwargs = {"check_structure_only": True}
37
38
  if SCHEMA_ONLY:
38
39
  comparator_kwargs["check_structure_only"] = True
39
40
 
@@ -112,6 +113,7 @@ class TransformationAsyncCodeBuilder(AsyncCodeBuilder):
112
113
  output_sdif: Optional[Path] = None, # This will now be relative or None
113
114
  instructions: Optional[str] = None,
114
115
  schema_only: bool = False,
116
+ representer_options_for_build: Optional[Dict[str, Any]] = None,
115
117
  ) -> str:
116
118
  global INPUT_SDIF_PATH, OUTPUT_TARGET_FILES, SCHEMA_ONLY
117
119
  # INPUT_SDIF_PATH is used by execute_transformation tool, needs to be accessible from where that tool runs.
@@ -179,16 +181,21 @@ class TransformationAsyncCodeBuilder(AsyncCodeBuilder):
179
181
  else:
180
182
  OUTPUT_TARGET_FILES = {}
181
183
 
182
- output_representation = {}
184
+ output_representation = defaultdict(dict)
183
185
  if OUTPUT_TARGET_FILES:
184
186
  for file_key_abs_path in list(OUTPUT_TARGET_FILES.keys()):
185
187
  agent_facing_name = OUTPUT_TARGET_FILES[file_key_abs_path]
186
- print(f"Representing {agent_facing_name} from {file_key_abs_path}!!")
188
+ print(f"Representing {agent_facing_name} from {file_key_abs_path}")
187
189
  try:
188
190
  # Representer uses the absolute path (file_key_abs_path) to read the example file.
189
- output_representation[agent_facing_name] = get_representer(
190
- file_key_abs_path
191
- ).represent(file_key_abs_path)
191
+ representer = get_representer(file_key_abs_path)
192
+ representation, used_params = representer.represent(
193
+ file_key_abs_path, **(representer_options_for_build or {})
194
+ )
195
+ output_representation[agent_facing_name] = {
196
+ "representation": representation,
197
+ "used_params": used_params,
198
+ }
192
199
  except Exception as e:
193
200
  print(
194
201
  f"Warning: Could not get representation for {agent_facing_name} (path {file_key_abs_path}): {e}"
@@ -213,10 +220,11 @@ class TransformationAsyncCodeBuilder(AsyncCodeBuilder):
213
220
  "output_schema": output_schema_text,
214
221
  "output_sample": output_sample_text
215
222
  if not SCHEMA_ONLY
216
- else "Sample not available. Transform according to the schema only. No data is present in the output example.",
223
+ else "Sample not available.",
217
224
  "output_representation": str(
218
225
  output_representation
219
226
  ), # Representation keyed by agent-facing name
227
+ "instructions": instructions,
220
228
  },
221
229
  )
222
230
  agent = Agent(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: satif-ai
3
- Version: 0.2.5
3
+ Version: 0.2.6
4
4
  Summary: AI Agents for Satif
5
5
  License: MIT
6
6
  Author: Bryan Djafer
@@ -3,15 +3,15 @@ satif_ai/adapters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
3
3
  satif_ai/adapters/tidy.py,sha256=2oYj7Gz3vOQtzcpoJI4JbftWlMKvOWL8rdwthjg-zUE,19884
4
4
  satif_ai/code_builders/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  satif_ai/code_builders/adaptation.py,sha256=E29YM0S6pMtAfB0uzSUexoeWKwXfF8iJVyYUCKWQz5k,188
6
- satif_ai/code_builders/transformation.py,sha256=ZYpZpJb28PzN3suNG1lxeF2zB6mWn8gMoOLQov9YJUA,10043
6
+ satif_ai/code_builders/transformation.py,sha256=mO_kGYl6QYvErW1rVaToDYJ2rpE36hUmKC7HjGl4ytI,10432
7
7
  satif_ai/plot_builders/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  satif_ai/plot_builders/agent.py,sha256=Ncw7SL9qkpRN0hw76ezSo1K8vVQK6gcXFp8x8VFwqUI,8291
9
9
  satif_ai/plot_builders/prompt.py,sha256=m0W1SsxnB9_FhIYRumkthImJbK-7KUm4dygN3kjAXGk,6877
10
10
  satif_ai/plot_builders/tool.py,sha256=MeLnG_wFoITSVWZcNFsQLCi157O4L3wItQgolBa4fAw,5994
11
11
  satif_ai/standardizers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  satif_ai/standardizers/ai_csv.py,sha256=AAeTt7eqFAtayxF2b95Z_K_lnMdwBBnv2Cn-qTEpMp8,29499
13
- satif_ai-0.2.5.dist-info/LICENSE,sha256=kS8EN6yAaGZd7V5z6GKSn_x3ozcZltrfRky4vMPRCw8,1072
14
- satif_ai-0.2.5.dist-info/METADATA,sha256=jIyyKOcveIz_98_JTyF6bsfVn5iOVvc3qLFVQZ0wUSo,670
15
- satif_ai-0.2.5.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
16
- satif_ai-0.2.5.dist-info/entry_points.txt,sha256=Mz2SwYALjktap1bF-Q3EWBgiZVNT6QJCVsCs_fCV33Y,43
17
- satif_ai-0.2.5.dist-info/RECORD,,
13
+ satif_ai-0.2.6.dist-info/LICENSE,sha256=kS8EN6yAaGZd7V5z6GKSn_x3ozcZltrfRky4vMPRCw8,1072
14
+ satif_ai-0.2.6.dist-info/METADATA,sha256=qM5JQ9OJfC2zTlYlp6XyyrLdzuL1N45hYWsjgUSQxAM,670
15
+ satif_ai-0.2.6.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
16
+ satif_ai-0.2.6.dist-info/entry_points.txt,sha256=Mz2SwYALjktap1bF-Q3EWBgiZVNT6QJCVsCs_fCV33Y,43
17
+ satif_ai-0.2.6.dist-info/RECORD,,