We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's
- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Becoming a maintainer
Here, on GitHub! We use GitHub to host the code, track issues, and feature requests, and accept pull requests.
Setup for developers differs from the package installation from PyPI
.
- Fork the
imgw-data-loader
repository. - Clone forked repository.
- Connect the main repository with your fork locally:
git remote add upstream https://github.com/SimonMolinsky/imgw-data-loader.git
- Synchronize your repository with the core repository.
git checkout main
git pull upstream main
- Create your branch.
git checkout -b name-of-your-branch
- Create virtual environment or conda environment.
- Activate your environment.
- Install requirements listed in the
requirements-dev.txt
file.
Virtual Environment
>> (your-virtual-environment) pip install -r requirements-dev.txt
Conda
>> (your-conda-environment) conda install -c conda-forge --file requirements-dev.txt
- Make changes in a code or write something new.
- Write tests if required.
- Perform tests with
pytest
. (Run tests from thetests
directory).
>> (your-environment) (your-username:~/path/wsknn/tests) pytest
- If all tests pass, push changes into your fork.
git add .
git commit -m "description what you have done"
git push origin name-of-your-branch
- Navigate to your repository. You should see a button
Compare and open a pull request
. Use it to make a pull request! Send it to thedev
branch in the main repository. Don't send pull requests into themain
branch of the core repository!
We Use Github Flow, So All Code Changes Happen Through Pull Requests
Pull requests are the best way to propose changes to the codebase (we use Github Flow). We actively welcome your pull requests:
- Fork the repo and create your branch from
main
. - If you've added code that should be tested, add tests in the
test
package. We use Python'spytest
package to perform testing. - If you've changed APIs, update the documentation.
- Ensure the test suite passes. Run tests from
tests
directory, otherwise you will encounter an error. - Make sure your code lints, you can use
flake8
or linters included in IDE (e.g.: Pycharm). Linters check PEP8 Python Guidelines, and it is recommended to read them first. - Issue that pull request.
In short, when you submit code changes, your submissions are understood to be under the same [BSD 3-Clause "New" or "Revised" License] that covers the project. Feel free to contact the maintainers if that's a concern.
Report bugs using Github's issues
We use GitHub issues to track public bugs. Report a bug by opening a new issue.
Great Bug Reports tend to have:
- A quick summary and/or background
- Steps to reproduce
- Be specific!
- Give sample code if you can.
- What you expected would happen
- What actually happens
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)
People love thorough bug reports.
By contributing, you agree that your contributions will be licensed under its BSD 3-Clause "New" or "Revised" License.
This document was adapted from the open-source contribution guidelines for Facebook's Draft
- You have an idea to speed-up computation. You plan to use
multiprocessing
package for it. - Fork repo from
main
branch and at the same time propose change or issue in the project issues. - Create the new child branch from the forked
main
branch. Name it asdev-your-idea
. In this case,dev-multiprocessing
is descriptive enough. - Code in your branch.
- Create a few unit tests in the
tests
directory or re-design actual tests if needed. For programming cases, write unit tests, for mathematical and logic problems, write functional tests. Use data from thetests/tdata
directory. - Multiprocessing may not require new tests. But always run
pytest
in thetests
directory after any change in the code and check if every test has passed. - Run all tutorials (
demo-notebooks
). Their role is more than just informational. They serve as a functional test playground. - If everything is okay, make a pull request from your forked repo.