Skip to content
Jackson Dearing edited this page Aug 5, 2020 · 7 revisions

Unit Testing

To run all unit tests:

python -m unittest discover -p 'test_*'

Virtual Environment

Create a virtual environment:

virtualenv venv

Enter the virtual environment called venv:

source venv/bin/activate

Exit the virtual environment:

deactivate

gcloud and App Engine

Initialise gcloud:

./~/google-cloud-sdk/bin/gcloud init

Update the requirements.txt based on pip within the venv:

pip freeze > requirements.txt

Install the requirements into the lib dir

pip install -t lib -r requirements.txt

Run a test server (similar to what will be deployed):

dev_appserver.py --application=sub-auto app.yaml

Deploy application:

~/google-cloud-sdk/bin/gcloud app deploy

git Workflow

Pull down changes from remote master:

git pull

Checkout a new branch:

get checkout -b new-branch-name

Push the branch up to remote:

git push origin new-branch-name

Then a pull request can be started on GitHub.

Clone this wiki locally