Skip to main content

Vedro VCS Changed

PyPI Python Version

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 subprocess and ast from 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

  1. Runs VCS diff to get the list of changed .py files in the current branch
  2. Parses all .py files in the project using Python AST to extract imports
  3. Builds a reverse dependency graph (file → set of files that import it)
  4. Starting from each changed file, traverses the reverse graph (BFS) to find all transitively affected scenario files
  5. Ignores all scenarios that are not affected

Release files for vedro-vcs-changed 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vedro-vcs-changed 0.1.0
File Size Uploaded
vedro_vcs_changed-0.1.0.tar.gz 14.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vedro-vcs-changed 0.1.0
File Interpreter ABI Platform
vedro_vcs_changed-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 27.7 kB

Release files / vedro_vcs_changed-0.1.0.tar.gz

Download URL vedro_vcs_changed-0.1.0.tar.gz
Size 14.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1fe5d39fd167a4e1f5081b22ddc91b8733d40365a06f91e07446208960b19a4d
BLAKE2b-256 checksum
How to use checksums
3ffcf0d21c635a573f083900fdcff3e7377e5c5fa1e9e16036989d56a30d1f59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Release files / vedro_vcs_changed-0.1.0-py3-none-any.whl

Download URL vedro_vcs_changed-0.1.0-py3-none-any.whl
Size 13.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d129caa59bbc744313f7bd2d756153ce2d00cafbcc6cc0909523f27ba7e34544
BLAKE2b-256 checksum
How to use checksums
11cf1f59ff2a179fe92565fcad3fac94a1f4afec7b80d57a7d13872f8e44fbbf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page