File tree Expand file tree Collapse file tree 3 files changed +22
-14
lines changed Expand file tree Collapse file tree 3 files changed +22
-14
lines changed Original file line number Diff line number Diff line change 23
23
cache : ' pip'
24
24
- run : pip install -r requirements.txt
25
25
26
- - name : Lint model code
26
+ - name : Lint
27
27
run : |
28
- pylint ./simulation
29
-
30
- - name : Lint tests
31
- run : |
32
- pylint ./tests
33
-
34
- - name : Lint notebooks
35
- run : |
36
- nbqa pylint ./notebooks
37
-
38
- - name : Lint time-weighted averages notebook
39
- run : |
40
- nbqa pylint ./docs/time_weighted_averages.ipynb
28
+ bash lint.sh
Original file line number Diff line number Diff line change @@ -174,6 +174,12 @@ You can lint the `.ipynb` by adding `nbqa` to the start of the command - e.g.:
174
174
nbqa pylint notebooks/analysis.ipynb
175
175
```
176
176
177
+ A bash script has been provided which can be used to lint all files in succession by running:
178
+
179
+ ```
180
+ bash lint.sh
181
+ ```
182
+
177
183
<br >
178
184
179
185
## ❓ How does the model work?
@@ -223,6 +229,7 @@ repo/
223
229
├── CONTRIBUTING.md # Contribution instructions
224
230
├── environment.yaml # Conda environment (includes Python version)
225
231
├── LICENSE # Licence file
232
+ ├── lint.sh # Bash script to lint all .py and .ipynb files at once
226
233
├── pyproject.toml # Metadata for local `simulation/` package
227
234
├── README.md # This file! Describes the repository
228
235
└── requirements.txt # Virtual environment (used by GitHub actions)
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ echo " Linting model code..."
4
+ pylint ./simulation
5
+
6
+ echo " Linting tests..."
7
+ pylint ./tests
8
+
9
+ echo " Linting notebooks..."
10
+ nbqa pylint ./notebooks
11
+
12
+ echo " Linting time-weighted averages notebook..."
13
+ nbqa pylint ./docs/time_weighted_averages.ipynb
You can’t perform that action at this time.
0 commit comments