-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreports.shell
More file actions
executable file
·93 lines (69 loc) · 3.15 KB
/
reports.shell
File metadata and controls
executable file
·93 lines (69 loc) · 3.15 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/usr/bin/env bash
project='project' ;
# ## Pre-Purging Cached Data
# find . -type d -name '.pytest_cache' | xargs rm -rf ;
# find . -type d -name '.ruff_cache' | xargs rm -rf ;
# find . -type d -name '__pycache__' | xargs rm -rf ;
# ## PyLint report
# pylint *.py --verbose \
# | grep -v '/usr/local/lib/' \
# | cat -s | tee docs/linting/pylint/project.log ;
# pylint core/*.py --verbose \
# | grep -v '/usr/local/lib/' \
# | cat -s | tee docs/linting/pylint/core_mods.log ;
# pylint app/*.py --verbose \
# | grep -v '/usr/local/lib/' \
# | cat -s | tee docs/linting/pylint/app_mods.log ;
# pylint tests/*.py --verbose \
# | grep -v '/usr/local/lib/' \
# | cat -s | tee docs/linting/pylint/testing.log ;
# ## Coverage report
# coverage run "${project}.py" --verbose ;
# coverage report --show-missing | grep -v '/usr/local/lib/' | tee docs/coverage/project.log ;
# ## PyTest Coverage report
# pytest --cov-report html:docs/coverage/html/app_mods --cov app/ --verbose
# coverage report --show-missing | cat -s | tee -a docs/coverage/mods/app_mods.log ;
# pytest --cov-report html:docs/coverage/html/core_mods --cov core/ --verbose
# coverage report --show-missing | cat -s | tee -a docs/coverage/mods/core_mods.log ;
# pytest --cov-report html:docs/coverage/html/tests_mods --cov tests/ --verbose
# coverage report --show-missing | cat -s | tee -a docs/coverage/mods/tests_mods.log ;
## PyDoc report (Markdown): project.py
for file in $(ls -1 "${project}.py" | grep -v '__init__.py') ; do
echo "\`\`\`console" > docs/pydoc/${file/.py/}.md
python -m pydoc $file | cat -s >> docs/pydoc/${file/.py/}.md ;
echo "\`\`\`" >> docs/pydoc/${file/.py/}.md
sed -i '' -e "s:$( pwd )/::g" \
-e "s:'$( pwd )':os.getcwd():g" \
docs/pydoc/${file/.py/}.md ;
done
## PyDoc report (Markdown): core/*.py
for file in $(ls -1 core/*.py | grep -v '__init__.py') ; do
echo "\`\`\`console" > docs/pydoc/${file/.py/}.md
python -m pydoc $file | cat -s >> docs/pydoc/${file/.py/}.md ;
echo "\`\`\`" >> docs/pydoc/${file/.py/}.md
sed -i '' -e "s:$( pwd )/::g" \
-e "s:'$( pwd )':os.getcwd():g" \
docs/pydoc/${file/.py/}.md ;
done
## PyDoc report (Markdown): app/*.py
for file in $(ls -1 app/*.py | grep -v '__init__.py') ; do
echo "\`\`\`console" > docs/pydoc/${file/.py/}.md
python -m pydoc $file | cat -s >> docs/pydoc/${file/.py/}.md ;
echo "\`\`\`" >> docs/pydoc/${file/.py/}.md
sed -i '' -e "s:$( pwd )/::g" \
-e "s:'$( pwd )':os.getcwd():g" \
docs/pydoc/${file/.py/}.md ;
done
## PyDoc report (Markdown): tests/*.py
for file in $(ls -1 tests/*.py | grep -v '__init__.py') ; do
echo "\`\`\`console" > docs/pydoc/${file/.py/}.md
python -m pydoc $file | cat -s >> docs/pydoc/${file/.py/}.md ;
echo "\`\`\`" >> docs/pydoc/${file/.py/}.md
sed -i '' -e "s:$( pwd )/::g" \
-e "s:'$( pwd )':os.getcwd():g" \
docs/pydoc/${file/.py/}.md ;
done
## Post-Purging Cached Data
find . -type d -name '.pytest_cache' | xargs rm -rf ;
find . -type d -name '.ruff_cache' | xargs rm -rf ;
find . -type d -name '__pycache__' | xargs rm -rf ;