Report bugs at https://github.com/EUDAT-B2SHARE/b2share/issues.
If you are reporting a bug, please include:
- Your operating system name and version.
- Any details about your local setup that might be helpful in troubleshooting.
- Detailed steps to reproduce the bug.
Look through the GitHub issues for bugs. Anything tagged with "bug" is open to whoever wants to implement it.
Look through the GitHub issues for features. Anything tagged with "feature" is open to whoever wants to implement it.
B2Share could always use more documentation, whether as part of the official B2Share docs, in docstrings, or even on the web in blog posts, articles, and such.
The best way to send feedback is to file an issue at https://github.com/EUDAT-B2SHARE/b2share/issues.
If you are proposing a feature:
- Explain in detail how it would work.
- Keep the scope as narrow as possible, to make it easier to implement.
- Contributions are welcome, and they are greatly appreciated! Every
little bit helps, and credit will always be given.
Ready to contribute? Here's how to set up b2share for local development.
Fork the B2Share repo on GitHub.
Clone your fork locally:
$ git clone [email protected]:your_name_here/b2share.git
Install your local copy into a virtualenv.
$ mkvirtualenv b2share $ cd b2share/ $ pip install -e .[all]
Create a branch for local development:
$ git checkout -b name-of-your-bugfix-or-feature
Now you can make your changes locally.
When you're done making changes, check that your changes pass tests:
$ ./run-tests.sh
The tests will provide you with test coverage and also check PEP8 (code style), PEP257 (documentation), flake8 as well as build the Sphinx documentation and run doctests.
Commit your changes and push your branch to GitHub:
$ git add . $ git commit -s -m "Your detailed description of your changes." $ git push origin name-of-your-bugfix-or-feature
Submit a pull request through the GitHub website.
B2SHARE runs Python, which creates intermediate .pyc
files. When
switching branch uncommitted (ignored) files can remain. Before running
the server, make sure to remove all .pyc
files first.
NOTE: don't forget to rsync your files to the VM, if you're running Vagrant
cd /path/to/b2share
find . -name "*.pyc" -exec rm -rf {} \;
git branch `<targetbranch#issueno-some-desc>`
Once you have your fork, and local branch, keeping your branches updated is important. After numerous merges your branches can become outdated, and pull-requests are no longer able to automatically-merge, so fetch upstream regularly!
NOTE: before merging upstream, make sure you're on the correct branch locally!
Add remote upstream
Allows git to communicate to the remote git repository.
cd /path/to/your/b2share
git remote add upstream [email protected]:EUDAT-B2SHARE/b2share.git
Update master branch
git checkout master
git fetch upstream
git merge upstream/master
NOTE: when you've got pending commits, an error will be thrown
Update other branches
In this case branch 1.0 is merged, however you can replace this with any branch you want.
git checkout 1.0
git fetch upstream
git merge upstream/1.0
Before you submit a pull request, check that it meets these guidelines:
- The pull request should include tests and must not decrease test coverage.
- If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring.
- The pull request should work for Python 3.3, 3.4 and 3.5. Check https://travis-ci.org/EUDAT-B2SHARE/b2share/pull_requests and make sure that the tests pass for all supported Python versions.
Pull-requests should reference any corresponding issue.
Discovered a bug? Create an issue/ ticket first! Your fix
will be targeted at a specific version of B2SHARE only. The master
branch contains the latest and greatest features, whereas x.x
(currently 1.0) is the latest stable version. Bug fixes found on
production, QA or test servers are only pushed to the x.x
branch.