### Public Lab welcomes and encourages community contributions to our open source software! This page is intended to: 1. List software projects that Public Lab has incubated and provide links to source code. 2. Collect software development guidelines and best practices for Public Lab projects. 3. Help newcomers figure out how and where to start contributing! ## Getting started For an excellent overview of contributing to open source projects in general, check out [How to contribute to an open source project on Github](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github). Quick tips for getting involved with the Public Lab codebases: 1. **Set up a GitHub account and install git.** If you're not familiar with git, a popular version control software, you can try it out at https://try.github.io. Speaking of GitHub...right now, all of Public Lab's open source code is located on GitHub, a website which hosts git repositories. Setting up a GitHub account is the first step to getting involved with Public Lab's code (and lots of other code). 2. **[Join](http://publiclab.org/wiki/mailing-lists) the Public Lab [developers mailing list](https://groups.google.com/forum/#!forum/plots-dev)** ## Contribution Guidelines Public Lab software is written in many languages, and each project may have its own guidelines for contributors. These broad guidelines should serve as general principles to guide your approach to a new Public Lab codebase. ### Contributing using git Check out this article on [GitHub flow](https://guides.github.com/introduction/flow/index.html), a routine that works great on all git projects and makes Public Lab development super smooth. ### A sample git workflow See [this activity](/n/15228) for a guide to **using branches and pull requests on GitHub*. For some additional tips for different scenarios, such as if you've forgotten to make your commits in a named feature branch and need to rewind your master, [see below](#Additional+workflows) ## Public Lab Software
Project Description Source Code
publiclab.org This very website! github:publiclab/plots2
MapKnitter Assemble aerial images into maps. github:publiclab/mapknitter
spectral-workbench.js JavaScript library for DIY spectrometry and data manipulation. github:spectral-workbench.js
Spectral Workbench Database and sharing platform for DIY spectrometry, which uses the above spectral-workbench.js library. github:spectral-workbench
Leaflet.Illustrate Leaflet plugin built for MapKnitter. Enables text annotations on Leaflet maps. github:manleyjster/Leaflet.Illustrate
Leaflet.DistortableImage Leaflet plugin built for MapKnitter. Enables images to be distorted. github:publiclab/Leaflet.DistortableImage
Infragram Analyze plant health with infrared imagery. github:p-v-o-s/infragram-js
MapMill Upload and collaboratively rank large batches of aerial imagery. github:publiclab/mapmill
**** ## Additional workflows ### Rewinding the master branch Sometimes you forget to make your commits on a named feature branch, and add commits to your master branch. You want to rewind the master branch back so you can pull in the latest changes from others, but you don't want to lose your work! It's all right, though -- you can follow these steps to rewind, update, and rebase your changes on top of the latest commits to Public Lab's master branch (shown here for the `plots2` repository): 1. `git checkout master` - go back to your master branch (your work is saved in the feature branch) 2. `git reset --hard 123456` -- rewind your master branch to a state before it diverged from our master (where `123456` is the commit hash just before your commits -- the latest one your history has in common with [the publiclab/plots repository's history](https://github.com/publiclab/plots2/commits/master)) 3. `git pull https://github.com/publiclab/plots2.git master` -- fetch publiclab's latest master 4. `git checkout feature-branch-name` -- go back to your saved feature branch, named something more descriptive than `feature-branch-name` 5. `git rebase master` -- this just detaches your latest changes (minus the deleted one) and reattaches or "replays" them onto the latest master. If you see merge errors, try [following this guide to resolve them](https://help.github.com/articles/resolving-merge-conflicts-after-a-git-rebase/). 6. `git push origin feature-branch-name` -- push up your newly re-based changes! (you can use `git push -f origin feature-branch-name` forces, to overwrite a PR if you've already opened one) 7. Go to https://github.com/publiclab/plots2 to look for the prompt to open a PR if you haven't already.