scitex 2.17.0__py3-none-any.whl → 2.17.3__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 (73) hide show
  1. scitex/_dev/__init__.py +122 -0
  2. scitex/_dev/_config.py +391 -0
  3. scitex/_dev/_dashboard/__init__.py +11 -0
  4. scitex/_dev/_dashboard/_app.py +89 -0
  5. scitex/_dev/_dashboard/_routes.py +169 -0
  6. scitex/_dev/_dashboard/_scripts.py +301 -0
  7. scitex/_dev/_dashboard/_styles.py +205 -0
  8. scitex/_dev/_dashboard/_templates.py +117 -0
  9. scitex/_dev/_dashboard/static/version-dashboard-favicon.svg +12 -0
  10. scitex/_dev/_ecosystem.py +109 -0
  11. scitex/_dev/_github.py +360 -0
  12. scitex/_dev/_mcp/__init__.py +11 -0
  13. scitex/_dev/_mcp/handlers.py +182 -0
  14. scitex/_dev/_ssh.py +332 -0
  15. scitex/_dev/_versions.py +272 -0
  16. scitex/_mcp_tools/__init__.py +2 -0
  17. scitex/_mcp_tools/dev.py +186 -0
  18. scitex/audio/_audio_check.py +84 -41
  19. scitex/cli/capture.py +45 -22
  20. scitex/cli/dev.py +494 -0
  21. scitex/cli/main.py +2 -0
  22. scitex/cli/stats.py +48 -20
  23. scitex/cli/verify.py +33 -36
  24. scitex/plt/__init__.py +16 -6
  25. scitex/scholar/url_finder/.tmp/open_url/KNOWN_RESOLVERS.py +462 -0
  26. scitex/scholar/url_finder/.tmp/open_url/README.md +223 -0
  27. scitex/scholar/url_finder/.tmp/open_url/_DOIToURLResolver.py +694 -0
  28. scitex/scholar/url_finder/.tmp/open_url/_OpenURLResolver.py +1160 -0
  29. scitex/scholar/url_finder/.tmp/open_url/_ResolverLinkFinder.py +344 -0
  30. scitex/scholar/url_finder/.tmp/open_url/__init__.py +24 -0
  31. scitex/template/__init__.py +18 -1
  32. scitex/template/clone_research_minimal.py +111 -0
  33. scitex/verify/README.md +0 -12
  34. scitex/verify/__init__.py +0 -4
  35. scitex/verify/_visualize.py +0 -4
  36. scitex/verify/_viz/__init__.py +0 -18
  37. {scitex-2.17.0.dist-info → scitex-2.17.3.dist-info}/METADATA +2 -1
  38. {scitex-2.17.0.dist-info → scitex-2.17.3.dist-info}/RECORD +41 -49
  39. scitex/dev/plt/data/mpl/PLOTTING_FUNCTIONS.yaml +0 -90
  40. scitex/dev/plt/data/mpl/PLOTTING_SIGNATURES.yaml +0 -1571
  41. scitex/dev/plt/data/mpl/PLOTTING_SIGNATURES_DETAILED.yaml +0 -6262
  42. scitex/dev/plt/data/mpl/SIGNATURES_FLATTENED.yaml +0 -1274
  43. scitex/dev/plt/data/mpl/dir_ax.txt +0 -459
  44. scitex/scholar/data/.gitkeep +0 -0
  45. scitex/scholar/data/README.md +0 -44
  46. scitex/scholar/data/bib_files/bibliography.bib +0 -1952
  47. scitex/scholar/data/bib_files/neurovista.bib +0 -277
  48. scitex/scholar/data/bib_files/neurovista_enriched.bib +0 -441
  49. scitex/scholar/data/bib_files/neurovista_enriched_enriched.bib +0 -441
  50. scitex/scholar/data/bib_files/neurovista_processed.bib +0 -338
  51. scitex/scholar/data/bib_files/openaccess.bib +0 -89
  52. scitex/scholar/data/bib_files/pac-seizure_prediction_enriched.bib +0 -2178
  53. scitex/scholar/data/bib_files/pac.bib +0 -698
  54. scitex/scholar/data/bib_files/pac_enriched.bib +0 -1061
  55. scitex/scholar/data/bib_files/pac_processed.bib +0 -0
  56. scitex/scholar/data/bib_files/pac_titles.txt +0 -75
  57. scitex/scholar/data/bib_files/paywalled.bib +0 -98
  58. scitex/scholar/data/bib_files/related-papers-by-coauthors.bib +0 -58
  59. scitex/scholar/data/bib_files/related-papers-by-coauthors_enriched.bib +0 -87
  60. scitex/scholar/data/bib_files/seizure_prediction.bib +0 -694
  61. scitex/scholar/data/bib_files/seizure_prediction_processed.bib +0 -0
  62. scitex/scholar/data/bib_files/test_complete_enriched.bib +0 -437
  63. scitex/scholar/data/bib_files/test_final_enriched.bib +0 -437
  64. scitex/scholar/data/bib_files/test_seizure.bib +0 -46
  65. scitex/scholar/data/impact_factor/JCR_IF_2022.xlsx +0 -0
  66. scitex/scholar/data/impact_factor/JCR_IF_2024.db +0 -0
  67. scitex/scholar/data/impact_factor/JCR_IF_2024.xlsx +0 -0
  68. scitex/scholar/data/impact_factor/JCR_IF_2024_v01.db +0 -0
  69. scitex/scholar/data/impact_factor.db +0 -0
  70. scitex/verify/_viz/_plotly.py +0 -193
  71. {scitex-2.17.0.dist-info → scitex-2.17.3.dist-info}/WHEEL +0 -0
  72. {scitex-2.17.0.dist-info → scitex-2.17.3.dist-info}/entry_points.txt +0 -0
  73. {scitex-2.17.0.dist-info → scitex-2.17.3.dist-info}/licenses/LICENSE +0 -0
@@ -1,193 +0,0 @@
1
- #!/usr/bin/env python3
2
- # Timestamp: "2026-02-01 (ywatanabe)"
3
- # File: /home/ywatanabe/proj/scitex-python/src/scitex/verify/_viz/_plotly.py
4
- """Plotly-based interactive visualization for verification DAG."""
5
-
6
- from __future__ import annotations
7
-
8
- from pathlib import Path
9
- from typing import Optional, Union
10
-
11
- from .._chain import verify_chain, verify_run
12
- from .._db import get_db
13
-
14
-
15
- def generate_plotly_dag(
16
- session_id: Optional[str] = None,
17
- target_file: Optional[str] = None,
18
- title: str = "Verification DAG",
19
- ) -> go.Figure:
20
- """
21
- Generate interactive Plotly figure for verification DAG.
22
-
23
- Parameters
24
- ----------
25
- session_id : str, optional
26
- Start from this session
27
- target_file : str, optional
28
- Start from session that produced this file
29
- title : str, optional
30
- Title for the figure
31
-
32
- Returns
33
- -------
34
- plotly.graph_objects.Figure
35
- Interactive Plotly figure
36
- """
37
- try:
38
- import plotly.graph_objects as go
39
- except ImportError:
40
- raise ImportError("plotly required: pip install plotly")
41
-
42
- db = get_db()
43
- nodes = []
44
- edges = []
45
- node_colors = []
46
- node_texts = []
47
-
48
- if target_file:
49
- chain = verify_chain(target_file)
50
- for i, run in enumerate(chain.runs):
51
- script_name = Path(run.script_path).name if run.script_path else "unknown"
52
- nodes.append(run.session_id)
53
- node_texts.append(f"{script_name}<br>{run.session_id[:20]}...")
54
- node_colors.append("#90EE90" if run.is_verified else "#FFB6C1")
55
-
56
- for i in range(len(chain.runs) - 1):
57
- edges.append((i + 1, i)) # parent -> child
58
-
59
- elif session_id:
60
- chain_ids = db.get_chain(session_id)
61
- for i, sid in enumerate(chain_ids):
62
- run = db.get_run(sid)
63
- verification = verify_run(sid)
64
- script_name = (
65
- Path(run["script_path"]).name
66
- if run and run.get("script_path")
67
- else "unknown"
68
- )
69
- nodes.append(sid)
70
- node_texts.append(f"{script_name}<br>{sid[:20]}...")
71
- node_colors.append("#90EE90" if verification.is_verified else "#FFB6C1")
72
-
73
- for i in range(len(chain_ids) - 1):
74
- edges.append((i + 1, i))
75
-
76
- if not nodes:
77
- nodes = ["No data"]
78
- node_texts = ["No runs found"]
79
- node_colors = ["#CCCCCC"]
80
-
81
- # Create layout positions (vertical flow)
82
- n = len(nodes)
83
- x_pos = [0.5] * n
84
- y_pos = [1 - i / max(n - 1, 1) for i in range(n)]
85
-
86
- # Create edge traces
87
- edge_x = []
88
- edge_y = []
89
- for src, dst in edges:
90
- edge_x.extend([x_pos[src], x_pos[dst], None])
91
- edge_y.extend([y_pos[src], y_pos[dst], None])
92
-
93
- edge_trace = go.Scatter(
94
- x=edge_x,
95
- y=edge_y,
96
- line=dict(width=2, color="#888"),
97
- hoverinfo="none",
98
- mode="lines",
99
- )
100
-
101
- # Create node trace
102
- node_trace = go.Scatter(
103
- x=x_pos,
104
- y=y_pos,
105
- mode="markers+text",
106
- hoverinfo="text",
107
- text=node_texts,
108
- textposition="middle right",
109
- marker=dict(
110
- size=30,
111
- color=node_colors,
112
- line=dict(width=2, color="#333"),
113
- ),
114
- )
115
-
116
- # Create figure
117
- fig = go.Figure(
118
- data=[edge_trace, node_trace],
119
- layout=go.Layout(
120
- title=dict(text=title, font=dict(size=16)),
121
- showlegend=False,
122
- hovermode="closest",
123
- xaxis=dict(showgrid=False, zeroline=False, showticklabels=False),
124
- yaxis=dict(showgrid=False, zeroline=False, showticklabels=False),
125
- margin=dict(l=40, r=40, t=60, b=40),
126
- plot_bgcolor="white",
127
- annotations=[
128
- dict(
129
- text="🟢 Verified | 🔴 Failed",
130
- showarrow=False,
131
- xref="paper",
132
- yref="paper",
133
- x=0,
134
- y=-0.1,
135
- font=dict(size=12),
136
- )
137
- ],
138
- ),
139
- )
140
-
141
- return fig
142
-
143
-
144
- def render_plotly_dag(
145
- output_path: Union[str, Path],
146
- session_id: Optional[str] = None,
147
- target_file: Optional[str] = None,
148
- title: str = "Verification DAG",
149
- ) -> Path:
150
- """
151
- Render verification DAG using Plotly.
152
-
153
- Parameters
154
- ----------
155
- output_path : str or Path
156
- Output file path (.html or .png)
157
- session_id : str, optional
158
- Start from this session
159
- target_file : str, optional
160
- Start from session that produced this file
161
- title : str, optional
162
- Title for the visualization
163
-
164
- Returns
165
- -------
166
- Path
167
- Path to the generated file
168
- """
169
- output_path = Path(output_path)
170
- output_path.parent.mkdir(parents=True, exist_ok=True)
171
-
172
- fig = generate_plotly_dag(
173
- session_id=session_id,
174
- target_file=target_file,
175
- title=title,
176
- )
177
-
178
- ext = output_path.suffix.lower()
179
-
180
- if ext == ".html":
181
- fig.write_html(str(output_path))
182
- elif ext == ".png":
183
- fig.write_image(str(output_path))
184
- elif ext == ".svg":
185
- fig.write_image(str(output_path))
186
- else:
187
- fig.write_html(str(output_path.with_suffix(".html")))
188
- return output_path.with_suffix(".html")
189
-
190
- return output_path
191
-
192
-
193
- # EOF