Vedro plugin that runs only scenarios affected by VCS branch changes
Project description
Vedro VCS Changed
A Vedro plugin that runs only test scenarios affected by changes in the current VCS branch. It combines VCS diff with Python AST import analysis to determine which scenarios are transitively affected by modified files.
Features
- VCS-agnostic — supports git (default) and arc, extensible to other VCS
- Transitive dependency analysis — if a mock, context, schema, or page object changes, all scenarios that import it (directly or transitively) will run
- Zero external dependencies — uses only
subprocessandastfrom Python stdlib (plus vedro)
Installation
$ pip install vedro-vcs-changed
Activate the plugin in your vedro.cfg.py:
import vedro
import vedro_vcs_changed
class Config(vedro.Config):
class Plugins(vedro.Config.Plugins):
class VCSChanged(vedro_vcs_changed.VedroVCSChanged):
enabled = True
Usage
Git (default)
$ vedro run --changed-against-branch=main
Arc (Arcadia)
$ vedro run --changed-against-branch=trunk --changed-vcs=arc
Options
| Option | Description | Default |
|---|---|---|
--changed-against-branch |
Branch to compare against | (required) |
--changed-vcs |
VCS backend: git, arc |
git |
How It Works
- Runs VCS diff to get the list of changed
.pyfiles in the current branch - Parses all
.pyfiles in the project using Python AST to extract imports - Builds a reverse dependency graph (file → set of files that import it)
- Starting from each changed file, traverses the reverse graph (BFS) to find all transitively affected scenario files
- Ignores all scenarios that are not affected
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vedro_vcs_changed-0.1.0.tar.gz.
File metadata
- Download URL: vedro_vcs_changed-0.1.0.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1fe5d39fd167a4e1f5081b22ddc91b8733d40365a06f91e07446208960b19a4d
|
|
| MD5 |
904ea15d484f3fe10ab51b851d08a103
|
|
| BLAKE2b-256 |
3ffcf0d21c635a573f083900fdcff3e7377e5c5fa1e9e16036989d56a30d1f59
|
File details
Details for the file vedro_vcs_changed-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vedro_vcs_changed-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d129caa59bbc744313f7bd2d756153ce2d00cafbcc6cc0909523f27ba7e34544
|
|
| MD5 |
a5e7922fc857b115ac0dca111bbf494f
|
|
| BLAKE2b-256 |
11cf1f59ff2a179fe92565fcad3fac94a1f4afec7b80d57a7d13872f8e44fbbf
|