syntaxmatrix 2.2.6__tar.gz → 2.2.8__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.
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/PKG-INFO +1 -1
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/SyntaxMatrix.egg-info/PKG-INFO +1 -1
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/setup.py +1 -1
- syntaxmatrix-2.2.8/syntaxmatrix/project_root.py +135 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/routes.py +1 -0
- syntaxmatrix-2.2.6/syntaxmatrix/project_root.py +0 -61
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/LICENSE.txt +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/README.md +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/SyntaxMatrix.egg-info/SOURCES.txt +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/SyntaxMatrix.egg-info/dependency_links.txt +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/SyntaxMatrix.egg-info/requires.txt +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/SyntaxMatrix.egg-info/top_level.txt +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/pyproject.toml +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/setup.cfg +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/__init__.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/auth.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/bootstrap.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/commentary.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/core.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/db.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/display.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/emailer.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/file_processor.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/generate_page.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/gpt_models_latest.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/history_store.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/kernel_manager.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/llm_store.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/model_templates.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/models.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/plottings.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/profiles.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/session.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/settings/__init__.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/settings/default.yaml +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/settings/logging.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/settings/model_map.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/settings/prompts.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/settings/string_navbar.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/smiv.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/smpv.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/static/css/style.css +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/static/docs.md +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/static/icons/favicon.png +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/static/icons/hero_bg.jpg +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/static/icons/logo.png +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/static/icons/svg_497526.svg +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/static/icons/svg_497528.svg +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/static/js/chat.js +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/static/js/sidebar.js +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/static/js/widgets.js +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/templates/code_cell.html +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/templates/dashboard.html +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/templates/docs.html +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/templates/error.html +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/templates/login.html +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/templates/register.html +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/themes.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/ui_modes.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/utils.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/vector_db.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/vectordb/__init__.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/vectordb/adapters/__init__.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/vectordb/adapters/milvus_adapter.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/vectordb/adapters/pgvector_adapter.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/vectordb/adapters/sqlite_adapter.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/vectordb/base.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/vectordb/registry.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/vectorizer.py +0 -0
- {syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/workspace_db.py +0 -0
|
@@ -8,7 +8,7 @@ with open(os.path.join(this_directory, "README.md"), encoding="utf-8") as f:
|
|
|
8
8
|
|
|
9
9
|
setup(
|
|
10
10
|
name="syntaxmatrix",
|
|
11
|
-
version="2.2.
|
|
11
|
+
version="2.2.8",
|
|
12
12
|
author="Bob Nti",
|
|
13
13
|
author_email="bob.nti@syntaxmatrix.com",
|
|
14
14
|
description="SyntaxMUI: A customizable framework for Python AI Assistant Projects.",
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# syntaxmatrix/project_root.py
|
|
2
|
+
import os
|
|
3
|
+
import inspect
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
import syntaxmatrix
|
|
6
|
+
|
|
7
|
+
def scandir() -> Path:
|
|
8
|
+
framework_dir = Path(syntaxmatrix.__file__).resolve().parent
|
|
9
|
+
for frame in inspect.stack():
|
|
10
|
+
fname = frame.filename
|
|
11
|
+
if not fname or not isinstance(fname, str):
|
|
12
|
+
continue
|
|
13
|
+
p = Path(fname)
|
|
14
|
+
try:
|
|
15
|
+
if p.is_file() and framework_dir not in p.parents:
|
|
16
|
+
return p.parent
|
|
17
|
+
except Exception:
|
|
18
|
+
continue
|
|
19
|
+
return framework_dir
|
|
20
|
+
|
|
21
|
+
def _writable(p: Path) -> bool:
|
|
22
|
+
try:
|
|
23
|
+
p.mkdir(parents=True, exist_ok=True)
|
|
24
|
+
test = p / ".smx_write_test"
|
|
25
|
+
with open(test, "w", encoding="utf-8") as f:
|
|
26
|
+
f.write("ok")
|
|
27
|
+
test.unlink(missing_ok=True)
|
|
28
|
+
return True
|
|
29
|
+
except Exception:
|
|
30
|
+
return False
|
|
31
|
+
|
|
32
|
+
def detect_project_root() -> Path:
|
|
33
|
+
"""
|
|
34
|
+
Return the consumer project's 'syntaxmatrixdir' folder, creating it if necessary.
|
|
35
|
+
Resolution order:
|
|
36
|
+
1) SMX_CLIENT_DIR (if set and writable)
|
|
37
|
+
2) ./syntaxmatrixdir under current working dir (if writable)
|
|
38
|
+
3) GCS Fuse standard mounts (if present & writable)
|
|
39
|
+
4) /tmp/syntaxmatrixdir (always writable on Cloud Run)
|
|
40
|
+
5) Fallback near the first non-framework caller (if writable)
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
# 1) Explicit override (keeps your local stable; handy in Cloud Run)
|
|
44
|
+
env = os.environ.get("SMX_CLIENT_DIR")
|
|
45
|
+
if env:
|
|
46
|
+
p = Path(env)
|
|
47
|
+
if _writable(p):
|
|
48
|
+
return p
|
|
49
|
+
|
|
50
|
+
# 2) CWD-based
|
|
51
|
+
cwd = Path.cwd()
|
|
52
|
+
p = cwd / "syntaxmatrixdir"
|
|
53
|
+
if _writable(p):
|
|
54
|
+
return p
|
|
55
|
+
|
|
56
|
+
# 3) Common GCS Fuse mount points (Gen2)
|
|
57
|
+
for candidate in [Path("/mnt/gcs/syntaxmatrixdir"),
|
|
58
|
+
Path("/mnt/disks/gcs/syntaxmatrixdir")]:
|
|
59
|
+
if _writable(candidate):
|
|
60
|
+
return candidate
|
|
61
|
+
|
|
62
|
+
# 4) Cloud Run safe default
|
|
63
|
+
tmp = Path("/tmp/syntaxmatrixdir")
|
|
64
|
+
if _writable(tmp):
|
|
65
|
+
return tmp
|
|
66
|
+
|
|
67
|
+
# 5) Fallback alongside caller
|
|
68
|
+
fallback = scandir() / "syntaxmatrixdir"
|
|
69
|
+
if _writable(fallback):
|
|
70
|
+
return fallback
|
|
71
|
+
|
|
72
|
+
# Last resort: return /tmp anyway (avoids import-time crashes)
|
|
73
|
+
return tmp
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
# import os
|
|
78
|
+
# import inspect
|
|
79
|
+
# from pathlib import Path
|
|
80
|
+
# import syntaxmatrix
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
# def scandir() -> Path:
|
|
84
|
+
# """
|
|
85
|
+
# Find the first stack frame outside of the syntaxmatrix package
|
|
86
|
+
# whose filename is a real .py file on disk, and return its parent dir.
|
|
87
|
+
# """
|
|
88
|
+
# framework_dir = Path(syntaxmatrix.__file__).resolve().parent
|
|
89
|
+
|
|
90
|
+
# for frame in inspect.stack():
|
|
91
|
+
# fname = frame.filename
|
|
92
|
+
|
|
93
|
+
# # 1) skip internal frames (<frozen ...>) or empty names
|
|
94
|
+
# if not fname or fname.startswith("<"):
|
|
95
|
+
# continue
|
|
96
|
+
|
|
97
|
+
# candidate = Path(fname)
|
|
98
|
+
|
|
99
|
+
# # 2) skip non-.py or non-existent paths
|
|
100
|
+
# if candidate.suffix != ".py" or not candidate.exists():
|
|
101
|
+
# continue
|
|
102
|
+
|
|
103
|
+
# try:
|
|
104
|
+
# candidate = candidate.resolve()
|
|
105
|
+
# except (OSError, RuntimeError):
|
|
106
|
+
# # if for some reason resolve() fails, skip it
|
|
107
|
+
# continue
|
|
108
|
+
|
|
109
|
+
# # 3) skip anything inside the framework itself
|
|
110
|
+
# if framework_dir in candidate.parents:
|
|
111
|
+
# continue
|
|
112
|
+
|
|
113
|
+
# # FOUND: a user file (e.g. app.py, manage.py, etc.)
|
|
114
|
+
# return candidate.parent
|
|
115
|
+
|
|
116
|
+
# # fallback: whatever cwd() is
|
|
117
|
+
# return Path(os.getcwd()).resolve()
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
# def detect_project_root() -> Path:
|
|
121
|
+
# """
|
|
122
|
+
# Returns the consumer project's syntaxmatrixdir folder, creating it if necessary.
|
|
123
|
+
# All framework data & uploads live here.
|
|
124
|
+
# """
|
|
125
|
+
# # 1) First check the CWD (where your app:app is running)
|
|
126
|
+
# cwd = Path.cwd()
|
|
127
|
+
# candidate = cwd / "syntaxmatrixdir"
|
|
128
|
+
# if candidate.exists():
|
|
129
|
+
# return candidate
|
|
130
|
+
|
|
131
|
+
# # 2) Otherwise fall back to the old logic (e.g. inside site-packages)
|
|
132
|
+
# proj_root = scandir()
|
|
133
|
+
# fw_root = proj_root / "syntaxmatrixdir"
|
|
134
|
+
# fw_root.mkdir(exist_ok=True)
|
|
135
|
+
# return fw_root
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
# syntaxmatrix/project_root.py
|
|
2
|
-
|
|
3
|
-
import os
|
|
4
|
-
import inspect
|
|
5
|
-
from pathlib import Path
|
|
6
|
-
import syntaxmatrix
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
def scandir() -> Path:
|
|
10
|
-
"""
|
|
11
|
-
Find the first stack frame outside of the syntaxmatrix package
|
|
12
|
-
whose filename is a real .py file on disk, and return its parent dir.
|
|
13
|
-
"""
|
|
14
|
-
framework_dir = Path(syntaxmatrix.__file__).resolve().parent
|
|
15
|
-
|
|
16
|
-
for frame in inspect.stack():
|
|
17
|
-
fname = frame.filename
|
|
18
|
-
|
|
19
|
-
# 1) skip internal frames (<frozen ...>) or empty names
|
|
20
|
-
if not fname or fname.startswith("<"):
|
|
21
|
-
continue
|
|
22
|
-
|
|
23
|
-
candidate = Path(fname)
|
|
24
|
-
|
|
25
|
-
# 2) skip non-.py or non-existent paths
|
|
26
|
-
if candidate.suffix != ".py" or not candidate.exists():
|
|
27
|
-
continue
|
|
28
|
-
|
|
29
|
-
try:
|
|
30
|
-
candidate = candidate.resolve()
|
|
31
|
-
except (OSError, RuntimeError):
|
|
32
|
-
# if for some reason resolve() fails, skip it
|
|
33
|
-
continue
|
|
34
|
-
|
|
35
|
-
# 3) skip anything inside the framework itself
|
|
36
|
-
if framework_dir in candidate.parents:
|
|
37
|
-
continue
|
|
38
|
-
|
|
39
|
-
# FOUND: a user file (e.g. app.py, manage.py, etc.)
|
|
40
|
-
return candidate.parent
|
|
41
|
-
|
|
42
|
-
# fallback: whatever cwd() is
|
|
43
|
-
return Path(os.getcwd()).resolve()
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
def detect_project_root() -> Path:
|
|
47
|
-
"""
|
|
48
|
-
Returns the consumer project's syntaxmatrixdir folder, creating it if necessary.
|
|
49
|
-
All framework data & uploads live here.
|
|
50
|
-
"""
|
|
51
|
-
# 1) First check the CWD (where your app:app is running)
|
|
52
|
-
cwd = Path.cwd()
|
|
53
|
-
candidate = cwd / "syntaxmatrixdir"
|
|
54
|
-
if candidate.exists():
|
|
55
|
-
return candidate
|
|
56
|
-
|
|
57
|
-
# 2) Otherwise fall back to the old logic (e.g. inside site-packages)
|
|
58
|
-
proj_root = scandir()
|
|
59
|
-
fw_root = proj_root / "syntaxmatrixdir"
|
|
60
|
-
fw_root.mkdir(exist_ok=True)
|
|
61
|
-
return fw_root
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{syntaxmatrix-2.2.6 → syntaxmatrix-2.2.8}/syntaxmatrix/vectordb/adapters/pgvector_adapter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|