wgx731's Technical Blog

Programmer @ National University Of Singapore.

[NUS Orbital 2014] Mission Control #8 Environment Setup Guide

| Comments

This post is the guide for you to setup your machine for the NUS orbital 2014 mission control #8 tutorial, it’s better that you have finished your environment setup before coming to the mission control, because downloading the components may need quite some time and the network may not be very good during mission control session. Wish by after reading the post, you can setup your environment and be prepared for the tutorial. :D

Components Check List

Step by Step Guide Help

NOTE: to windows users, I will try to help you during the mission control if you have any trouble during the setup.

Git

Actually this should not be listed in this help guide, because if you still don’t know about git by now, I am very worried about what you will be delivering as your final application. :(

GAE Python SDK (Version 1.9.6)

This should be quite easy for you guys, as most of you are using GAE python SDK everyday during orbital. I will just leave a small tip here for Linux users. Remember to add your GAE python SDK location in your PATH environment.

1
2
# Put in your ~/.bashrc file
PATH="$HOME/Development/google_appengine":$PATH

python virtualenv

As I have been living without Windows for quite a few years, so forgive me if it just doesn’t work on the Windows machine. For Linux and Mac user, below is what you should do to install python virtualenv:

  • Read the documentation on installation, unless you want to mess up your global packages, please don’t install virtualenv globally. Just download the latest source from PyPi, extract to a folder where you usually put your development tools ~/Development/ for me.
  • Create an alias for your virtualenv.
1
2
# Put in your ~/.bashrc file
alias virtualenv='path/to/virtualenv/virtualenv.py'
  • Create a new virtual python environment to test it and done.
1
virtualenv MYENV

For Windows users, I have found this, this and this for you as well. :)

3rd party libraries

This is the last step before the tutorial, here is what you need to do:

  • Clone the tutorial repository
1
2
3
4
git clone https://github.com/wgx731/2014-nus-orbital-mission-control-8.git
# OR
git clone git@github.com:wgx731/2014-nus-orbital-mission-control-8.git
cd 2014-nus-orbital-mission-control-8
  • Check out to step-x tag
1
git checkout -f step-x
  • Create and use a new virtualenv called env, actually you can give it any name, it’s just I have git ignored the env folder in this repository
1
2
virtualenv env
source env/bin/activate
  • Install the requirements.
1
pip install -r requirements.txt
  • Test it out
1
2
3
4
5
6
7
8
9
10
11
12
13
14
cd "test-examples/"
# check pep8
flake8 ./ -v
# single doc test
python doctest_example.py -v
# single unit test
python test_unitest_example.py -v
# nose test framework
nosetests --with-doctest -v
# pytest test framework
py.test --doctest-module -v
cd behave-example/
# behave python BDD framework
behave -v

You should see all the tests passed. And congratulations, you have successfully setup your environment. :P

Please comment or send email to me if you have any trouble or if you feel there is any error in the setup guide. Enjoy and start exploring if you want to.

Comments