arjunsatyapal / lantern

Automatically exported from code.google.com/p/lantern
Apache License 2.0
1 stars 0 forks source link

Developer Notes for Lantern

SVN is used to upload changes to code.google.com

https://lantern.googlecode.com/svn/trunk

The code project site: http://code.google.com/p/lantern

Go to the "Sources" tab to locate the SVN password.

AppEngine sites:

app_id: k16-8888 http://k16-8888.appspot.com

This corresponds to the demo1/ and demo1-test/ directories

app_id: pythonshell1 http://pythonshell1.appspot.com

This corresponds to the ri directory.

Related AppEngine sites:

app_id: tempkhanacadquiz

This is a modified version of Khan exercises, currently not checked in.

AppEngine admin site:

http://appengine.google.com

See demo1/README for additional notes.

Use the following header on all source files:

Copyright 2010 Google Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

COPYING based on: http://www.apache.org/licenses/LICENSE-2.0.txt


Overview

GIT may be integrated with SVN for local revisions. For example:


Development setup (2010-05-06)

Install django-1.1.1 to local machine's Python site-packages

Install pymox: http://code.google.com/p/pymox 0.5.3 into site-packages

Load and extract appengine SDK.

Download and extract GAEunit for Django, copying gaeunit into the test source tree (e.g., demo1-test).


Closure JavaScript Library

There are two packages:

One can "install" each of these in /usr/local/google/home//apps/ and symlink from the project.

Closure Library: $ mkdir /usr/local/google/home//apps $ svn checkout http://closure-library.googlecode.com/svn/trunk/ closure-library

Closure Compiler: Download the ZIP file $ mkdir /usr/local/google/home//apps/closure-compiler $ cd /usr/local/google/home//apps/closure-compiler $ unzip ~/Downloads/compiler-latest.zip

To set up sym links in the development tree, e.g.,

$ ln -s /usr/local/google/home//apps/closure-library \ closure $ ln -s /usr/local/google/home//apps/closure-compiler \ .closure_compiler


Testing the Setup

To run the demo1-test that contains the unit-testing infrastructure:

cd demo1-test make deploy_files make test

Then go to http://localhost:9094 in your browser

Click on the "login" link to log in with a dummy user

Go to http://localhost:9094/test to run the unit tests

To test changes usually does not require restarting the server:

By default demo1/template/base.html loads the compiled JavaScript:

lanternJs.js

For debugging, you may want to change it temporarily to:

lanternJs-bundle.js

DO NOT submit this change.


Typical work flow

To see remote branches: git branch -r

To see your local branches: git branch

To work on new features, based on trunk (git's master):

git checkout -b myfeature master

Make your changes, commits, etc to this branch.

Create a code-review branch in SVN when ready:

git svn branch -m 'Branch: Message' vchen-20100821 git checkout -b local/vchen-20100821 vchen-20100821

git format-patch --stdout --binary master..myfeature | git am -s3 git svn dcommit

Ask for review. Further review and commits and dcommits happen in local/vchen-20100821.

When complete, merge to trunk:

Once released, set a tag with the version:

git svn tag Lantern_2a

Delete SVN branches (after changes have been merged):

svn delete https://lantern.googlecode.com/svn/branches/vchen-20100821 git branch -D -r vchen-20100821 rm -rf .git/svn/refs/remotes/vchen-20100821

Garbage collect:

git gc

Get new revs from SVN into git:

git svn fetch

If someone else is also working on your branch and have submitted changes, update with:

git svn rebase


Branch and Merge w/out git (2010-06-28)

1) Creating a branch:

-To create a branch use svn copy: svn copy path_to_trunk path_to_new_branch -Branch name should be in the following format: username-date (eg. mukundjha-20100614) (eg. svn copy https://lantern.googlecode.com/svn/trunk \ https://lantern.googlecode.com/svn/branches/mukundjha-20100614 ) -Checkout the branch using svn checkout svn checkout https://lantern.googlecode.com/svn/branches/mukundjha-20100614 \ lantern_branch

2) Merging: To merge the branch back to trunk, follow the steps below. (NOTE:Make sure you have commited all changes to the branch before merging)


Deployment to AppEngine


Misc

To add ignores to directories:

svn propset svn:ignore -F ../.gitignore py public/images templates/app

where .gitignore contains patterns to ignore auto-generated files: