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 2323 cache : ' pip'
2424 - run : pip install -r requirements.txt
2525
26- - name : Lint model code
26+ - name : Lint
2727 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.:
174174nbqa pylint notebooks/analysis.ipynb
175175```
176176
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+
177183<br >
178184
179185## ❓ How does the model work?
@@ -223,6 +229,7 @@ repo/
223229├── CONTRIBUTING.md # Contribution instructions
224230├── environment.yaml # Conda environment (includes Python version)
225231├── LICENSE # Licence file
232+ ├── lint.sh # Bash script to lint all .py and .ipynb files at once
226233├── pyproject.toml # Metadata for local `simulation/` package
227234├── README.md # This file! Describes the repository
228235└── 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