Skip to content
grigoryk edited this page Sep 5, 2012 · 20 revisions

Setting up your Willet Environment!

Prerequisites not covered

  • Python (2.4~2.5)
  • Git
  • A web browser
  • Tunes

Setup

The following is a guide to help you setup your development environment.

  1. Download Google App Engine: Google App Engine for Python

  2. Git clone the repo willet_referrals: git clone --recursive git@github.com:Willet/Willet-Referrals.git

    • Make sure you also download all git submodules: git submodule update --init
    • Then, run this command to ensure that feature branches stay as separate branches
      • git config branch.master.mergeoptions "--no-ff"
      • git config branch.dev.mergeoptions "--no-ff"
  3. Create and checkout your own personal branch! Name it something cool, like, "My awesome willet branch!"

  4. Create an app.yaml using our template: sample app.yaml

  5. Create an util/local_consts.py using our template: sample util/local_consts.py

  6. Maybe, create custom apps for Twitter, Facebook, etc. Add API keys/secrets to your util/local_consts.py

  7. Create the required Shopify Apps for testing, add keys/secrets to your util/local_consts.py

  8. (Optional) Create a cron.yaml using our template, will burn your quota daily: sample cron.yaml

Google App Engine

  1. Install dev SDK on your machine.

  2. Create a Google App Engine account.

  3. Create a new Application so that you can deploy and test! Remember what you name your app.

  4. Init your App Engine Launcher (that you dl/ed) to your git repo directory. Put your app name in the app.yaml file (as described above).

Shopify

  1. Register as a [Shopify Developer / Partner] (http://www.shopify.com/partners/apps).

  2. Make a suh-weeet test store! What do you want to sell? Barbara's is here.

  3. Make a Shopify App so you can test!

Select Legacy authentication, not OAuth2.

Post Install Behaviour = Redirect to url. URL is http://app-engine-name.appspot.com/a/shopify?app=SIBTShopify or http://app-engine-name.appspot.com/a/shopify?app=buttons That's all you have to edit!

  1. Copy the API Key and Shared Secret to your util/local_consts.py file (as described above).

Test Your Code

After you've done all the setup above, you're ready to deploy your code and start testing!

  1. Switch to stable branch.

  2. Using your launcher, deploy your code to your application. Hit http://app-name.appspot.com/ to see our amazing landing page!

  3. Go to /link/init to init your DB.

  4. To install our Shopify App on your test store, go to /s/shopify/beta and follow install instructions.

Clone this wiki locally