Skip to content

Commit dde515d

Browse files
committed
Dev: new settings/tasks/scripts
1 parent 0bb563d commit dde515d

16 files changed

Lines changed: 419 additions & 115 deletions

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ PythonQwt.chm
66
PythonQwt.chm.zip
77
doc.zip
88
doctmp/
9-
settings.json
109

1110
# Created by https://www.gitignore.io/api/python
1211

@@ -69,4 +68,3 @@ docs/_build/
6968

7069
# PyBuilder
7170
target/
72-

.hgignore

Lines changed: 0 additions & 29 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"[bat]": {
3+
"files.encoding": "cp850",
4+
},
5+
"editor.rulers": [
6+
88
7+
],
8+
"files.exclude": {
9+
"**/__pycache__": true,
10+
"**/.pytest_cache": true,
11+
"**/.hypothesis": true,
12+
"**/*.pyc": true,
13+
"**/*.pyo": true,
14+
"**/*.pyd": true,
15+
".venv": true
16+
},
17+
"files.trimFinalNewlines": true,
18+
"files.trimTrailingWhitespace": true,
19+
"python.defaultInterpreterPath": "${env:PPSTACK_PYTHONEXE}",
20+
"editor.formatOnSave": true,
21+
"isort.args": [
22+
"--profile",
23+
"black"
24+
],
25+
"[python]": {
26+
"editor.codeActionsOnSave": {
27+
"source.organizeImports": true
28+
},
29+
"editor.defaultFormatter": "ms-python.black-formatter"
30+
},
31+
"python.linting.pycodestyleArgs": [
32+
"--max-line-length=88",
33+
"--ignore=E203,W503"
34+
],
35+
"python.linting.pycodestyleEnabled": true,
36+
"python.formatting.provider": "none",
37+
"esbonio.sphinx.confDir": "",
38+
"python.testing.unittestEnabled": false,
39+
"python.testing.pytestEnabled": true,
40+
"python.testing.pytestPath": "pytest",
41+
"python.testing.pytestArgs": [
42+
"-v",
43+
"--cov",
44+
"--cov-report=html",
45+
"qwt"
46+
],
47+
"python.analysis.autoFormatStrings": true,
48+
}

.vscode/tasks.json

Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "Run Coverage",
8+
"type": "shell",
9+
"command": "cmd",
10+
"args": [
11+
"/c",
12+
"run_coverage.bat"
13+
],
14+
"options": {
15+
"cwd": "scripts",
16+
"env": {
17+
"UNATTENDED": "1",
18+
"PYTHON": "${env:PPSTACK_PYTHONEXE}"
19+
}
20+
},
21+
"group": {
22+
"kind": "build",
23+
"isDefault": true
24+
},
25+
"presentation": {
26+
"echo": true,
27+
"reveal": "always",
28+
"focus": false,
29+
"panel": "dedicated",
30+
"showReuseMessage": true,
31+
"clear": true
32+
}
33+
},
34+
{
35+
"label": "Run pytest",
36+
"type": "shell",
37+
"command": "cmd",
38+
"args": [
39+
"/c",
40+
"run_pytest.bat"
41+
],
42+
"options": {
43+
"cwd": "scripts",
44+
"env": {
45+
"UNATTENDED": "1",
46+
"PYTHON": "${env:PPSTACK_PYTHONEXE}"
47+
}
48+
},
49+
"group": {
50+
"kind": "build",
51+
"isDefault": true
52+
},
53+
"presentation": {
54+
"echo": true,
55+
"reveal": "always",
56+
"focus": false,
57+
"panel": "dedicated",
58+
"showReuseMessage": true,
59+
"clear": true
60+
}
61+
},
62+
{
63+
"label": "Take screenshots",
64+
"type": "shell",
65+
"command": "cmd",
66+
"args": [
67+
"/c",
68+
"take_screenshots.bat"
69+
],
70+
"options": {
71+
"cwd": "scripts",
72+
"env": {
73+
"UNATTENDED": "1",
74+
"PYTHON": "${env:PPSTACK_PYTHONEXE}"
75+
}
76+
},
77+
"group": {
78+
"kind": "build",
79+
"isDefault": true
80+
},
81+
"presentation": {
82+
"echo": true,
83+
"reveal": "always",
84+
"focus": false,
85+
"panel": "dedicated",
86+
"showReuseMessage": true,
87+
"clear": true
88+
}
89+
},
90+
{
91+
"label": "Clean Up",
92+
"type": "shell",
93+
"command": "cmd",
94+
"args": [
95+
"/c",
96+
"clean_up.bat"
97+
],
98+
"options": {
99+
"cwd": "scripts"
100+
},
101+
"group": {
102+
"kind": "build",
103+
"isDefault": true
104+
},
105+
"presentation": {
106+
"echo": true,
107+
"reveal": "always",
108+
"focus": false,
109+
"panel": "shared",
110+
"showReuseMessage": true,
111+
"clear": false
112+
}
113+
},
114+
{
115+
"label": "Run Pylint",
116+
"type": "shell",
117+
"command": "cmd",
118+
"args": [
119+
"/c",
120+
"run_pylint.bat",
121+
// "--disable=R0801,C0103,C0114,C0115,C0116,W0612,W0613",
122+
"--disable=fixme,C,R,W",
123+
],
124+
"options": {
125+
"cwd": "scripts",
126+
"env": {
127+
"UNATTENDED": "1",
128+
"PYTHON": "${env:PPSTACK_PYTHONEXE}"
129+
}
130+
},
131+
"group": {
132+
"kind": "build",
133+
"isDefault": true
134+
},
135+
"presentation": {
136+
"echo": true,
137+
"reveal": "always",
138+
"focus": false,
139+
"panel": "dedicated",
140+
"showReuseMessage": true,
141+
"clear": true
142+
}
143+
},
144+
{
145+
"label": "Build documentation",
146+
"type": "shell",
147+
"command": "cmd",
148+
"options": {
149+
"cwd": "scripts",
150+
"env": {
151+
"PYTHON": "${env:PPSTACK_PYTHONEXE}",
152+
"UNATTENDED": "1"
153+
}
154+
},
155+
"args": [
156+
"/c",
157+
"build_doc.bat"
158+
],
159+
"problemMatcher": [],
160+
"group": {
161+
"kind": "build",
162+
"isDefault": true
163+
},
164+
"presentation": {
165+
"echo": true,
166+
"reveal": "always",
167+
"focus": false,
168+
"panel": "shared",
169+
"showReuseMessage": true,
170+
"clear": true
171+
}
172+
},
173+
{
174+
"label": "Build Python packages",
175+
"type": "shell",
176+
"command": "cmd",
177+
"options": {
178+
"cwd": "scripts",
179+
"env": {
180+
"PYTHON": "${env:PPSTACK_PYTHONEXE}",
181+
"UNATTENDED": "1"
182+
}
183+
},
184+
"args": [
185+
"/c",
186+
"build_dist.bat"
187+
],
188+
"problemMatcher": [],
189+
"group": {
190+
"kind": "build",
191+
"isDefault": true
192+
},
193+
"presentation": {
194+
"echo": true,
195+
"reveal": "always",
196+
"focus": false,
197+
"panel": "shared",
198+
"showReuseMessage": true,
199+
"clear": true
200+
},
201+
"dependsOrder": "sequence",
202+
"dependsOn": [
203+
"Clean Up",
204+
"Take screenshots",
205+
"Build documentation"
206+
]
207+
},
208+
]
209+
}

scripts/build_dist.bat

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ REM (see LICENSE file for more details)
88
REM ======================================================
99
call %~dp0utils GetScriptPath SCRIPTPATH
1010
call %FUNC% GetLibName LIBNAME
11-
cd %SCRIPTPATH%\..\
12-
if exist MANIFEST ( del /q MANIFEST )
1311
call %FUNC% SetPythonPath
14-
call %FUNC% UseWinPython
12+
call %FUNC% UsePython
13+
if exist MANIFEST ( del /q MANIFEST )
1514
python setup.py sdist bdist_wheel --universal
1615
python setup.py build sdist
1716
rmdir /s /q %LIBNAME%.egg-info

scripts/build_doc.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ call %~dp0utils GetScriptPath SCRIPTPATH
1010
call %FUNC% GetLibName LIBNAME
1111
call %FUNC% GetModName MODNAME
1212
call %FUNC% SetPythonPath
13-
call %FUNC% UseWinPython
13+
call %FUNC% UsePython
1414
set PATH=C:\Program Files\7-Zip;C:\Program Files (x86)\7-Zip;C:\Program Files\HTML Help Workshop;C:\Program Files (x86)\HTML Help Workshop;%PATH%
1515
cd %SCRIPTPATH%\..\
1616
if exist build\doc ( rmdir /s /q build\doc )

scripts/build_upload.bat

Lines changed: 0 additions & 33 deletions
This file was deleted.

scripts/clean_up.bat

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,33 @@ REM ======================================================
99
call %~dp0utils GetScriptPath SCRIPTPATH
1010
call %FUNC% GetLibName LIBNAME
1111
cd %SCRIPTPATH%\..\
12+
13+
@REM Removing files/directories related to Python/doc build process
14+
if exist %LIBNAME%.egg-info ( rmdir /s /q %LIBNAME%.egg-info )
1215
if exist MANIFEST ( del /q MANIFEST )
1316
if exist build ( rmdir /s /q build )
1417
if exist dist ( rmdir /s /q dist )
15-
del /s /q *.pyc
18+
if exist doc\_build ( rmdir /s /q doc\_build )
19+
20+
@REM Removing files produced by tests
21+
del *.h5
22+
del *.json
23+
del *.pickle
24+
25+
@REM Removing cache files/directories related to Python execution
26+
del /s /q *.pyc 1>nul 2>&1
27+
del /s /q *.pyo 1>nul 2>&1
1628
FOR /d /r %%d IN ("__pycache__") DO @IF EXIST "%%d" rd /s /q "%%d"
29+
30+
@REM Removing directories related to public repository upload
31+
set TEMP=%SCRIPTPATH%\..\..\%LIBNAME%_temp
32+
set PUBLIC=%SCRIPTPATH%\..\..\%LIBNAME%_public
33+
if exist %TEMP% ( rmdir /s /q %TEMP% )
34+
if exist %PUBLIC% ( rmdir /s /q %PUBLIC% )
35+
36+
@REM Removing files/directories related to Coverage
37+
if exist .coverage ( del /q .coverage )
38+
if exist coverage.xml ( del /q coverage.xml )
39+
if exist htmlcov ( rmdir /s /q htmlcov )
40+
del /q .coverage.* 1>nul 2>&1
41+
if exist sitecustomize.py ( del /q sitecustomize.py )

0 commit comments

Comments
 (0)