-
Notifications
You must be signed in to change notification settings - Fork 46
Getting started with Myria development
This page explains how to get started with Myria development using GitHub, Git, and Eclipse.
To participate in this project, you'll need a GitHub account. If you don't already have one, proceed to https://github.com/signup/free. Then fork Myria to create a copy of the codebase in your account.
Life is generally easier if you can use to pull (download) and push (upload) changes from/to GitHub without logging in every time. To do so, you'll want to create a public/private keypair and upload the public key to GitHub.
To create keys, on Mac OS X, use ssh-keygen
. These instructions use the default path of ~/.ssh/id_rsa
, but you may wish to change this if you already have SSH keys set up for a different purpose. In that case, you can skip key generation and go ahead to uploading your public key to GitHub. Or you can create a new, GitHub-specific public/private keypair by adapting the instructions below.
$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/dhalperi/.ssh/id_rsa): [empty will pick the default]
Enter passphrase (empty for no passphrase): [leave empty]
Enter same passphrase again: [leave empty]
Your identification has been saved in /home/dhalperi/.ssh/id_rsa.
Your public key has been saved in /home/dhalperi/.ssh/id_rsa.pub.
...
Then get the public key
$ cat .ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAsMpYkp2spkMzjJi5iK0TETAkw1DfnDey93tXSs/pn30y
IHsgs9BXnalUrriUZ48xaBlEF9lEiXQ1oq621LP1psTnhY2B6Uh0JKb1RyX8lGfjjD5shMUu69ceWbhU
vWFtcHYZQeQAUmU+r1v26eIEvGG2fEtvxUItERrUoLrD7R5jgza3nGNxK2+3aVb+rIMdUpYHalsj8PU2
ddDVe3VjURTSG1m42gALlbUAWnuUKaBIqVhiNikKaPFzAf1MCoa+LLBxzY5E9BpxUiqN4nxvYI2lb4QY
0T/bRKsLDbrgR8iGnxyDTUsDmHs5TIe+xOIrRnySaZdeCJNFDMV/gMx7Pw== dhalperi@dsp
And add it as a new public key into GitHub's SSH settings here: https://github.com/settings/ssh
The Myria project uses Git for content management. (You can probably tell this, given that you're on GitHub.com after all.) This means that your computer will need to have the git
utility installed.
- On Mac OS X, you can obtain
git
by installing the XCode command line tools. - On many flavors of Linux, you can obtain
git
via your package manager, usually under the package namegit-core
.- For instance, on Ubuntu:
sudo apt-get install git-core
- For instance, on Ubuntu:
- On Windows, I'm not sure. Use Google, and then please update this Wiki page.
git config --global user.email [email protected]
git config --global user.name "Daniel Halperin"
What you do here depends on the version of git
you have.
-
Determine your
git
version withgit --version
a. if you have
git
version 1.7.11 or later, do this:git config --global push.default simple
b. otherwise, do this:
git config --global push.default current
This is a bit complicated to explain, but this command changes the default behavior of git push
with no arguments to something safe and sane. Making this option not the default was a mistake, which will be rectified when "Git 2.0" is released. In the meantime, this is the workaround. See git config --help
for more information.
At the time of writing, Eclipse 4.2 (Juno) is the newest version. You can download it from http://eclipse.org/downloads/. Your best bet might be the Eclipse IDE for Java Developers http://eclipse.org/downloads/packages/eclipse-ide-java-developers/junosr1, but the Classic (and probably any other version) would work just fine as well.
We use a number of Eclipse plugins that help us find bugs and other problems in our code.
- FindBugs, from the PL group at the University of Maryland. See instructions at http://findbugs.cs.umd.edu/eclipse/
- Checkstyle is an open source tool that helps us write good code. See instructions at http://eclipse-cs.sourceforge.net/downloads.html
Navigate to your personal copy of the Myria codebase, usually at https://github.com/uwescience/myria where you substitute your user name for uwescience
. On that project page, a prominent box in the top-center of the screen shows the repository address. Generally, it defaults to HTTP, but we want to use SSH so that we do not need to authenticate every time. (See step 1 above). Push the SSH button and then copy the resulting URL.
(The repository SSH URL should be [email protected]:<your user name>/myria.git
, but go make sure you can find it yourself.)
Then you can clone it using the command line:
$ git clone [email protected]:<your user name>/myria.git
Cloning into 'myria'...
remote: Counting objects: 2208, done.
remote: Compressing objects: 100% (585/585), done.
remote: Total 2208 (delta 1125), reused 2127 (delta 1054)
Receiving objects: 100% (2208/2208), 18.34 MiB | 119 KiB/s, done.
Resolving deltas: 100% (1125/1125), done.
Now you have the code set up locally!
First, switch into the directory, of course.
$ cd myria
Then use gradlew
to make the Eclipse .classpath
file ( gradlew
is a gradle
wrapper, use ./gradle.bat
if you are using Windows )
$ ./gradlew eclipseClasspath
:cleanEclipseClasspath
:eclipseClasspath
BUILD SUCCESSFUL
Total time: 12.401 secs
File > Import > Existing projects into workspace
If you intend to contribute to Myria, please ensure that your PRs:
- Do not introduce any new Java or Checkstyle warnings in Eclipse, unless you are willing to argue why they can be safely ignored.
- Meet Google's Java Style guide.
If you are experiencing erratic behaviour or Eclipse with many errors, try the following:
Click on the project myria
and press F5
Project > Clean...
Type the command below in the command prompt
$ ./gradlew eclipseClasspath
:cleanEclipseClasspath
:eclipseClasspath
BUILD SUCCESSFUL
Total time: 12.401 secs