discovery-engine-api 0.2.86__tar.gz → 0.2.88__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: discovery-engine-api
3
- Version: 0.2.86
3
+ Version: 0.2.88
4
4
  Summary: Python SDK for Disco API
5
5
  Project-URL: Homepage, https://www.leap-labs.com
6
6
  Project-URL: Documentation, https://disco.leap-labs.com/llms-full.txt
@@ -1,6 +1,6 @@
1
1
  """Disco Python SDK."""
2
2
 
3
- __version__ = "0.2.86"
3
+ __version__ = "0.2.88"
4
4
 
5
5
  from discovery.client import Engine
6
6
  from discovery.types import (
@@ -555,7 +555,9 @@ class Engine:
555
555
  self._log(f"Run completed in {elapsed:.1f}s | {pattern_str}")
556
556
  for hint in result.hints:
557
557
  self._log(hint)
558
- if result.report_url:
558
+ if result.dashboard_urls:
559
+ self._log(f"Report: {result.dashboard_urls['summary']['url']}")
560
+ elif result.report_url:
559
561
  self._log(f"Report: {result.report_url}")
560
562
  return result
561
563
  elif result.status == "failed":
@@ -1043,6 +1045,29 @@ class Engine:
1043
1045
  if not report_url and data.get("report_id"):
1044
1046
  report_url = f"{self.dashboard_url}/reports/{data['report_id']}"
1045
1047
 
1048
+ # Build dashboard_urls from API response, or construct from report_id
1049
+ dashboard_urls = data.get("dashboard_urls")
1050
+ if not dashboard_urls and data.get("report_id"):
1051
+ base = f"{self.dashboard_url}/reports/{data['report_id']}"
1052
+ dashboard_urls = {
1053
+ "summary": {
1054
+ "url": f"{base}/summary",
1055
+ "description": "AI-generated overview with key insights, novel findings, and a plain-language explanation of the most important findings.",
1056
+ },
1057
+ "patterns": {
1058
+ "url": f"{base}/patterns",
1059
+ "description": "Full list of discovered patterns with conditions, effect sizes, p-values, support counts, novelty scores, and academic citations. Interactive visualisations for each pattern.",
1060
+ },
1061
+ "features": {
1062
+ "url": f"{base}/features",
1063
+ "description": "Feature importances, feature statistics and distribution plots, and correlation matrix.",
1064
+ },
1065
+ "territory": {
1066
+ "url": f"{base}/territory",
1067
+ "description": "Interactive 3D map showing how patterns select different regions of the data.",
1068
+ },
1069
+ }
1070
+
1046
1071
  hints = data.get("hints", [])
1047
1072
  hidden_deep_count = data.get("hidden_deep_count", 0)
1048
1073
  hidden_deep_novel_count = data.get("hidden_deep_novel_count", 0)
@@ -1074,6 +1099,7 @@ class Engine:
1074
1099
  estimated_wait_seconds=data.get("estimated_wait_seconds"),
1075
1100
  error_message=data.get("error_message"),
1076
1101
  report_url=report_url,
1102
+ dashboard_urls=dashboard_urls,
1077
1103
  hints=hints,
1078
1104
  hidden_deep_count=hidden_deep_count,
1079
1105
  hidden_deep_novel_count=hidden_deep_novel_count,
@@ -87,6 +87,7 @@ def _format_result(result: Any) -> str:
87
87
  "status": result.status,
88
88
  "patterns": patterns,
89
89
  "report_url": result.report_url,
90
+ "dashboard_urls": result.dashboard_urls,
90
91
  }
91
92
  if result.summary:
92
93
  output["summary"] = result.summary.overview
@@ -96,6 +96,7 @@ def _format_result(result: Any) -> str:
96
96
  "status": result.status,
97
97
  "patterns": patterns,
98
98
  "report_url": result.report_url,
99
+ "dashboard_urls": result.dashboard_urls,
99
100
  }
100
101
  if result.summary:
101
102
  output["summary"] = result.summary.overview
@@ -212,6 +212,9 @@ class EngineResult:
212
212
  # Shareable link to the interactive web report
213
213
  report_url: Optional[str] = None
214
214
 
215
+ # Direct links to each dashboard page
216
+ dashboard_urls: Optional[Dict[str, Dict[str, str]]] = None
217
+
215
218
  # Upgrade hints (non-empty for free-tier users with hidden deep patterns)
216
219
  hints: List[str] = field(default_factory=list)
217
220
  hidden_deep_count: int = 0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "discovery-engine-api"
3
- version = "0.2.86"
3
+ version = "0.2.88"
4
4
  description = "Python SDK for Disco API"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"