File tree 1 file changed +11
-9
lines changed
1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -262,28 +262,30 @@ When generating a figure, please ensure:
262
262
263
263
## Check Style of Notebooks
264
264
265
- We can check and autoformat the code style within the notebooks using [ ` ruff ` ] [ ruff ] and
266
- [ ` nbqa ` ] [ nbqa ] .
265
+ We can check the code style of our notebooks using [ ` ruff ` ] [ ruff ] .
266
+ Simply run the following command to check the style of the notebooks:
267
267
268
- To check the style of the notebooks:
268
+ ``` bash
269
+ ruff check notebooks
270
+ ```
271
+
272
+ You can run the following that the notebooks are correctly formatted:
269
273
270
274
``` bash
271
- nbqa ruff notebooks
275
+ ruff format --check notebooks
272
276
```
273
277
274
- To perform auto reformatting on the notebooks :
278
+ And run this to autoformat them :
275
279
276
280
``` bash
277
- nbqa ruff --fix notebooks
281
+ ruff format --fix notebooks
278
282
```
279
283
280
284
Alternatively, you can use the targets we have in the ` Makefile ` , like `make
281
285
check` and ` make format`. Read more information about the available targets
282
286
by running ` make help ` .
283
287
284
-
285
-
286
-
288
+ [ ruff ] : https://astral.sh/ruff
287
289
[ install-mystmd ] : https://mystmd.org/guide/quickstart
288
290
[ jupyter ] : https://jupyter.org
289
291
[ mystmd.org ] : https://mystmd.org
You can’t perform that action at this time.
0 commit comments