-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtooling
More file actions
37 lines (33 loc) · 881 Bytes
/
tooling
File metadata and controls
37 lines (33 loc) · 881 Bytes
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
#! /bin/bash
setup-venv() {
if [ -d 'cfxenv' ]; then
echo "Venv already exists! Delete venv and try again!"
exit 1
fi
if [ -z $1 ]; then
echo "Creating venv with $(python3 --version)"
if ! python3 -m venv cfxenv; then
echo "FAILED!"
exit 1
fi
else
echo "Creating venv with python$1"
if ! python"$1" -m venv cfxenv; then
echo "FAILED!"
exit 1
fi
fi
echo "Modifying activation script"
cat .env | sudo tee -a ./cfxenv/bin/activate
echo -e "\n. ./tooling" | sudo tee -a ./cfxenv/bin/activate
. cfxenv/bin/activate
echo "Installing dependencies"
pip install --upgrade pip
pip install -r dev-requirements.txt
}
lint-cfx() {
flake8
}
test-cfx() {
pytest --cov-report term-missing --cov-fail-under=100 --cov=src $@
}