Skip to content

Latest commit

 

History

History
88 lines (67 loc) · 3.02 KB

CONTRIBUTING.md

File metadata and controls

88 lines (67 loc) · 3.02 KB

Contributing

Thank you for your interest in contributing to the wikipron codebase!

This page assumes that you have already created a fork of the wikipron repo under your GitHub account and have the codebase available locally for development work. If you have followed these steps, then you are all set.

Working on a Feature or Bug Fix

The development steps below assumes that your local Git repo has a remote upstream link to kylebgorman/wikipron:

git remote add upstream https://github.com/kylebgorman/wikipron.git

After this step (which you only have to do once), running git remote -v should show your local Git repo has links to both "origin" (pointing to your fork <your-github-username>/wikipron) and "upstream" (pointing to kylebgorman/wikipron).

To work on a feature or bug fix, here are the development steps:

  1. Before doing any work, check out the master branch and make sure that your local master branch is up-to-date with upstream master:

    git checkout master
    git pull upstream master
  2. Create a new branch. This branch is where you will make commits of your work. (As best practice, never make commits while on a master branch. Running git branch tells you which branch you are on.)

    git checkout -b new-branch-name
  3. Make as many commits as needed for your work.

  4. When you feel your work is ready for a pull request, push your branch to your fork.

    git push origin new-branch-name
  5. Go to your fork https://github.com/<your-github-username>/wikipron and create a pull request off of your branch against the kylebgorman/wikipron repo.

  6. Add an entry to CHANGELOG.md, commit this change, and push this commit to your branch.

Documentation

  • If relevant, please update the top-level README for your changes.

  • To document functions and class methods, please name them transparently and type them. If it helps, please add a one-liner docstring immediately under the function signature, in the form of """Docstring here""" with triple double quotes. For more elaborate docstrings, please follow the numpydoc docstring format.

Running Tests

The wikipron repo has continuous integration (CI) turned on, with autobuilds running pytest and flake8 for the test suite (in the tests/ directory) and code style checks, respectively. If an autobuild at a pending pull request fails because of pytest or flake8 errors, then the errors must be fixed by further commits pushed to the branch by the author.

If you would like to help avoid wasting free Internet resources (every push triggers a new CI autobuild), you can run pytest and flake8 checks locally before pushing commits:

flake8 setup.py wikipron/ tests/
pytest -vv tests/