This document provides instructions for agents on how to perform common development tasks in this repository.
This project uses asdf to manage tool versions. Before you can install the project's dependencies, you need to install and configure asdf.
First, make sure you have git and curl installed. Then, clone the asdf repository:
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0Add asdf to your shell's startup file. For bash, run:
echo -e "\n. \"$HOME/.asdf/asdf.sh\"" >> ~/.bashrcThen, source your .bashrc to apply the changes to your current session:
source ~/.bashrcNow, from the root of this project, run the following commands to install the necessary asdf plugins and the tools specified in the .tool-versions file:
asdf plugin add python
asdf plugin add gcloud https://github.com/jthegedus/asdf-gcloud
asdf installOnce asdf has installed the correct python version, you need to install pipenv:
python -m pip install pipenvNow you are ready to install the project's dependencies. Run the following command from the root of the repository:
./local/install_deps.bashTo run all unit tests, execute the following commands:
python butler.py py_unittest -t appengine -m
python butler.py py_unittest -t core -mThe -m flag runs the tests in parallel, which is recommended.
To run a single test file, you can use the -p or --pattern flag. For example, to run the tests in deploy_test.py, you can use the following command:
python butler.py py_unittest -t core -p deploy_test.pyTo check the code for style and linting issues, run the following command:
python butler.py lintThis will lint the changed code in your current branch.
To automatically format the code to match the project's style guidelines, run:
python butler.py formatThis will format the changed code in your current branch.