Skip to content

Commit

Permalink
Merge 7d61235 into 16f48ab
Browse files Browse the repository at this point in the history
  • Loading branch information
timokau committed Mar 11, 2020
2 parents 16f48ab + 7d61235 commit b0bceff
Showing 1 changed file with 177 additions and 0 deletions.
177 changes: 177 additions & 0 deletions CONTRIBUTING.rst
@@ -0,0 +1,177 @@
..
This is using section headings as in https://docutils.sourceforge.io/docs/user/rst/cheatsheet.txt,
i.e. the hierarchy is
surrounded by =
single =
-
============
Contributing
============

Contributions are welcome, and they are greatly appreciated!
Every little bit helps, and credit will always be given.

You can contribute in many ways:

Report Bugs
===========


Report bugs at the `issue tracker`_.

.. _issue tracker:
https://github.com/kiudee/cs-ranking/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.

Submit Feedback
===============

The best way to send feedback is to file an issue at https://github.com/kiudee/cs-ranking/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.
* Remember that this is a volunteer-driven project, and that contributions are welcome :)

Write Documentation
===================

This project could always use more documentation, whether as part of the official cs-ranking docs, in docstrings, or even on the web in blog posts, articles, and such.

Contribute Code
===============

Ready to contribute? Here's how to set up `cs-ranking` for local development.

1. Fork__ the ``cs-ranking`` repository on GitHub.

__ https://help.github.com/en/github/getting-started-with-github/fork-a-repo

2. Clone your fork locally::

$ git clone git@github.com:your_github_username_here/cs-ranking.git

Test

3. Optionally set up a virtual environment for development.
Assuming you have ``virtualenvwrapper`` installed:

.. code-block:: bash
$ mkvirtualenv cs-ranking
3. Install the required dependencies

.. code-block:: bash
$ cd cs-ranking/
$ pip install -r requirements-dev.txt
3. Install cs-ranking for local development

.. code-block:: bash
$ python setup.py develop
4. Create a branch for local development

.. code-block:: bash
$ git checkout -b name-of-your-bugfix-or-feature
Now you can make your changes locally.

5. When you're done making changes, check that the test suite still passes:

.. code-block:: bash
$ pytest
This might take several minutes.

6. Commit your changes and push your branch to GitHub:

.. code-block:: bash
$ git add .
$ git commit
$ git push origin name-of-your-bugfix-or-feature
Note that the second command will open an editor window in which you can write a commit message.
Take care to use a `good, descriptive commit message`__.

__ https://chris.beams.io/posts/git-commit/

7. Submit__ a pull request through the GitHub website.

__ https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request

Pull Request Guidelines
~~~~~~~~~~~~~~~~~~~~~~~

Before you submit a pull request, check that it meets these guidelines:

1. The pull request should include tests.
2. If the pull request adds functionality, the docs should be updated.
Put your new functionality into a function with a docstring, and add the feature to the list in README.rst.
3. The pull request should work for Python 3.5, 3.6, 3.7 and 3.8, and for PyPy.
Check travis_ and make sure that the tests pass for all supported Python versions.

.. _travis: https://travis-ci.org/github/kiudee/cs-ranking/pull_requests

Tips
~~~~

To run a subset of tests:

.. code-block:: bash
$ pytest tests.cs-ranking
Fix Bugs
~~~~~~~~

Look through the GitHub issues for bugs. Anything tagged with "bug"__ and "help
wanted"__ is open to whoever wants to implement it.
__ https://github.com/kiudee/cs-ranking/issues?q=is%3Aissue+label%3A%22bug%22+is%3Aopen
__ https://github.com/kiudee/cs-ranking/issues?q=is%3Aissue+label%3A%22help wanted%22+is%3Aopen
TODO good first issue
To get up and running with a dev-environment,

1. Clone the repository
2. Optionally enter a virtual env: `virtualenv ranking-env; source ranking-env/bin/activate`
3. Install all dependencies, including optional ones


Implement Features
~~~~~~~~~~~~~~~~~~

Look through the GitHub issues for features. Anything tagged with "enhancement" and "help wanted" is open to whoever wants to implement it.

Do Maintenance
==============

These tasks are mostly done by project maintainers, though if you think they need to be done you can of course open an issue and ask for it.
A pull request is even better.

Deploying
~~~~~~~~~

A reminder for the maintainers on how to deploy.
Make sure all your changes are committed (including an entry in HISTORY.rst).
Then run

.. code-block:: bash
$ bump2version patch # possible: major / minor / patch
$ git push
$ git push --tags
Travis will then deploy to PyPI if tests pass.

0 comments on commit b0bceff

Please sign in to comment.