Skip to content

Commit

Permalink
Merge pull request #886 from jhlegarreta/DocumentStyleEnforcement
Browse files Browse the repository at this point in the history
DOC: Document the coding style enforcement framework
  • Loading branch information
skoudoro authored May 6, 2024
2 parents ec765e8 + aae0d87 commit daba6ce
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,34 @@ Since Xvfb will require an X server (we also recommend to install XQuartz packag
export DISPLAY=:0
xvfb-run --server-args="-screen 0 1920x1080x24" pytest -svv fury
Coding style
------------

FURY uses the standard Python `PEP8 <https://peps.python.org/pep-0008/>`_
style to ensure the readability and consistency across the toolkit. FURY has
adopted an automated style checking framework that uses `pre-commit <https://pre-commit.com/>`_
and `ruff <https://docs.astral.sh/ruff/>`_. Style conformance rules are
specified in the ``ruff.toml`` configuration file. When requesting to push to
FURY, the compliance to the set of rules is automatically checked using a
GitHub Actions workflow.

In order to check the compliance locally, developers should install the
``[style]`` dependencies:

.. code-block:: shell
pip install -e .[style]
The git hook scripts need to be installed then running:

.. code-block:: shell
pre-commit install
``pre-commit`` will then run automatically on ``git commit``.

Most text editors can be configured to check the compliance of your code with
the set of rules specified in the ``ruff.toml`` file.

Populating our Documentation
----------------------------
Expand Down

0 comments on commit daba6ce

Please sign in to comment.