Skip to content

Assorted code generation utilities and tooling

License

Notifications You must be signed in to change notification settings

uw-midsun/codegen-tooling

Repository files navigation

codegen-tooling

Build Status

Assorted code generation utilities and tooling

Getting Started

The protoc compiler is needed to build protocol buffers on Ubuntu the official version is out of date so use the following ppa to add it.

sudo add-apt-repository ppa:maarten-fonville/protobuf
sudo apt-get update

If you already have protoc installed continue from here:

virtualenv .venv
source .venv/bin/activate
pip install -r requirements.txt
make gen

Or if you use pyenv

pyenv virtualenv 3.3.6 codegen-tooling336
source ~/.pyenv/versions/codegen-tooling336/bin/activate
pip install -r requirements.txt
make gen

If you need to generate a new protobuf file

make protos

If you need to run unittests

make test

If you need to lint code

make lint

To clean the outputs

make clean

To add a new dependency, pip install $dependency && pip freeze | grep -i $dependency >> requirements.txt

Requirements

  • Python 2.7+ (or Python 3.3+)
  • pip
  • virtualenv
  • protoc 3.0+ (if you're compiling protobufs)
  • clang-format

Note: The protobuf library seems not to handle unicode literals very well for Python 3.0 - 3.2—as such, we do not support those versions.