-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathrun_tools.sh
More file actions
executable file
·54 lines (41 loc) · 1.05 KB
/
run_tools.sh
File metadata and controls
executable file
·54 lines (41 loc) · 1.05 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/env bash
clear
# Stop on non-zero exit
# We don't want to lint if the tests fail
set -e
echo "Initalising conda for this shell"
eval "$(conda shell.bash hook)"
conda activate views2
echo "Black"
black -l 79 views
black -l 79 projects
black -l 79 tests
black -l 79 runners
echo "mypy views"
mypy views
#echo "mypy projects"
# mypy projects/*
mypy runners
echo "mypy tests"
mypy tests
echo "Running pytest with coverage"
coverage run --source views -m pytest -c misc/pytest.ini tests/
coverage report --show-missing
# Allow non-zero exit for lints
set +e
echo "flake8"
# Ignores are for black conflicts, black wins
flake8 --ignore=E203,W503 views
flake8 --ignore=E203,W503 projects
echo "pylint"
pylint views
echo "Generating docs"
# Clear existing generated docs
rm -f docs/source/*
# Auto-generate new docs
# --module-frist makes Package __init__ come before all the submodules
# See https://www.sphinx-doc.org/en/master/man/sphinx-apidoc.html#options
sphinx-apidoc --module-first -o docs/source/ views
# Make HTML docs
make -C docs/ html
git status