Name: python-git-subrepo
Owner: Wellcome Trust Sanger Institute - Human Genetics Informatics
Description: Provides access to `git subrepo` in Python
Created: 2017-06-29 15:57:40.0
Updated: 2017-07-05 14:43:56.0
Pushed: 2017-08-08 08:50:45.0
Size: 47
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
In the same way that GitPython
wraps git
, this library provides easy
access to git subrepo in Python.
Stable releases can be installed via PyPI:
p install gitsubrepo
Bleeding edge versions can be installed directly from GitHub:
p install git+https://github.com/wtsi-hgi/python-git-subrepo.git@${commitIdBranchOrTag}#egg=gitsubrepo
To declare this library as a dependency of your project, add it to your requirement.txt
file.
The library currently supports 3 git subrepo
operations: clone
, pull
and status
. Please see the documentation
for specific information on how to use these methods.
Example usage:
rt gitsubrepo
te_repository = "https://github.com/colin-nolan/test-repository.git"
sitory_location = "/tmp/repo"
epo_location = f"{repository_location}/subrepo"
ch = "develop"
it_reference = gitsubrepo.clone(remote_repository, subrepo_location, branch=branch)
ted_commit_reference = gitsubrepo.pull(subrepo_location)
epo_remote, subrepo_branch, subrepo_commit = gitsubrepo.status(subrepo_location)
rt subrepo_remote == remote_repository
rt subrepo_branch == branch
Install both library dependencies and the dependencies needed for testing:
p install -q -r requirements.txt
p install -q -r test_requirements.txt
To run the tests and generate a coverage report with unittest:
st-runner.sh
If you wish to run the tests inside a Docker container, build Docker.test
.
Copyright (c) 2017 Genome Research Limited