graphe-code 0.1.0__tar.gz → 0.1.1__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.
- {graphe_code-0.1.0/src/graphe_code.egg-info → graphe_code-0.1.1}/PKG-INFO +1 -1
- {graphe_code-0.1.0 → graphe_code-0.1.1}/pyproject.toml +1 -1
- {graphe_code-0.1.0 → graphe_code-0.1.1}/src/graphe/cli.py +6 -4
- {graphe_code-0.1.0 → graphe_code-0.1.1/src/graphe_code.egg-info}/PKG-INFO +1 -1
- {graphe_code-0.1.0 → graphe_code-0.1.1}/tests/test_host.py +1 -2
- {graphe_code-0.1.0 → graphe_code-0.1.1}/LICENSE +0 -0
- {graphe_code-0.1.0 → graphe_code-0.1.1}/README.md +0 -0
- {graphe_code-0.1.0 → graphe_code-0.1.1}/setup.cfg +0 -0
- {graphe_code-0.1.0 → graphe_code-0.1.1}/src/graphe/__init__.py +0 -0
- {graphe_code-0.1.0 → graphe_code-0.1.1}/src/graphe/core.py +0 -0
- {graphe_code-0.1.0 → graphe_code-0.1.1}/src/graphe/generic.py +0 -0
- {graphe_code-0.1.0 → graphe_code-0.1.1}/src/graphe/godot.py +0 -0
- {graphe_code-0.1.0 → graphe_code-0.1.1}/src/graphe/js.py +0 -0
- {graphe_code-0.1.0 → graphe_code-0.1.1}/src/graphe/python.py +0 -0
- {graphe_code-0.1.0 → graphe_code-0.1.1}/src/graphe/root.py +0 -0
- {graphe_code-0.1.0 → graphe_code-0.1.1}/src/graphe_code.egg-info/SOURCES.txt +0 -0
- {graphe_code-0.1.0 → graphe_code-0.1.1}/src/graphe_code.egg-info/dependency_links.txt +0 -0
- {graphe_code-0.1.0 → graphe_code-0.1.1}/src/graphe_code.egg-info/entry_points.txt +0 -0
- {graphe_code-0.1.0 → graphe_code-0.1.1}/src/graphe_code.egg-info/requires.txt +0 -0
- {graphe_code-0.1.0 → graphe_code-0.1.1}/src/graphe_code.egg-info/top_level.txt +0 -0
- {graphe_code-0.1.0 → graphe_code-0.1.1}/tests/test_generic.py +0 -0
- {graphe_code-0.1.0 → graphe_code-0.1.1}/tests/test_graphe.py +0 -0
- {graphe_code-0.1.0 → graphe_code-0.1.1}/tests/test_plugin.py +0 -0
- {graphe_code-0.1.0 → graphe_code-0.1.1}/tests/test_release.py +0 -0
- {graphe_code-0.1.0 → graphe_code-0.1.1}/tests/test_root.py +0 -0
|
@@ -596,10 +596,12 @@ const anchor=()=>{const n=N.find(n=>n.id===decodeURIComponent(location.hash.slic
|
|
|
596
596
|
|
|
597
597
|
def load(as_is: bool = False) -> nx.DiGraph:
|
|
598
598
|
"""The graph; rebuilt first if it is older than the host's code or than the tool."""
|
|
599
|
-
if not
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
599
|
+
if not (as_is and JSON.exists()):
|
|
600
|
+
# The sources first: outside a git repository, their one-line error comes before any rebuilding line (T-0069).
|
|
601
|
+
newest = max((p.stat().st_mtime for p in _sources() + _tool()), default=0)
|
|
602
|
+
if not JSON.exists() or newest > JSON.stat().st_mtime:
|
|
603
|
+
print("(the graph is older than the code or the tool: rebuilding)", file=sys.stderr)
|
|
604
|
+
build(quiet=True)
|
|
603
605
|
data = json.loads(JSON.read_bytes())
|
|
604
606
|
graph = nx.DiGraph(communities=data["communities"], unattributed=data.get("unattributed", {}))
|
|
605
607
|
for n in data["nodes"]:
|
|
@@ -254,9 +254,8 @@ def test_an_expected_error_on_a_query_prints_one_line(tmp_path: Path):
|
|
|
254
254
|
(tmp_path / "dehors").mkdir()
|
|
255
255
|
r = _run(tmp_path / "dehors", "explain", "aider")
|
|
256
256
|
assert r.returncode == 1 and "Traceback" not in r.stderr
|
|
257
|
-
line = r.stderr.strip().splitlines()
|
|
257
|
+
[line] = r.stderr.strip().splitlines() # T-0069: the error alone, no rebuilding line before it
|
|
258
258
|
assert line.startswith("graphe: ") and "dehors" in line and "files git tracks" in line
|
|
259
|
-
assert r.stderr.strip().splitlines()[-2].startswith("(the graph is older") # nothing between
|
|
260
259
|
host = _host(tmp_path / "hote", {"outils.py": CALLEE, "graphe.toml": WITH_EXTENSION,
|
|
261
260
|
"ext/regles_du_temoin.py": "SALUT = 1\n"})
|
|
262
261
|
r = _run(host, "search", "aider")
|
|
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
|