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
* Switched from flakeheaven to ruff as linter
* Changed docs to now use ruff instead of flakeheaven
* Skip other jobs in CI (revert once change is finished)
* Corrected linting error about not chaning exceptions (B904)
* Corrected linting error about assigning names to lambdas (E731)
* Corrected issue with true-fals-comparisons
* Corrected tests if not member (E713)
* Corrected accessing attributes without assigning them (B018)
* Readded all Tests from CI
* Corrected empty lines with whitespaces (W293)
* Removed trailing whitespaces (W291)
* Corrected comparison to None (E711)
* Forgot to add linebreaks when corrected lambdas
Copy file name to clipboardExpand all lines: docs/contrib/02_continuous_integration.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,17 +6,17 @@ Finally, the CI also build artifacts that are used to generate the documentation
6
6
7
7
## Code linting
8
8
9
-
Code style linting is performed using [black](https://black.readthedocs.io/en/stable/) and [flakeheaven](https://flakeheaven.readthedocs.io/en/latest/) for code syntax checking. In particular, `black` is used to check compliance with (most of) [PEP-8 guidelines](https://peps.python.org/pep-0008/).
9
+
Code style linting is performed using [black](https://black.readthedocs.io/en/stable/) and [ruff](https://docs.astral.sh/ruff/) for code syntax checking. In particular, `black` is used to check compliance with (most of) [PEP-8 guidelines](https://peps.python.org/pep-0008/).
10
10
11
11
Those tests are conducted for each commit (even for forks), but you can also run it locally in the root folder of `pySDC` before pushing any commit :
12
12
13
13
```bash
14
14
# Install required packages (works also with conda/mamba)
15
-
pip install black flakeheaven flake8-comprehensions flake8-bugbear
15
+
pip install black ruff
16
16
# First : test code style linting with black
17
17
black pySDC --check --diff --color
18
-
# Second : test code syntax with flakeheaven
19
-
flakeheaven lint --benchmark pySDC
18
+
# Second : test code syntax with ruff
19
+
ruff check pySDC
20
20
```
21
21
22
22
> :bell: To avoid any error about formatting (`black`), you can simply use this program to reformat your code directly using the command :
@@ -59,7 +59,7 @@ fi
59
59
You may need to run `chmod +x` on the file to allow it to be executed.
60
60
Be aware that the hook will alter files you may have opened in an editor whenever you make a commit, which may confuse you(r editor).
61
61
62
-
To automate flakeheaven, we want to write a hook that alters the commit message in case any errors are detected. This gives us the choice of aborting the commit and fixing the issues, or we can go ahead and commit them and worry about flakeheaven only when the time comes to do a pull request.
62
+
To automate ruff, we want to write a hook that alters the commit message in case any errors are detected. This gives us the choice of aborting the commit and fixing the issues, or we can go ahead and commit them and worry about ruff only when the time comes to do a pull request.
63
63
To obtain this functionality, add the following to `<pySDC-root-directory>/.git/hooks/prepare-commit-msg`:
64
64
65
65
```bash
@@ -71,11 +71,11 @@ export files=$(git diff --staged --name-only HEAD | grep .py | sed -e "s,^,$(git
0 commit comments