mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 10:58:28 +00:00
Include permalink to scenarios used to generate test cases (#767)
This commit is contained in:
parent
0bdd831a0d
commit
e18a6a0c03
3 changed files with 25 additions and 7 deletions
|
@ -4,7 +4,7 @@
|
|||
#
|
||||
# Usage:
|
||||
#
|
||||
# $ scripts/scenarios/update.py
|
||||
# $ ./scripts/scenarios/update.py
|
||||
#
|
||||
# Requirements:
|
||||
#
|
||||
|
@ -84,10 +84,12 @@ if packse.__development_base_path__.name != "packse":
|
|||
)
|
||||
scenarios_path = str(PACKSE / "scenarios")
|
||||
else:
|
||||
print("Using local packse scenarios...", file=sys.stderr)
|
||||
print(
|
||||
f"Using scenarios in packse repository at {packse.__development_base_path__}",
|
||||
file=sys.stderr,
|
||||
)
|
||||
scenarios_path = str(packse.__development_base_path__ / "scenarios")
|
||||
|
||||
|
||||
print("Loading scenario metadata...", file=sys.stderr)
|
||||
data = json.loads(
|
||||
subprocess.check_output(
|
||||
|
@ -99,8 +101,17 @@ data = json.loads(
|
|||
)
|
||||
)
|
||||
|
||||
# Add a generated note
|
||||
data["generated_by"] = f"Generated by `{' '.join(sys.argv)}`"
|
||||
# Add generated metadata
|
||||
commit = (
|
||||
subprocess.check_output(
|
||||
["git", "show", "-s", "--format=%H", "HEAD"], cwd=scenarios_path
|
||||
)
|
||||
.decode()
|
||||
.strip()
|
||||
)
|
||||
data["generated_from"] = f"https://github.com/zanieb/packse/tree/{commit}/scenarios"
|
||||
data["generated_with"] = " ".join(sys.argv)
|
||||
|
||||
|
||||
# Add normalized names for tests
|
||||
for scenario in data["scenarios"]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue