memra 0.2.7__py3-none-any.whl → 0.2.9__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.
- memra/__init__.py +1 -1
- memra/cli.py +88 -10
- {memra-0.2.7.dist-info → memra-0.2.9.dist-info}/METADATA +1 -1
- {memra-0.2.7.dist-info → memra-0.2.9.dist-info}/RECORD +8 -8
- {memra-0.2.7.dist-info → memra-0.2.9.dist-info}/WHEEL +0 -0
- {memra-0.2.7.dist-info → memra-0.2.9.dist-info}/entry_points.txt +0 -0
- {memra-0.2.7.dist-info → memra-0.2.9.dist-info}/licenses/LICENSE +0 -0
- {memra-0.2.7.dist-info → memra-0.2.9.dist-info}/top_level.txt +0 -0
memra/__init__.py
CHANGED
memra/cli.py
CHANGED
@@ -159,9 +159,41 @@ if __name__ == '__main__':
|
|
159
159
|
with open(ops_dir / "mcp_bridge_server.py", "w") as f:
|
160
160
|
f.write(mcp_content)
|
161
161
|
|
162
|
-
#
|
162
|
+
# Copy the real ETL demo if available
|
163
163
|
demo_dir.mkdir(exist_ok=True)
|
164
|
-
|
164
|
+
import shutil
|
165
|
+
|
166
|
+
try:
|
167
|
+
# Try to copy from demos directory
|
168
|
+
source_demo = Path("demos/etl_invoice_processing/etl_invoice_demo.py")
|
169
|
+
if source_demo.exists():
|
170
|
+
# Copy the main demo script
|
171
|
+
shutil.copy2(source_demo, demo_dir / "etl_invoice_demo.py")
|
172
|
+
print("✅ Copied real ETL demo script")
|
173
|
+
|
174
|
+
# Copy all necessary Python dependencies
|
175
|
+
demo_files = [
|
176
|
+
"database_monitor_agent.py",
|
177
|
+
"simple_pdf_processor.py",
|
178
|
+
"setup_demo_data.py"
|
179
|
+
]
|
180
|
+
|
181
|
+
for file_name in demo_files:
|
182
|
+
source_file = Path(f"demos/etl_invoice_processing/{file_name}")
|
183
|
+
if source_file.exists():
|
184
|
+
shutil.copy2(source_file, demo_dir / file_name)
|
185
|
+
print(f"✅ Copied {file_name}")
|
186
|
+
|
187
|
+
# Copy sample data
|
188
|
+
data_dir = demo_dir / "data"
|
189
|
+
data_dir.mkdir(exist_ok=True)
|
190
|
+
source_data = Path("demos/etl_invoice_processing/data")
|
191
|
+
if source_data.exists():
|
192
|
+
shutil.copytree(source_data, data_dir, dirs_exist_ok=True)
|
193
|
+
print("✅ Copied sample invoice data")
|
194
|
+
else:
|
195
|
+
# Create a basic demo if real one not found
|
196
|
+
demo_content = """#!/usr/bin/env python3
|
165
197
|
import os
|
166
198
|
import sys
|
167
199
|
import time
|
@@ -194,9 +226,47 @@ def main():
|
|
194
226
|
if __name__ == "__main__":
|
195
227
|
main()
|
196
228
|
"""
|
229
|
+
with open(demo_dir / "etl_demo.py", "w") as f:
|
230
|
+
f.write(demo_content)
|
231
|
+
print("⚠️ Using simplified demo (real demo not found)")
|
232
|
+
except Exception as e:
|
233
|
+
print(f"Warning: Could not copy ETL demo: {e}")
|
234
|
+
# Fallback to basic demo
|
235
|
+
demo_content = """#!/usr/bin/env python3
|
236
|
+
import os
|
237
|
+
import sys
|
238
|
+
import time
|
239
|
+
|
240
|
+
def main():
|
241
|
+
print("🚀 Starting ETL Invoice Processing Demo...")
|
242
|
+
print("🏢 Starting ETL Invoice Processing Department")
|
243
|
+
print("📋 Mission: Complete end-to-end ETL process with comprehensive monitoring")
|
244
|
+
print("👥 Team: Pre-ETL Database Monitor, Data Engineer, Invoice Parser, Data Entry Specialist, Post-ETL Database Monitor")
|
245
|
+
print("👔 Manager: ETL Process Manager")
|
246
|
+
|
247
|
+
steps = [
|
248
|
+
("Pre-ETL Database Monitor", "Database state captured: 2 rows"),
|
249
|
+
("Data Engineer", "Schema extracted successfully"),
|
250
|
+
("Invoice Parser", "Invoice data extracted: $270.57"),
|
251
|
+
("Data Entry Specialist", "Record inserted: ID 1"),
|
252
|
+
("Post-ETL Database Monitor", "Database state captured: 3 rows")
|
253
|
+
]
|
254
|
+
|
255
|
+
for i, (step, result) in enumerate(steps, 1):
|
256
|
+
print(f"\\n🔄 Step {i}/5: {step}")
|
257
|
+
time.sleep(1)
|
258
|
+
print(f"✅ {result}")
|
197
259
|
|
198
|
-
|
199
|
-
|
260
|
+
print("\\n🎉 ETL Invoice Processing Department workflow completed!")
|
261
|
+
print("⏱️ Total time: 5.2s")
|
262
|
+
print("\\n📊 Demo completed successfully!")
|
263
|
+
print("This was a simplified demo. For the full experience, check out the complete ETL workflow.")
|
264
|
+
|
265
|
+
if __name__ == "__main__":
|
266
|
+
main()
|
267
|
+
"""
|
268
|
+
with open(demo_dir / "etl_demo.py", "w") as f:
|
269
|
+
f.write(demo_content)
|
200
270
|
|
201
271
|
def setup_environment():
|
202
272
|
"""Set up environment variables for the demo"""
|
@@ -269,14 +339,22 @@ def wait_for_services():
|
|
269
339
|
def run_etl_workflow(demo_dir):
|
270
340
|
"""Run the ETL workflow"""
|
271
341
|
try:
|
272
|
-
#
|
273
|
-
|
274
|
-
if
|
275
|
-
|
342
|
+
# Try to run the real ETL demo first
|
343
|
+
real_demo_script = demo_dir / "etl_invoice_demo.py"
|
344
|
+
if real_demo_script.exists():
|
345
|
+
print("🎯 Running real ETL workflow...")
|
346
|
+
result = subprocess.run([sys.executable, str(real_demo_script)], cwd=demo_dir)
|
276
347
|
return result.returncode == 0
|
277
348
|
else:
|
278
|
-
|
279
|
-
|
349
|
+
# Fallback to simplified demo
|
350
|
+
demo_script = demo_dir / "etl_demo.py"
|
351
|
+
if demo_script.exists():
|
352
|
+
print("🎯 Running simplified demo...")
|
353
|
+
result = subprocess.run([sys.executable, str(demo_script)], cwd=demo_dir)
|
354
|
+
return result.returncode == 0
|
355
|
+
else:
|
356
|
+
print("❌ No demo script found")
|
357
|
+
return False
|
280
358
|
|
281
359
|
except Exception as e:
|
282
360
|
print(f"❌ Error running ETL workflow: {e}")
|
@@ -1,12 +1,12 @@
|
|
1
|
-
memra/__init__.py,sha256=
|
2
|
-
memra/cli.py,sha256=
|
1
|
+
memra/__init__.py,sha256=UotdKmtjXYTO4KnA9PVqsR1Bv8WDYEfG3yMfEikiNHQ,1108
|
2
|
+
memra/cli.py,sha256=QS__mxrhc15GMoMMraco-u3qMUxfLqwrjTxjsr5aD2k,13677
|
3
3
|
memra/discovery.py,sha256=yJIQnrDQu1nyzKykCIuzG_5SW5dIXHCEBLLKRWacIoY,480
|
4
4
|
memra/discovery_client.py,sha256=AbnKn6qhyrf7vmOvknEeDzH4tiGHsqPHtDaein_qaW0,1271
|
5
5
|
memra/execution.py,sha256=OXpBKxwBIjhACWL_qh8KHNndO8HUgB6gBF81AiQBBm0,34751
|
6
6
|
memra/models.py,sha256=3KvjPCaMFGIvI017AIHS23jGnEBZdKHspe1Fp8w0xa0,3418
|
7
7
|
memra/tool_registry.py,sha256=PDuWtiX_LX-vhKnx4JeL_ndUwG-oJ6bdhGe6iQeCDBw,15361
|
8
8
|
memra/tool_registry_client.py,sha256=dPIj6DMS5wdu99XmVm-NQYHKH_m6nsknCh4C_imTFig,4009
|
9
|
-
memra-0.2.
|
9
|
+
memra-0.2.9.dist-info/licenses/LICENSE,sha256=8OrnTd8DWwLWmUEj5srSLvT4PREfW1Qo1T5gEUIHPws,1062
|
10
10
|
memra-ops/app.py,sha256=S8B82gOAuT9x-NhmVLL9HM03Pde3Fa7QXm6TG1PEbbU,29439
|
11
11
|
memra-ops/config.py,sha256=6mBbS_stoEIhJDBqdJOalryAnyWeHbDy81mU1j08ids,969
|
12
12
|
memra-ops/mcp_bridge_server.py,sha256=tDEigRstIEAEu16F1ctCor2ny9CBbEOMY046bHdzFpE,47607
|
@@ -61,8 +61,8 @@ memra-workflows/propane_delivery/propane_delivery.py,sha256=ryvIxDjM9GJY9T6fFIqJ
|
|
61
61
|
memra-workflows/text_to_sql/complete_invoice_workflow_with_queries.py,sha256=x4wq3o_ogFnnrI6MQwEhqIiNH-NNwS5SXQUoKd_br7U,7428
|
62
62
|
memra-workflows/text_to_sql/complete_text_to_sql_system.py,sha256=Izj4ucXDXTWFY29SWr2YrEf3ZyXH4QCDEljNk4jlpI0,8991
|
63
63
|
memra-workflows/text_to_sql/file_discovery_demo.py,sha256=4R_QN0Y6OtHmnX6CvtwDXen122XCDrk-MRBOzxb_x_k,5306
|
64
|
-
memra-0.2.
|
65
|
-
memra-0.2.
|
66
|
-
memra-0.2.
|
67
|
-
memra-0.2.
|
68
|
-
memra-0.2.
|
64
|
+
memra-0.2.9.dist-info/METADATA,sha256=zpKLF2-uHWpKR47OY6xeNqK6069fW0QVdwnSiJECi_4,10736
|
65
|
+
memra-0.2.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
66
|
+
memra-0.2.9.dist-info/entry_points.txt,sha256=LBVjwWoxWJRzNLgeByPn6xUvWFIRnqnemvAZgIoSt08,41
|
67
|
+
memra-0.2.9.dist-info/top_level.txt,sha256=IviXF9qSQY_BidRYund9zFaV-q1VMl6CuizwTAggQks,42
|
68
|
+
memra-0.2.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|