You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/contribute.rst
+9-14Lines changed: 9 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,29 +10,24 @@ If you are comfortable fixing the issue, please do so and submit a pull request.
10
10
11
11
Coding style
12
12
------------
13
-
We use `black<https://github.com/psf/black>`_ for formatting.
14
-
Please install it following its documentation, and run it with the command line argument ``-l 120``, for example at the project root directory:
13
+
We use `ruff<https://github.com/astral-sh/ruff>`_ and `pre-commit <https://github.com/pre-commit/pre-commit/>`_ for linting and formatting.
14
+
Please find the instructions in `this page <https://mdolab-mach-aero.readthedocs-hosted.com/en/latest/machFramework/contribute.html#coding-style>`_.
15
15
16
-
.. prompt:: bash
16
+
Additionally, we use `isort <https://github.com/PyCQA/isort>`_ for import sorting.
17
+
Please install it by
17
18
18
-
black . -l 120
19
+
.. prompt:: bash
19
20
20
-
This will automatically format all Python files.
21
+
pip install isort
21
22
22
-
We use `flake8 <https://flake8.pycqa.org/en/latest/>`_ for linting.
23
-
Please install it following its instructions, and run it at the project root with:
23
+
and fix the sorting of all files by running:
24
24
25
25
.. prompt:: bash
26
26
27
-
flake8 .
28
-
29
-
The configuration file we use for flake8 is a combination of `this file <https://github.com/mdolab/.github/blob/master/.flake8>`__ and the one at the root of this repository.
30
-
If there are any PEP-8 violations, ``flake8`` will print out the nature of the violation.
31
-
We run continuous integration with these tools on all pull requests submitted.
32
-
For an easier workflow, we recommend integrating these tools with your code editor.
27
+
isort .
33
28
34
29
.. warning::
35
-
For a PR to be accepted, it must pass all GitHub checks, which include both formatting checks with ``black`` and syntax checks with ``flake8``.
30
+
For a PR to be accepted, it must pass all GitHub checks, which include formatting and syntax checks with ``ruff`` and ``pre-commit`` and import sorting checks with ``isort``.
0 commit comments