titbit

A place to dump things that might be useful in the future, but we’re not sure enough to find a proper home for it yet.

To make it easy to copy/paste the code elsewhere, include the import statements within the functions/objects that use them, when possible.

titbit.git_action_on_projects(projects, action='pull', *, on_error=<function <lambda>>, egress=<function <lambda>>)[source]

Take git actions all the projects in the list of projects. A project can be a folder path or a module, or the name of a module/package.

Parameters:

folders – list of projects

Usage:

>>> projects = [
...     some_package, "some_package_name", "some_package_dir_path"
... ]  
>>> # By default, the git action performed is to pull
>>> git_action_on_projects(projects)