To install git-upstream from pypi, run:
pip install --user git-upstream
Alternatively, the current release can be installed system-wide from pypi:
sudo pip install git-upstream
Installing directly from source is possible, first clone and then install using pip:
git clone https://git.openstack.org/openstack/git-upstream.git cd git-upstream pip install .
git clone https://git.openstack.org/openstack/git-upstream.git cd git-upstream python setup.py install
git clone https://git.openstack.org/openstack/git-upstream.git cd git-upstream easy_install .
If you want command line completion (using tab), install the provided “bash completion” file
mkdir ~/bin && cp ./bash_completion/git-upstream ~/bin echo ". ~/bin/git-upstream" >> ~/.bash_profile
Verify your installation.
pip show git-upstream --- Name: git-upstream Version: 0.12.1 Summary: git tool to help manage upstream repositories Home-page: https://pypi.python.org/pypi/git-upstream Author: Darragh Bailey Author-email: firstname.lastname@example.org License: Apache License (2.0) Location: /home/<username>/.local/lib/python2.7/site-packages Requires: argcomplete, pbr, six, GitPython git-upstream --help usage: git-upstream [--version] [-h] [-q | -v] <command> ... [...]
Installing for Development¶
A virtual environment is recommended for development. For example, git-upstream may be installed from the top level directory:
virtualenv .venv source .venv/bin/activate pip install -r test-requirements.txt -e .
Documentation is included in the
doc folder. To generate docs
locally execute the command:
tox -e docs
The generated documentation is then available under
- Note: When behind a proxy it is necessary to use
TOX_TESTENV_PASSENVto pass any proxy settings for this test to be able to check links are valid.
Unit tests have been included and are in the
folder. Many unit tests samples are included as example scenarios in
our documentation to help explain how git-upstream handles various use
cases. To run the unit tests, execute the command:
tox -e py34,py27
- Note: View
tox.inito run tests on other versions of Python, generating the documentation and additionally for any special notes on building one of the scenarios to allow direct inspection and manual execution of
git-upstreamwith various scenarios.
The unit tests can in many cases be better understood as being closer to functional tests.
To measure test coverage, execute the command:
tox -e cover