mass_driver.models.activity

Activity, the top-level file format definition for mass-driver run command.

Encompasses both Migrations and Forge activities.

Module Contents

Classes

ActivityFile

Top-level object for migration + forge, proxy for TOML file, pre-class-load

ActivityLoaded

Top-level object for migration + forge, proxy for TOML file, post-load

ActivityOutcome

The outcome of running activities

Functions

load_activity_toml

Load up a TOML config of activity into memory

load_activity

Load up all plugins of an Activity

load_scan

Load the ScanFile, discovering drivers

Data

IndexedPatchResult

A set of PatchResults, indexed by original repo URL given as input

IndexedPRResult

A set of PRResults, indexed by original repo URL given as input

ScanResult

The output of one or more scanner(s) on a single repo, indexed by scanner-name

IndexedScanResult

A set of results of N scanners over multiple repos, indexed by original repo URL

API

mass_driver.models.activity.IndexedPatchResult = None

A set of PatchResults, indexed by original repo URL given as input

mass_driver.models.activity.IndexedPRResult = None

A set of PRResults, indexed by original repo URL given as input

mass_driver.models.activity.ScanResult = None

The output of one or more scanner(s) on a single repo, indexed by scanner-name

mass_driver.models.activity.IndexedScanResult = None

A set of results of N scanners over multiple repos, indexed by original repo URL

class mass_driver.models.activity.ActivityFile[source]

Bases: pydantic.BaseModel

Top-level object for migration + forge, proxy for TOML file, pre-class-load

source: mass_driver.models.migration.SourceConfigFile | None = None
scan: mass_driver.models.scan.ScanFile | None = None
migration: mass_driver.models.migration.MigrationFile | None = None
forge: mass_driver.models.migration.ForgeFile | None = None
class mass_driver.models.activity.ActivityLoaded[source]

Bases: pydantic.BaseModel

Top-level object for migration + forge, proxy for TOML file, post-load

source: mass_driver.models.migration.SourceConfigLoaded | None = None
scan: mass_driver.models.scan.ScanLoaded | None = None
migration: mass_driver.models.migration.MigrationLoaded | None = None
forge: mass_driver.models.migration.ForgeLoaded | None = None
classmethod from_config(config_toml: str)[source]

Get a loaded migration from config contents

class mass_driver.models.activity.ActivityOutcome[source]

Bases: pydantic.BaseModel

The outcome of running activities

repos_sourced: mass_driver.models.repository.IndexedRepos = None

The repos, as discovered from Source

repos_cloned: mass_driver.models.repository.IndexedClonedRepos = None

The repos, as cloned

scan_result: mass_driver.models.activity.IndexedScanResult | None = None

A lookup table of the scan results, indexed by repos_input url

migration_result: mass_driver.models.activity.IndexedPatchResult | None = None

A lookup table of the results of a Migration, indexed by repos_input url

forge_result: mass_driver.models.activity.IndexedPRResult | None = None

A lookup table of the results of a Forge, indexed by repos_input url

mass_driver.models.activity.load_activity_toml(activity_config: str) mass_driver.models.activity.ActivityFile[source]

Load up a TOML config of activity into memory

mass_driver.models.activity.load_activity(activity: mass_driver.models.activity.ActivityFile) mass_driver.models.activity.ActivityLoaded[source]

Load up all plugins of an Activity

mass_driver.models.activity.load_scan(s: mass_driver.models.scan.ScanFile)[source]

Load the ScanFile, discovering drivers