clowder package¶
Subpackages¶
- clowder.cli package
- Submodules
- clowder.cli.base_controller module
- clowder.cli.branch_controller module
- clowder.cli.checkout_controller module
- clowder.cli.clean_controller module
- clowder.cli.diff_controller module
- clowder.cli.forall_controller module
- clowder.cli.herd_controller module
- clowder.cli.init_controller module
- clowder.cli.link_controller module
- clowder.cli.prune_controller module
- clowder.cli.repo_controller module
- clowder.cli.reset_controller module
- clowder.cli.save_controller module
- clowder.cli.start_controller module
- clowder.cli.stash_controller module
- clowder.cli.status_controller module
- clowder.cli.sync_controller module
- clowder.cli.yaml_controller module
- Module contents
- clowder.error package
- clowder.git package
- clowder.model package
- clowder.util package
- clowder.yaml package
Submodules¶
clowder.clowder_app module¶
Clowder command line app
-
class
clowder.clowder_app.
ClowderApp
(label=None, **kw)¶ Bases:
cement.core.foundation.App
Clowder command CLI app
-
class
Meta
¶ Bases:
object
Clowder command CLI Meta configuration
-
base_controller
= 'base'¶
-
exit_on_close
= True¶
-
handlers
= [<class 'clowder.cli.base_controller.BaseController'>, <class 'clowder.cli.branch_controller.BranchController'>, <class 'clowder.cli.checkout_controller.CheckoutController'>, <class 'clowder.cli.clean_controller.CleanController'>, <class 'clowder.cli.diff_controller.DiffController'>, <class 'clowder.cli.forall_controller.ForallController'>, <class 'clowder.cli.herd_controller.HerdController'>, <class 'clowder.cli.init_controller.InitController'>, <class 'clowder.cli.link_controller.LinkController'>, <class 'clowder.cli.prune_controller.PruneController'>, <class 'clowder.cli.repo_controller.RepoController'>, <class 'clowder.cli.repo_controller.RepoAddController'>, <class 'clowder.cli.repo_controller.RepoCheckoutController'>, <class 'clowder.cli.repo_controller.RepoCleanController'>, <class 'clowder.cli.repo_controller.RepoCommitController'>, <class 'clowder.cli.repo_controller.RepoRunController'>, <class 'clowder.cli.repo_controller.RepoPullController'>, <class 'clowder.cli.repo_controller.RepoPushController'>, <class 'clowder.cli.repo_controller.RepoStatusController'>, <class 'clowder.cli.reset_controller.ResetController'>, <class 'clowder.cli.save_controller.SaveController'>, <class 'clowder.cli.start_controller.StartController'>, <class 'clowder.cli.stash_controller.StashController'>, <class 'clowder.cli.status_controller.StatusController'>, <class 'clowder.cli.sync_controller.SyncController'>, <class 'clowder.cli.yaml_controller.YAMLController'>]¶
-
label
= 'clowder'¶
-
-
class
-
clowder.clowder_app.
main
()¶ Clowder command CLI main function
clowder.clowder_controller module¶
Clowder command controller class
-
class
clowder.clowder_controller.
ClowderController
¶ Bases:
object
Class encapsulating project information from clowder.yaml for controlling clowder
Variables: -
get_all_fork_project_names
()¶ Returns all project names containing forks
Returns: List of project names containing forks Return type: list[str]
-
get_all_group_names
()¶ Returns all group names for current clowder.yaml
Returns: List of all group names Return type: list[str]
-
get_all_project_names
()¶ Returns all project names for current clowder.yaml
Returns: List of all project names Return type: list[str]
-
get_all_project_paths
()¶ Returns all project paths for current clowder.yaml
Returns: List of all project paths Return type: list[str]
-
get_timestamp
(timestamp_project)¶ Return timestamp for project
Parameters: timestamp_project (str) – Project to get timestamp of current HEAD commit Returns: Commit timestamp string Return type: str Raises: ClowderExit –
-
get_yaml
(resolved=False)¶ Return python object representation of model objects
-
get_yaml
(self, resolved=False)
Parameters: resolved (Optional[bool]) – Whether to return resolved yaml Returns: YAML python object Return type: dict -
-
clowder.clowder_repo module¶
Clowder repo class
-
class
clowder.clowder_repo.
ClowderRepo
¶ Bases:
object
Class encapsulating clowder repo information
Variables: - default_ref (str) – Default ref
- remote (str) – Remote name
- clowder_path (str) – Absolute path to clowder repo
-
add
(files)¶ Add files in clowder repo to git index
Parameters: files (str) – Files to git add
-
branches
()¶ Print current local branches
-
checkout
(ref)¶ Checkout ref in clowder repo
Parameters: ref (str) – Ref to git checkout
-
clean
()¶ Discard changes in clowder repo
Equivalent to:
git clean -ffdx
-
commit
(message)¶ Commit current changes in clowder repo
Parameters: message (str) – Git commit message
-
git_status
()¶ Print clowder repo git status
Equivalent to:
git status -vv
-
init
(url, branch)¶ Clone clowder repo from url
Parameters: - url (str) – URL of repo to clone
- branch (str) – Branch to checkout
-
init_exit_handler
()¶ Exit handler for deleting files if init fails
Raises: ClowderExit –
-
is_dirty
()¶ Check if project is dirty
Returns: True, if repo is dirty Return type: bool
-
print_status
(fetch=False)¶ Print clowder repo status
-
print_status
(fetch=False)
Parameters: fetch (Optional[str]) – Fetch before printing status -
-
pull
()¶ Pull clowder repo upstream changes
-
push
()¶ Push clowder repo changes
-
run_command
(command)¶ Run command in clowder repo
Parameters: command (str) – Command to run Raises: ClowderError –
-
clowder.clowder_repo.
print_clowder_repo_status
(func)¶ Print clowder repo status
-
clowder.clowder_repo.
print_clowder_repo_status_fetch
(func)¶ Print clowder repo status
Module contents¶
Clowder module __init__