pythia-plsql 0.4.2__tar.gz → 0.4.4__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.
Files changed (39) hide show
  1. {pythia_plsql-0.4.2/scripts/pythia_plsql.egg-info → pythia_plsql-0.4.4}/PKG-INFO +6 -1
  2. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/README.md +5 -0
  3. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/pyproject.toml +1 -1
  4. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/scripts/pythia.py +48 -0
  5. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4/scripts/pythia_plsql.egg-info}/PKG-INFO +6 -1
  6. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/tests/test_install.py +25 -0
  7. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/LICENSE +0 -0
  8. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/queries/compile-errors.sql +0 -0
  9. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/queries/dependencies.sql +0 -0
  10. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/queries/impact.sql +0 -0
  11. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/queries/invalid-objects.sql +0 -0
  12. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/queries/name-occupants.sql +0 -0
  13. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/queries/object-source.sql +0 -0
  14. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/queries/plscope-enabled.sql +0 -0
  15. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/queries/plscope-statements.sql +0 -0
  16. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/queries/plscope-usages.sql +0 -0
  17. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/queries/session-privileges.sql +0 -0
  18. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/queries/similar-candidates.sql +0 -0
  19. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/queries/source.sql +0 -0
  20. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/scripts/pythia_plsql.egg-info/SOURCES.txt +0 -0
  21. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/scripts/pythia_plsql.egg-info/dependency_links.txt +0 -0
  22. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/scripts/pythia_plsql.egg-info/entry_points.txt +0 -0
  23. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/scripts/pythia_plsql.egg-info/requires.txt +0 -0
  24. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/scripts/pythia_plsql.egg-info/top_level.txt +0 -0
  25. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/setup.cfg +0 -0
  26. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/skills/pythia-apply/SKILL.md +0 -0
  27. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/skills/pythia-explore/SKILL.md +0 -0
  28. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/skills/pythia-explore/reference/data-dictionary.md +0 -0
  29. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/skills/pythia-impact/SKILL.md +0 -0
  30. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/skills/pythia-review/SKILL.md +0 -0
  31. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/skills/pythia-review/reference/antipatterns.md +0 -0
  32. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/skills/pythia-setup/SKILL.md +0 -0
  33. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/skills/pythia-skill-author/SKILL.md +0 -0
  34. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/skills/pythia-write/SKILL.md +0 -0
  35. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/skills/pythia-write/reference/patterns.md +0 -0
  36. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/tests/test_phase1.py +0 -0
  37. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/tests/test_phase2.py +0 -0
  38. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/tests/test_phase3.py +0 -0
  39. {pythia_plsql-0.4.2 → pythia_plsql-0.4.4}/tests/test_phase5.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pythia-plsql
3
- Version: 0.4.2
3
+ Version: 0.4.4
4
4
  Summary: PL/SQL development for AI agents on Oracle Database - expert data-dictionary queries, impact analysis, and a snapshot-verified write path with honest rollback.
5
5
  License: MIT
6
6
  Project-URL: Homepage, https://github.com/thaildhe172591/pythia
@@ -151,6 +151,11 @@ hand with
151
151
  works just as well.
152
152
  `pythia check` warns when the session runs with more power than the task needs.
153
153
 
154
+ Using Claude Code? [`examples/claude-code-settings.example.json`](examples/claude-code-settings.example.json)
155
+ stops it prompting for the read-only commands and asks it to pause on
156
+ writes — optional, and yours to install
157
+ ([why pythia does not](GUIDE.md#11-optional-claude-code-permission-settings)).
158
+
154
159
  Per-group write policy, `.pythia/policy.json` (defaults shown):
155
160
 
156
161
  | Group | Default | Is rollback real? |
@@ -137,6 +137,11 @@ hand with
137
137
  works just as well.
138
138
  `pythia check` warns when the session runs with more power than the task needs.
139
139
 
140
+ Using Claude Code? [`examples/claude-code-settings.example.json`](examples/claude-code-settings.example.json)
141
+ stops it prompting for the read-only commands and asks it to pause on
142
+ writes — optional, and yours to install
143
+ ([why pythia does not](GUIDE.md#11-optional-claude-code-permission-settings)).
144
+
140
145
  Per-group write policy, `.pythia/policy.json` (defaults shown):
141
146
 
142
147
  | Group | Default | Is rollback real? |
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pythia-plsql"
7
- version = "0.4.2"
7
+ version = "0.4.4"
8
8
  description = "PL/SQL development for AI agents on Oracle Database - expert data-dictionary queries, impact analysis, and a snapshot-verified write path with honest rollback."
9
9
  readme = "README.md"
10
10
  license = { text = "MIT" }
@@ -185,6 +185,49 @@ def paint_diff_line(ln, enabled):
185
185
  return ln
186
186
 
187
187
 
188
+ def installed_scripts_dir():
189
+ """The directory pip put our executable in. The default scheme is wrong
190
+ for `pip install --user` — the common case on Windows — so the candidate
191
+ that actually holds the executable wins."""
192
+ import sysconfig
193
+ candidates = [sysconfig.get_path("scripts")]
194
+ try:
195
+ candidates.append(
196
+ sysconfig.get_path("scripts", sysconfig.get_preferred_scheme("user")))
197
+ except (AttributeError, KeyError): # very old Python: no user scheme
198
+ pass
199
+ exe = "pythia.exe" if os.name == "nt" else "pythia"
200
+ for d in candidates:
201
+ if d and (pathlib.Path(d) / exe).exists():
202
+ return d
203
+ return candidates[-1] if candidates else None
204
+
205
+
206
+ def entry_point_hint(found, scripts_dir):
207
+ """What to say when `pythia` will not resolve as a command. pip installs
208
+ the executable into a scripts directory that is often not on PATH — the
209
+ default for `pip install --user` on Windows — and the shell's
210
+ CommandNotFound names nothing that helps. Seen on a real machine, at the
211
+ step immediately after the install the docs tell you to run."""
212
+ if found:
213
+ return None
214
+ out = ["`pythia` is installed but not on your PATH."]
215
+ if scripts_dir:
216
+ out.append(" It lives in: " + str(scripts_dir))
217
+ if os.name == "nt":
218
+ out.append(" Add it once, in PowerShell, then reopen the terminal:")
219
+ out.append(" [Environment]::SetEnvironmentVariable('PATH',")
220
+ out.append(" \"$env:PATH;" + str(scripts_dir) + "\", 'User')")
221
+ else:
222
+ out.append(" Add it to your shell profile:")
223
+ out.append(" export PATH=\"$PATH:" + str(scripts_dir) + "\"")
224
+ else:
225
+ out.append(" Add pip's scripts directory to PATH.")
226
+ out.append("Either way, this works right now, PATH or no PATH:")
227
+ out.append(" " + pathlib.Path(sys.executable).stem + " -m pythia <command>")
228
+ return "\n".join(out)
229
+
230
+
188
231
  def invocation():
189
232
  """How to invoke this tool, exactly as the user actually ran it. Every
190
233
  printed command must be paste-able: a bare `pythia ...` is
@@ -1930,6 +1973,11 @@ def cmd_install(conn, schema, ns):
1930
1973
  clean_legacy_skills(ns.project_root)
1931
1974
  print(f"\nNext: fill in {path}")
1932
1975
  print(f"Then: {invocation()} check")
1976
+ hint = entry_point_hint(shutil.which("pythia"),
1977
+ installed_scripts_dir())
1978
+ if hint:
1979
+ print()
1980
+ print(hint)
1933
1981
 
1934
1982
 
1935
1983
  COMMANDS = {"check": cmd_check, "ls": cmd_ls, "src": cmd_src, "args": cmd_args,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pythia-plsql
3
- Version: 0.4.2
3
+ Version: 0.4.4
4
4
  Summary: PL/SQL development for AI agents on Oracle Database - expert data-dictionary queries, impact analysis, and a snapshot-verified write path with honest rollback.
5
5
  License: MIT
6
6
  Project-URL: Homepage, https://github.com/thaildhe172591/pythia
@@ -151,6 +151,11 @@ hand with
151
151
  works just as well.
152
152
  `pythia check` warns when the session runs with more power than the task needs.
153
153
 
154
+ Using Claude Code? [`examples/claude-code-settings.example.json`](examples/claude-code-settings.example.json)
155
+ stops it prompting for the read-only commands and asks it to pause on
156
+ writes — optional, and yours to install
157
+ ([why pythia does not](GUIDE.md#11-optional-claude-code-permission-settings)).
158
+
154
159
  Per-group write policy, `.pythia/policy.json` (defaults shown):
155
160
 
156
161
  | Group | Default | Is rollback real? |
@@ -183,6 +183,31 @@ def test_one_version_across_every_manifest():
183
183
  assert "oracledb" in pyproject
184
184
 
185
185
 
186
+ def test_entry_point_hint_names_the_directory_to_add():
187
+ """pip install --user on Windows puts pythia.exe in a Scripts directory
188
+ that is not on PATH, so the very next documented command fails with
189
+ CommandNotFound -- naming nothing that helps. Seen on a real machine."""
190
+ hint = pythia.entry_point_hint(found=None, scripts_dir=r"C:\Py\Scripts")
191
+ assert hint is not None
192
+ assert r"C:\Py\Scripts" in hint # the exact directory to add
193
+ assert "-m pythia" in hint # the fallback that works now
194
+ # once the command resolves, say nothing
195
+ assert pythia.entry_point_hint(found="/usr/local/bin/pythia",
196
+ scripts_dir="/usr/local/bin") is None
197
+ # cannot locate the directory: still offer the fallback, claim nothing else
198
+ hint = pythia.entry_point_hint(found=None, scripts_dir=None)
199
+ assert "-m pythia" in hint and "PATH" in hint
200
+
201
+
202
+ def test_scripts_dir_prefers_where_the_executable_really_is():
203
+ import sysconfig
204
+ user = sysconfig.get_path("scripts", sysconfig.get_preferred_scheme("user"))
205
+ # whichever candidate holds the executable wins; with none holding it the
206
+ # answer is the user scheme, which is where pip --user puts it
207
+ assert pythia.installed_scripts_dir() in (
208
+ sysconfig.get_path("scripts"), user, None)
209
+
210
+
186
211
  def main():
187
212
  failed = 0
188
213
  for name, fn in sorted(globals().items()):
File without changes
File without changes