-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (31 loc) · 1.03 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: CI
on: pull_request
jobs:
qa-py:
name: Python QA
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: "3.10"
- uses: snok/install-poetry@v1
- name: Install dependencies
run: poetry install
- name: Run Black to check formatting
run: poetry run black --check .
- name: Run isort
run: |
poetry run isort --check .
poetry run nbqa isort --check --float-to-top .
- name: Run flake8
run: |
poetry run flake8 .
poetry run nbqa flake8 .
- name: Run nb-clean to check for unnecessary metadata and empty cells in notebooks
run: poetry run nb-clean check . --preserve-cell-outputs --remove-empty-cells
- name: Run notebooks to see if they execute without errors
run: |
for input_file in $(find src docs/source -type f -name "*.ipynb"); do
poetry run papermill "$input_file" temp.ipynb
done