@@ -23,8 +23,7 @@ It is built to various formats using `Sphinx <http://sphinx-doc.org/>`_
23
23
and `nbsphinx <https://nbsphinx.readthedocs.io >`_.
24
24
25
25
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/ >`_.
28
27
29
28
Many editors and IDE exist to edit Python code and provide integration with version control tools (like git).
30
29
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`:
90
89
91
90
We'll now kick off a two-step process:
92
91
93
- 1. Install the build dependencies
92
+ 1. Install the dependencies
94
93
95
94
.. code-block :: none
96
95
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
102
98
conda activate larray_dev
99
+ # Install ruff (as of September 2023, it is not available on Anaconda)
100
+ pip install ruff
103
101
104
102
This will create the new environment, and not touch any of your existing environments,
105
103
nor any existing Python installation.
@@ -114,7 +112,7 @@ To return to your root environment::
114
112
115
113
See the full conda docs `here <http://conda.pydata.org/docs >`_.
116
114
117
- 2. Build and install larray
115
+ 2. Install larray in "development mode"
118
116
119
117
Install larray using the following command:
120
118
@@ -181,6 +179,12 @@ code conventions. Among others, this means:
181
179
182
180
This summary should not prevent you from reading the PEP!
183
181
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
+
184
188
Step 3: Document your code
185
189
~~~~~~~~~~~~~~~~~~~~~~~~~~
186
190
@@ -262,8 +266,6 @@ Step 4: Test your code
262
266
263
267
Our unit tests are written using the `pytest library <https://docs.pytest.org >`_
264
268
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.
267
269
The pytest library is able to automatically detect and run unit tests
268
270
as long as you respect some conventions:
269
271
@@ -359,8 +361,8 @@ To submit a pull request:
359
361
#. Click ``Send Pull Request ``.
360
362
361
363
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
364
366
considered for merging when you have an all 'green' build.
365
367
If any tests are failing, then you will get a red 'X', where you can click through to see the individual failed tests.
366
368
0 commit comments