Bumper Driver

class bumper.BumperDriver(targets, bumper_models=None, full_throttle=False, detail=False, test_drive=False)[source]

Driver that controls the main logic / coordinates the bumps with different bumper models (cars)

Parameters:
  • targets (list) – List of file paths to bump
  • bumper_models (list) – List of bumper classes that implements bumper.cars.AbstractBumper
  • full_throttle (bool) – Force bumps even when required requirements are not met
  • detail (bool) – Generate detailed changes from changelog if possible.
  • test_drive (bool) – Perform a dry run
bump(filter_requirements, required=False, show_summary=True, show_detail=False, **kwargs)[source]

Bump dependency requirements using filter.

Parameters:
  • filter_requirements (list) – List of dependency filter requirements.
  • required (bool) – Require the filter_requirements to be met (by adding if possible).
  • show_summary (bool) – Show summary for each bump made.
  • show_detail (bool) – Show detail for each bump made if available.
Returns:

Tuple with two elements: Dict of target file to bump message, List of Bump

Raises BumpAccident:
 

for any bump errors

reverse()[source]

Reverse all bumpers

bumper.bump()[source]

CLI entry point to bump requirements in requirements.txt or pinned.txt