misata 0.3.0b0__py3-none-any.whl → 0.5.0__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.
Files changed (40) hide show
  1. misata/__init__.py +1 -1
  2. misata/agents/__init__.py +23 -0
  3. misata/agents/pipeline.py +286 -0
  4. misata/causal/__init__.py +5 -0
  5. misata/causal/graph.py +109 -0
  6. misata/causal/solver.py +115 -0
  7. misata/cli.py +31 -0
  8. misata/generators/__init__.py +19 -0
  9. misata/generators/copula.py +198 -0
  10. misata/llm_parser.py +180 -137
  11. misata/quality.py +78 -33
  12. misata/reference_data.py +221 -0
  13. misata/research/__init__.py +3 -0
  14. misata/research/agent.py +70 -0
  15. misata/schema.py +25 -0
  16. misata/simulator.py +264 -12
  17. misata/smart_values.py +144 -6
  18. misata/studio/__init__.py +55 -0
  19. misata/studio/app.py +49 -0
  20. misata/studio/components/inspector.py +81 -0
  21. misata/studio/components/sidebar.py +35 -0
  22. misata/studio/constraint_generator.py +781 -0
  23. misata/studio/inference.py +319 -0
  24. misata/studio/outcome_curve.py +284 -0
  25. misata/studio/state/store.py +55 -0
  26. misata/studio/tabs/configure.py +50 -0
  27. misata/studio/tabs/generate.py +117 -0
  28. misata/studio/tabs/outcome_curve.py +149 -0
  29. misata/studio/tabs/schema_designer.py +217 -0
  30. misata/studio/utils/styles.py +143 -0
  31. misata/studio_constraints/__init__.py +29 -0
  32. misata/studio_constraints/z3_solver.py +259 -0
  33. {misata-0.3.0b0.dist-info → misata-0.5.0.dist-info}/METADATA +13 -2
  34. misata-0.5.0.dist-info/RECORD +61 -0
  35. {misata-0.3.0b0.dist-info → misata-0.5.0.dist-info}/WHEEL +1 -1
  36. {misata-0.3.0b0.dist-info → misata-0.5.0.dist-info}/entry_points.txt +1 -0
  37. misata-0.3.0b0.dist-info/RECORD +0 -37
  38. /misata/{generators.py → generators_legacy.py} +0 -0
  39. {misata-0.3.0b0.dist-info → misata-0.5.0.dist-info}/licenses/LICENSE +0 -0
  40. {misata-0.3.0b0.dist-info → misata-0.5.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,81 @@
1
+ import streamlit as st
2
+ from misata.studio.state.store import StudioStore
3
+ from misata.schema import Column
4
+ import random
5
+
6
+ def render_table_inspector():
7
+ """Render the detailed inspector panel for the selected table."""
8
+ selected_table_name = StudioStore.get("selected_table")
9
+ schema_config = StudioStore.get("schema_config")
10
+
11
+ if not selected_table_name or not schema_config:
12
+ return
13
+
14
+ # Find the table object
15
+ table = next((t for t in schema_config.tables if t.name == selected_table_name), None)
16
+ if not table:
17
+ return
18
+
19
+ with st.expander(f"🛠 Edit Table: {table.name}", expanded=True):
20
+ # 1. Table Properties
21
+ c1, c2 = st.columns([2, 1])
22
+ with c1:
23
+ new_name = st.text_input("Table Name", table.name)
24
+ if new_name != table.name:
25
+ table.name = new_name
26
+ st.rerun()
27
+
28
+ with c2:
29
+ new_rows = st.number_input("Rows", 1, 1000000, table.row_count)
30
+ table.row_count = new_rows
31
+
32
+ st.markdown("---")
33
+ st.markdown("**Columns**")
34
+
35
+ # 2. Column Editor
36
+ columns = schema_config.columns.get(table.name, [])
37
+
38
+ # List existing
39
+ for i, col in enumerate(columns):
40
+ with st.container():
41
+ c_name, c_type, c_del = st.columns([3, 2, 1])
42
+
43
+ with c_name:
44
+ new_col_name = st.text_input(f"Name", col.name, key=f"cn_{table.name}_{i}", label_visibility="collapsed")
45
+ col.name = new_col_name
46
+
47
+ with c_type:
48
+ type_options = ["int", "float", "date", "text", "categorical", "boolean", "foreign_key"]
49
+ new_type = st.selectbox("Type", type_options, index=type_options.index(col.type) if col.type in type_options else 3, key=f"ct_{table.name}_{i}", label_visibility="collapsed")
50
+ col.type = new_type
51
+
52
+ with c_del:
53
+ if st.button("🗑", key=f"del_{table.name}_{i}"):
54
+ columns.pop(i)
55
+ st.rerun()
56
+
57
+ # Distribution Tweak (Simple expander for now)
58
+ with st.expander("Distribution Settings", expanded=False):
59
+ if col.type in ["int", "float"]:
60
+ min_v = st.number_input("Min", value=float(col.distribution_params.get('min', 0)), key=f"min_{table.name}_{i}")
61
+ max_v = st.number_input("Max", value=float(col.distribution_params.get('max', 100)), key=f"max_{table.name}_{i}")
62
+ col.distribution_params['min'] = min_v
63
+ col.distribution_params['max'] = max_v
64
+ elif col.type == "categorical":
65
+ cats = st.text_input("Categories (comma sep)", value=",".join(col.distribution_params.get('choices', [])), key=f"cat_{table.name}_{i}")
66
+ col.distribution_params['choices'] = [c.strip() for c in cats.split(",")]
67
+
68
+ # Add New Column Button
69
+ if st.button("+ Add Column", key=f"add_col_{table.name}"):
70
+ new_col = Column(
71
+ name=f"new_column_{len(columns)+1}",
72
+ type="text",
73
+ distribution_params={}
74
+ )
75
+ columns.append(new_col)
76
+ st.rerun()
77
+
78
+ # Save/Close
79
+ if st.button("Done Editing", type="primary", use_container_width=True):
80
+ StudioStore.set("selected_table", None)
81
+ st.rerun()
@@ -0,0 +1,35 @@
1
+ import streamlit as st
2
+ from misata.studio.state.store import StudioStore
3
+
4
+ def render_sidebar():
5
+ """Render the sidebar with navigation and branding."""
6
+ with st.sidebar:
7
+ # 1. Branding
8
+ st.markdown('<div class="brand-logo">Misata</div>', unsafe_allow_html=True)
9
+ st.markdown('<p style="font-size: 0.8rem; color: var(--text-tertiary); margin-top: -10px;">SYNTHETIC STUDIO PRO</p>', unsafe_allow_html=True)
10
+ st.markdown("---")
11
+
12
+ # 2. Navigation
13
+ current_tab = StudioStore.get("active_tab", "Schema")
14
+
15
+ # Helper for nav buttons
16
+ def nav_button(label, key, icon=""):
17
+ if st.button(f"{label}", key=key, use_container_width=True):
18
+ StudioStore.set("active_tab", label.replace(" Builder", "").replace(" Curve", ""))
19
+ st.rerun()
20
+
21
+ nav_button("Schema Builder", "nav_schema")
22
+ nav_button("Outcome Curve", "nav_outcome")
23
+ nav_button("Configure", "nav_config")
24
+ nav_button("Generate", "nav_gen")
25
+
26
+ st.markdown("---")
27
+
28
+ # 3. Status
29
+ st.markdown("""
30
+ <div style="background: rgba(255,255,255,0.1); padding: 1rem; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1);">
31
+ <div style="font-size: 0.75rem; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.05em;">Status</div>
32
+ <div style="color: #FFFFFF !important; font-weight: 500; margin-top: 4px;">API Connected</div>
33
+ <div style="font-size: 0.7rem; color: rgba(255,255,255,0.8) !important; margin-top: 4px;">v2.0.0 (World Class)</div>
34
+ </div>
35
+ """, unsafe_allow_html=True)