Skip to content

Commit

Permalink
EHN: Add linting instruction in CONTRIBUTING.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
bksahu committed Jan 4, 2019
1 parent e1fa491 commit 68d50f2
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions CONTRIBUTING.rst
Expand Up @@ -2,10 +2,10 @@ Contributing guidelines
=======================

This page explains how you can contribute to the development of `statsmodels`
by submitting patches, statistical tests, new models, or examples.
by submitting patches, statistical tests, new models, or examples.

`statsmodels` is developed on `Github <https://github.com/statsmodels/statsmodels>`_
using the `Git <http://git-scm.com/>`_ version control system.
`statsmodels` is developed on `Github <https://github.com/statsmodels/statsmodels>`_
using the `Git <http://git-scm.com/>`_ version control system.

Submitting a Bug Report
~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -25,24 +25,35 @@ For a pull request to be accepted, you must meet the below requirements. This gr
- Each function, class, method, and attribute needs to be documented using docstrings. We conform to the `numpy docstring standard <https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt#docstring-standard>`_.
- If you are adding new functionality, you need to add it to the documentation by editing (or creating) the appropriate file in ``docs/source``.
- Make sure your documentation changes parse correctly. Change into the top-level ``docs/`` directory and type::

make clean
make html

Check that the build output does not have *any* warnings due to your changes.
Check that the build output does not have *any* warnings due to your changes.
- Finally, please add your changes to the release notes. Open the ``docs/source/release/versionX.X.rst`` file that has the version number of the next release and add your changes to the appropriate section.

Linting
~~~~~~~

Due to the way we have the CI builds set up, the linter won't do anything unless the environmental variable $LINT is set to a truthy value.

- On MacOS/Linux

LINT=true ./lint.sh

- Dependencies: flake8, git

How to Submit a Pull Request
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

So you want to submit a patch to `statsmodels` but aren't too familiar with github? Here are the steps you need to take.

1. `Fork <https://help.github.com/articles/fork-a-repo>`_ the `statsmodels repository <https://github.com/statsmodels/statsmodels>`_ on Github.
2. `Create a new feature branch <http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging>`_. Each branch must be self-contained, with a single new feature or bugfix.
2. `Create a new feature branch <http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging>`_. Each branch must be self-contained, with a single new feature or bugfix.
3. Make sure the test suite passes. This includes testing on Python 3. The easiest way to do this is to either enable `Travis-CI <https://travis-ci.org/>`_ on your fork, or to make a pull request and check there.
4. Document your changes by editing the appropriate file in ``docs/source/``. If it is a big, new feature add a note and an example to the latest ``docs/source/release/versionX.X.rst`` file. See older versions for examples. If it's a minor change, it will be included automatically in our relase notes.
5. Add an example. If it is a big, new feature please submit an example notebook by following `these instructions <https://www.statsmodels.org/devel/dev/examples.html>`_.
6. `Submit a pull request <https://help.github.com/articles/using-pull-requests>`_
6. `Submit a pull request <https://help.github.com/articles/using-pull-requests>`_

Mailing List
~~~~~~~~~~~~
Expand All @@ -58,5 +69,5 @@ offers much more detailed information about the process.
License
~~~~~~~

Statsmodels is released under the
Statsmodels is released under the
`Modified (3-clause) BSD license <http://www.opensource.org/licenses/BSD-3-Clause>`_.

0 comments on commit 68d50f2

Please sign in to comment.