GaussPy welcomes new contributors. This document will guide you through the process.
If you have questions about how to use GaussPy, please direct these to the GaussPy Mailing List ([email protected]).
If you find a bug in the source code or a mistake in the documentation, you can help us by submitting an issue to our GitHub Issue Tracker. Even better you can submit a Pull Request with a fix for the issue you filed.
Before you submit your issue search the archive, maybe your question was already answered.
If your issue appears to be a bug, and hasn't been reported, open a new issue. Help us to maximize the effort we can spend fixing issues and adding new features, by not reporting duplicate issues. Providing the following information will increase the chances of your issue being dealt with quickly:
- Overview of the Issue - if an error is being thrown a stack trace helps
- Motivation for or Use Case - explain why this is a bug for you
- GaussPy Version - is it a named version or from our dev branch
- Operating System - Mac, windows? details help
- Suggest a Fix - if you can't fix the bug yourself, perhaps you can point to what might be causing the problem (line of code or commit)
Fork the project on GitHub and clone your copy.
$ git clone [email protected]:username/gausspy.git
$ cd gausspy
$ git remote add upstream git://github.com/gausspy/gausspy.git
All bug fixes and new features go into the dev branch.
We ask that you open an issue in the issue tracker and get agreement from at least one of the project maintainers before you start coding.
Nothing is more frustrating than seeing your hard work go to waste because your vision does not align with that of a project maintainer.
Okay, so you have decided to fix something. Create a feature branch and start hacking:
$ git checkout -b my-feature-branch -t origin/dev
Make sure git knows your name and email address:
$ git config --global user.name "J. Random User"
$ git config --global user.email "[email protected]"
Writing good commit logs is important. A commit log should describe what changed and why. Follow these guidelines when writing one:
- The first line should be 50 characters or less and contain a short description of the change including the Issue number prefixed by a hash (#).
- Keep the second line blank.
- Wrap all other lines at 72 columns.
A good commit log looks like this:
Fixing Issue #123: make the whatchamajigger work
Body of commit message is a few lines of text, explaining things
in more detail, possibly giving some background about the issue
being fixed, etc etc.
The body of the commit message can be several paragraphs, and
please do proper word-wrap and keep columns shorter than about
72 characters or so. That way `git log` will show things
nicely even when it is indented.
The header line should be meaningful; it is what other people see when they
run git shortlog
or git log --oneline
.
Use git rebase
(not git merge
) to sync your work from time to time.
$ git fetch upstream
$ git rebase upstream/dev
We are working hard to improve GaussPy's testing. If you add new functions
in Python code then please write unit tests in the tests/ directory.
When finished, verify that the self-test works. First install pytest
pip install pytest
Then run the tests via:
pytests tests
Make sure that all tests pass. Please, do not submit patches that fail.
$ git push origin my-feature-branch
Go to https://github.com/username/gausspy and select your feature branch. Click the 'Pull Request' button and fill out the form.
Pull requests are usually reviewed within a week. If you get comments that need to be to addressed, apply your changes in a separate commit and push that to your feature branch. Post a comment in the pull request afterwards; GitHub does not send out notifications when you add commits to existing pull requests.
That's it! Thank you for your contribution!
After your pull request is merged, you can safely delete your branch and pull the changes from the main (upstream) repository:
-
Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
git push origin --delete my-feature-branch
-
Check out the dev branch:
git checkout dev -f
-
Delete the local branch:
git branch -D my-feature-branch
-
Update your dev with the latest upstream version:
git pull --ff upstream dev