-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.bat
99 lines (83 loc) · 2.38 KB
/
make.bat
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
94
95
96
97
98
99
@echo off
if "%1" == "" goto help
goto %~1
:help
echo.
echo install-dependencies installs dependencies
echo install-dependencies-dev installs dev dependencies
echo.
echo test runs tests
echo lint runs linter
echo coverage runs coverage test
echo docs-test tests docs for build errors and serves them locally
echo.
echo build builds python package (sdist)
echo build-test tests build for errors and uploads to test.pypi.org
echo release builds and uploads python package to pypi.org
echo.
echo clean-tests removes temp test files and folders
echo clean-coverage removes coverage files
echo clean-build removes packaging artifacts
echo clean-pyc removes python file artifacts
echo clean runs all cleaning functions
echo.
goto:eof
:install-dependencies
python -m pip install -r requirements.txt
goto:eof
:install-dependencies-dev
python -m pip install -r requirements-dev.txt
goto:eof
:test
Rem python -m unittest <tests folder>
Rem python -m pytest tests -vv
Rem nose2 -s .\tests -t .
goto:eof
:lint
python -m pylint <project_folder_name> setup.py
goto:eof
:coverage
Rem python -m coverage run --source <project_folder_name> -m unittest <tests folder>
Rem python -m coverage run --source <project_folder_name> -m pytest tests -q
Rem python -m coverage run --source <project_folder_name> nose2 -s .\tests -t .
python -m coverage report -m
goto:eof
:docs-test
mkdocs serve -s -f .mkdocs.yml
goto:eof
:build
call:clean-pyc
call:clean-build
python setup.py sdist bdist_wheel
goto:eof
:build-test
twine check dist/*
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
goto:eof
:release
call:build
twine upload dist/*
goto:eof
:clean-tests
rmdir /s /q .pytest_cache
goto:eof
:clean-coverage
python -m coverage erase
goto:eof
:clean-build
rmdir /s /q build
rmdir /s /q dist
rmdir /s /q <project_folder_name>.egg-info
goto:eof
:clean-pyc
rmdir /s /q <project_folder_name>\__pycache__
rmdir /s /q tests\__pycache__
del /s <project_folder_name>\*.pyc <project_folder_name>\*.pyo <project_folder_name>\*~
del /s tests\*.pyc tests\*.pyo tests\*~
goto:eof
:clean
call:clean-tests
call:clean-coverage
call:clean-build
call:clean-pyc
goto:eof