mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
Improve documentation for scenario tests (#795)
- Fix documentation of scenario test module - Add instructions to scenario update script for local development
This commit is contained in:
parent
5820a9d937
commit
74777c01ea
3 changed files with 47 additions and 26 deletions
|
@ -1,11 +1,10 @@
|
|||
|
||||
//! DO NOT EDIT
|
||||
//!
|
||||
//! Generated with {{generated_with}}
|
||||
//! Scenarios from <{{generated_from}}>
|
||||
//!
|
||||
#![cfg(all(feature = "python", feature = "pypi"))]
|
||||
|
||||
/// DO NOT EDIT
|
||||
///
|
||||
/// GENERATED WITH `{{generated_with}}`
|
||||
/// SCENARIOS FROM `{{generated_from}}`
|
||||
|
||||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
|
||||
|
|
|
@ -1,20 +1,41 @@
|
|||
#!/usr/bin/env python3
|
||||
#
|
||||
# Generates and updates snapshot test cases from packse scenarios.
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# $ ./scripts/scenarios/update.py
|
||||
#
|
||||
# Requirements:
|
||||
#
|
||||
# Requires `packse` and `chevron-blue`.
|
||||
#
|
||||
# $ pip install -r scripts/scenarios/requirements.txt
|
||||
#
|
||||
# Also supports a local, editable requirement on `packse`.
|
||||
#
|
||||
# Uses `git`, `rustfmt`, and `cargo insta test` requirements from the project.
|
||||
"""
|
||||
Generates and updates snapshot test cases from packse scenarios.
|
||||
|
||||
Usage:
|
||||
|
||||
Regenerate the scenario test file:
|
||||
|
||||
$ ./scripts/scenarios/update.py
|
||||
|
||||
Scenarios are pinned to a specific commit. Change the `PACKSE_COMMIT` constant to update them.
|
||||
|
||||
Scenarios can be developed locally with the following workflow:
|
||||
|
||||
Install the local version of packse
|
||||
|
||||
$ pip install -e <path to packse>
|
||||
|
||||
From the packse repository, build and publish the scenarios to a local index
|
||||
|
||||
$ packse index up --bg
|
||||
$ packse build scenarios/*
|
||||
$ packse publish dist/* --index-url http://localhost:3141/packages/local --anonymous
|
||||
|
||||
Override the default PyPI index for Puffin and update the scenarios
|
||||
|
||||
$ PUFFIN_INDEX_URL="http://localhost:3141/packages/all/+simple" ./scripts/scenarios/update.py
|
||||
|
||||
Requirements:
|
||||
|
||||
Requires `packse` and `chevron-blue`.
|
||||
|
||||
$ pip install -r scripts/scenarios/requirements.txt
|
||||
|
||||
Also supports a local, editable requirement on `packse`.
|
||||
|
||||
Uses `git`, `rustfmt`, and `cargo insta test` requirements from the project.
|
||||
"""
|
||||
|
||||
import json
|
||||
import shutil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue