-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrun_checks.sh
executable file
·59 lines (41 loc) · 1.29 KB
/
run_checks.sh
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
55
56
57
58
59
#!/bin/bash
# Linting
#isort mlxp
#docformatter --recursive --in-place --wrap-summaries 88 --wrap-descriptions 88 mlxp
#black mlxp --line-length=110
#flake8 mlxp --count --select=E9,F63,F7,F82 --show-source --statistics
#flake8 mlxp --count --max-complexity=10 --max-line-length=110 --statistics
#find mlxp -type f -name "*.py" | xargs pylint
# Define Python versions
python_versions=("3.8" "3.9" "3.10" "3.11")
python_versions=("3.9")
skip_tests=false
if ! $skip_tests; then
# Loop over Python versions
for version in "${python_versions[@]}"; do
echo $version
# Create virtual environment
if ! source activate mlxp_env_$version &> /dev/null; then
# # Create Conda environment
conda create -n mlxp_env_$version python=$version -y
pip install pytest
pip install torch
fic
#source mlxp_env_$version/bin/activate
source activate mlxp_env_$version
# Install MLXP
pip install torch
pip install -e .
# Run tests
cd tests
python -m pytest
cd ..
done
fi
# Build the documentation
skip_doc=true
if ! $skip_doc; then
pip install sphinx furo autodocsumm sphinx_multiversion
cd docs
sphinx-multiversion . _build/html
fi