Skip to content

Commit

Permalink
missing s for image and reorder
Browse files Browse the repository at this point in the history
  • Loading branch information
nilshempelmann committed Jan 9, 2019
1 parent 38c59bd commit 9e40115
Showing 1 changed file with 64 additions and 64 deletions.
128 changes: 64 additions & 64 deletions docs/source/dev_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Developer Guidelines

.. contents::
:local:
:depth: 2
:depth: 1

.. _codeofconduct:

Expand Down Expand Up @@ -39,67 +39,6 @@ To keep track on the contribution and development, please use the issue tracker
Please find the coding guide in the
`Wiki <https://github.com/bird-house/bird-house.github.io/wiki/Development-Guidelines>`_.


.. _codestyle:

Code Style
-----------

A good start to contribute is an enhancement of existing code with better or new functions. To respect a common coding style, Birdhouse uses PEP8_ checks to ensure a consistent coding style. Currently the following PEP8 rules are enabled in ``setup.cfg``:

.. code-block:: ini
[flake8]
ignore=F401,E402
max-line-length=120
exclude=tests
See the flake8_ documentation on how to configure further options.

To check the coding style run ``flake8``:

.. code-block:: sh
$ flake8 emu # emu is the folder with python code
# or
$ make pep8 # make calls flake8
To make it easier to write code according to the PEP8 rules enable PEP8 checking in your editor. In the following we give examples how to enable code checking for different editors.

Atom
....

* Homepage: https://atom.io/
* PEP8 Atom Plugin: https://github.com/AtomLinter/linter-pep8

.. image:: _images/atom-pep8.png


Sublime
.......

* Install package control if you don't already have it: https://packagecontrol.io/installation
* Follow the instructions here to install Python PEP8 Autoformat: https://packagecontrol.io/packages/Python%20PEP8%20Autoformat
* Edit the settings to conform to the values used in birdhouse, if necessary
* To show the ruler and make wordwrap default, open Preferences → Settings—User and use the following rules

.. code-block:: python
{
// set vertical rulers in specified columns.
"rulers": [79],
// turn on word wrap for source and text
// default value is "auto", which means off for source and on for text
"word_wrap": true,
// set word wrapping at this column
// default value is 0, meaning wrapping occurs at window width
"wrap_width": 79
}
.. todo:: Add PEP8 instructions for more editors: PyCharm, Kate, Emacs, Vim, Spyder.
.. _writing_WPS_process:

Writing a WPS process
Expand Down Expand Up @@ -132,7 +71,8 @@ Writing functions:
A Process is calling several functions during the performance. Since WPS is a autonom running process several eventualities needs to be taken into account. If irregularities are occurring, it is a question of the process design if the performance should stop and return an error or continue with may be an modified result.

In practice, the functions should be encapsulated in **try** and **except** calls and appropriate information given to the logfile or shown as a status message. The logger has several options to to influence the running code and the information writing to the logfile:
.. image:: _image/module_chain.png

.. image:: _images/module_chain.png

.. code-block:: python
:linenos:
Expand Down Expand Up @@ -172,7 +112,6 @@ Writing tests
.. todo:: Guideline to write tests. Look at the Emu_ to see examples.
.. _writing_docs:
Writing documentation
Expand All @@ -192,6 +131,67 @@ The main `documentation`_ (which you are reading now) is the starting point to
get an overview of birdhouse. Each birdhouse component comes with
its own Sphinx documentation and is referenced by the main birdhouse document.
.. _codestyle:
Code Style
-----------
A good start to contribute is an enhancement of existing code with better or new functions. To respect a common coding style, Birdhouse uses PEP8_ checks to ensure a consistent coding style. Currently the following PEP8 rules are enabled in ``setup.cfg``:
.. code-block:: ini
[flake8]
ignore=F401,E402
max-line-length=120
exclude=tests
See the flake8_ documentation on how to configure further options.
To check the coding style run ``flake8``:
.. code-block:: sh
$ flake8 emu # emu is the folder with python code
# or
$ make pep8 # make calls flake8
To make it easier to write code according to the PEP8 rules enable PEP8 checking in your editor. In the following we give examples how to enable code checking for different editors.
Atom
....
* Homepage: https://atom.io/
* PEP8 Atom Plugin: https://github.com/AtomLinter/linter-pep8
.. image:: _images/atom-pep8.png
Sublime
.......
* Install package control if you don't already have it: https://packagecontrol.io/installation
* Follow the instructions here to install Python PEP8 Autoformat: https://packagecontrol.io/packages/Python%20PEP8%20Autoformat
* Edit the settings to conform to the values used in birdhouse, if necessary
* To show the ruler and make wordwrap default, open Preferences → Settings—User and use the following rules
.. code-block:: python
{
// set vertical rulers in specified columns.
"rulers": [79],
// turn on word wrap for source and text
// default value is "auto", which means off for source and on for text
"word_wrap": true,
// set word wrapping at this column
// default value is 0, meaning wrapping occurs at window width
"wrap_width": 79
}
.. todo:: Add PEP8 instructions for more editors: PyCharm, Kate, Emacs, Vim, Spyder.
Environment with conda
----------------------
Expand Down

0 comments on commit 9e40115

Please sign in to comment.