Skip to main content

Vedro plugin that runs only scenarios affected by VCS branch changes

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vedro_vcs_changed-0.1.0.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vedro_vcs_changed-0.1.0-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

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

Hashes for vedro_vcs_changed-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1fe5d39fd167a4e1f5081b22ddc91b8733d40365a06f91e07446208960b19a4d
MD5 904ea15d484f3fe10ab51b851d08a103
BLAKE2b-256 3ffcf0d21c635a573f083900fdcff3e7377e5c5fa1e9e16036989d56a30d1f59

See more details on using hashes here.

File details

Details for the file vedro_vcs_changed-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for vedro_vcs_changed-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d129caa59bbc744313f7bd2d756153ce2d00cafbcc6cc0909523f27ba7e34544
MD5 a5e7922fc857b115ac0dca111bbf494f
BLAKE2b-256 11cf1f59ff2a179fe92565fcad3fac94a1f4afec7b80d57a7d13872f8e44fbbf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page