Skip to content

Commit

Permalink
Update coding style guide for docs, GAMS code
Browse files Browse the repository at this point in the history
  • Loading branch information
khaeru committed Apr 30, 2020
1 parent 4d1026e commit ead17e5
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,22 @@ Other tips
Code style
----------

- Python: follow `PEP 8 <https://www.python.org/dev/peps/pep-0008/>`_.
- R: follow the style of the existing code base.
- Jupyter notebooks (``.ipynb``): see below, under `Contributing tutorials`_.
- Documentation (``.rst``, ``.md``):
- **Python:**

- Follow `PEP 8 <https://www.python.org/dev/peps/pep-0008/>`_.
- Docstrings are in the `numpydoc format <https://numpydoc.readthedocs.io/en/latest/format.html>`_.

- **R:** follow the style of the existing code base.
- Jupyter notebooks (:file:`.ipynb`): see below, under `Contributing tutorials`_.
- **Documentation** for ReStructuredText in :file:`.rst` files, and inline in :file:`.gms` files:

- Do not hard-wrap lines.
- Start each sentence on a new line.
- Ensure Sphinx does not give warnings about ReST syntax for new or modified documentation.

- GAMS:

- Wrap lines at 121 characters, except for inline documentation (see above).

- Other (file names, CLI, etc.): follow the style of the existing code base.

Expand Down

0 comments on commit ead17e5

Please sign in to comment.