forked from AntonioCiolino/AutoGPT-Zapier
-
Notifications
You must be signed in to change notification settings - Fork 0
/
helpers.bat
62 lines (54 loc) · 1.27 KB
/
helpers.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
@echo off
set GPT_HOME=<your root Auto-GPT>
if "%1" == "clean" (
echo Removing build artifacts and temporary files...
call :clean
) else if "%1" == "qa" (
echo Running static analysis tools...
call :qa
) else if "%1" == "style" (
echo Running code formatters...
call :style
) else if "%1" == "package" (
echo Packaging archive...
call :package
) else if "%1" == "unittest" (
echo Running tests
call :unittest
) else (
echo Usage: %0 [clean^|qa^|style^|package]
exit /b 1
)
exit /b 0
:clean
rem Remove build artifacts and temporary files
@del /s /q build 2>nul
@del /s /q dist 2>nul
@del /s /q __pycache__ 2>nul
@del /s /q *.egg-info 2>nul
@del /s /q **\*.egg-info 2>nul
@del /s /q *.pyc 2>nul
@del /s /q **\*.pyc 2>nul
@del /s /q reports 2>nul
echo Done!
exit /b 0
:qa
rem Run static analysis tools
@flake8 .
@python run_pylint.py
echo Done!
exit /b 0
:style
rem Format code
@isort .
@black --exclude=".*\/*(dist|venv|.venv|test-results)\/*.*" .
echo Done!
exit /b 0
:package
python -m zipfile -c .\builds\AutoGPT_Zapier.zip src\AutoGPT_Zapier
copy .\builds\AutoGPT_Zapier.zip %GPT_HOME%\plugins
python -m autogpt --debug
exit /b 0
:unittest
python -m unittest src/AutoGPT_Zapier/zapier_test.py -v
exit /b 0