Skip to content

Commit 574adfe

Browse files
committed
MAINT: update contributor guide concerning lint
(pytest-pep8 -> ruff)
1 parent f6c3d17 commit 574adfe

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

doc/source/contribute.rst

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ It is built to various formats using `Sphinx <http://sphinx-doc.org/>`_
2323
and `nbsphinx <https://nbsphinx.readthedocs.io>`_.
2424

2525
The unit tests are written using the `pytest library <https://docs.pytest.org>`_.
26-
The compliance with the PEP8 conventions is tested using the extension
27-
`pytest-pep8 <https://pypi.org/project/pytest-pep8/>`_.
26+
The compliance with the PEP8 conventions is tested using `ruff <https://github.com/astral-sh/ruff/>`_.
2827

2928
Many editors and IDE exist to edit Python code and provide integration with version control tools (like git).
3029
A good IDE, such as PyCharm, can make many of the steps below much more efficient.
@@ -90,16 +89,15 @@ One of the easiest way to do it is via `Anaconda` or `Miniconda`:
9089

9190
We'll now kick off a two-step process:
9291

93-
1. Install the build dependencies
92+
1. Install the dependencies
9493

9594
.. code-block:: none
9695
97-
# add 'conda-forge' channel (required to install some dependencies)
98-
conda config --add channels conda-forge
99-
100-
# Create and activate the build environment
101-
conda create -n larray_dev numpy pandas pytables pyqt qtpy matplotlib openpyxl xlsxwriter pytest pytest-pep8
96+
# Create and activate the environment
97+
conda create -n larray_dev numpy pandas pytables pyqt qtpy matplotlib openpyxl xlsxwriter pytest
10298
conda activate larray_dev
99+
# Install ruff (as of September 2023, it is not available on Anaconda)
100+
pip install ruff
103101
104102
This will create the new environment, and not touch any of your existing environments,
105103
nor any existing Python installation.
@@ -114,7 +112,7 @@ To return to your root environment::
114112

115113
See the full conda docs `here <http://conda.pydata.org/docs>`_.
116114

117-
2. Build and install larray
115+
2. Install larray in "development mode"
118116

119117
Install larray using the following command:
120118

@@ -181,6 +179,12 @@ code conventions. Among others, this means:
181179

182180
This summary should not prevent you from reading the PEP!
183181

182+
You can check your code respects most of those conventions and some other style guidelines by running
183+
the following command in the project directory: ::
184+
185+
> ruff check .
186+
187+
184188
Step 3: Document your code
185189
~~~~~~~~~~~~~~~~~~~~~~~~~~
186190

@@ -262,8 +266,6 @@ Step 4: Test your code
262266

263267
Our unit tests are written using the `pytest library <https://docs.pytest.org>`_
264268
and our tests modules are located in `/larray/tests/`.
265-
We also use its extension `pytest-pep8 <https://pypi.org/project/pytest-pep8/>`_
266-
to check if the code is PEP8 compliant.
267269
The pytest library is able to automatically detect and run unit tests
268270
as long as you respect some conventions:
269271

@@ -359,8 +361,8 @@ To submit a pull request:
359361
#. Click ``Send Pull Request``.
360362

361363
This request then goes to the repository maintainers, and they will review the code.
362-
Your modifications will also be automatically tested by running the *larray* test suite on
363-
`Travis-CI <https://travis-ci.org/>`__ continuous integration service. A pull request will only be
364+
Your modifications will also be automatically tested by running the *larray* test suite via Github actions
365+
continuous integration service. A pull request will only be
364366
considered for merging when you have an all 'green' build.
365367
If any tests are failing, then you will get a red 'X', where you can click through to see the individual failed tests.
366368

0 commit comments

Comments
 (0)