blastradius

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package blastradius ports pr_af/blast_radius.py: a file-level dependency graph built from Python import statements, used to find files that are affected by a change but not part of the changeset.

Parity note (design §A, task T2.3): the Python engine is DELIBERATELY language-limited to Python imports and this port reproduces that limitation verbatim — it does NOT understand Go, JS, or any other language's imports. Relative imports (`from . import x`, `from .foo import y`) capture a leading-dot module name that never matches a module-map key, so they never produce an edge — exactly as in Python.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildImportGraph

func BuildImportGraph(repoPath string) map[string][]string

BuildImportGraph ports build_import_graph: {file_path: [files_it_imports]}. Only Python (.py) files are considered, and only imports that resolve to a file within the repo produce an edge. Files with no resolving import do not appear as keys (matching Python's defaultdict -> dict(graph)).

func ComputeBlastRadius

func ComputeBlastRadius(changedFiles []string, repoPath string) []string

ComputeBlastRadius ports compute_blast_radius: files affected by changes but not themselves in the changeset. If file A imports file B and B changed (and A did not), A is in the blast radius. Returns a sorted, non-nil slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL