Improve local testing docs for packse (#4279)

This commit is contained in:
Zanie Blue 2024-06-12 14:19:10 -04:00 committed by GitHub
parent 3910b7a90c
commit d963a0f085
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -27,12 +27,10 @@ Usage:
Override the uv package index and update the tests
$ UV_INDEX_URL="http://localhost:3141" ./scripts/scenarios/generate.py <path to scenarios>
$ UV_TEST_INDEX_URL="http://localhost:3141/simple/" ./scripts/scenarios/generate.py <path to scenarios>
If an editable version of packse is installed, this script will use its bundled scenarios by default.
Use
"""
import argparse
@ -194,7 +192,10 @@ def main(scenarios: list[Path], snapshot_update: bool = True):
f"https://raw.githubusercontent.com/astral-sh/packse/{ref}/vendor/links.html"
)
data["index_url"] = f"https://astral-sh.github.io/packse/{ref}/simple-html/"
data["index_url"] = os.environ.get(
"UV_TEST_INDEX_URL",
f"https://astral-sh.github.io/packse/{ref}/simple-html/",
)
# Render the template
logging.info(f"Rendering template {template.name}")