mirror of
https://github.com/safishamsi/graphify.git
synced 2026-09-22 05:25:40 +00:00
docs(cli): surface --code-only in the extract usage and README (#2071)
The top-level `graphify --help` has listed --code-only since #1734, but the `graphify extract` usage string and the README never mentioned it. A user evaluating graphify on a "can this run with no network call" constraint sees the extract usage / README first and can conclude the flag doesn't exist. Add --code-only to the extract usage line, name it in the Privacy section and the command reference, and add a test asserting the usage advertises it.
This commit is contained in:
committed by
safishamsi
parent
abb85ccb03
commit
bb8f5bd675
@@ -56,6 +56,19 @@ def test_mixed_repo_without_key_errors_and_points_at_code_only(tmp_path):
|
||||
assert "--code-only" in r.stderr, "the no-key error must point users at --code-only"
|
||||
|
||||
|
||||
def test_extract_usage_advertises_code_only(tmp_path):
|
||||
"""#2071: --code-only must be discoverable in the extract usage text, not only
|
||||
by triggering the no-key error. `graphify extract` with no path prints usage."""
|
||||
r = subprocess.run(
|
||||
[PYTHON, "-m", "graphify", "extract"],
|
||||
cwd=tmp_path, capture_output=True, text=True,
|
||||
)
|
||||
assert r.returncode != 0
|
||||
assert "--code-only" in r.stdout + r.stderr, (
|
||||
"extract usage must advertise --code-only (#2071)"
|
||||
)
|
||||
|
||||
|
||||
def _run_relative_out(repo: Path, *extra: str):
|
||||
"""Like _run but with a RELATIVE GRAPHIFY_OUT so --out/--output controls the
|
||||
parent dir (an absolute GRAPHIFY_OUT would override the flag)."""
|
||||
|
||||
Reference in New Issue
Block a user