Skip to content

Commit 3d3cfa0

Browse files
committed
qt-python: Introduce qt-python extension
- Recognize `pyproject.toml` file. - Add 4 tasks: run, build, clean and deploy. - Support debugging session using `debugpy`. - Setup npm scripts similar to other extensions. Task-number: [VSCODEEXT-29](https://bugreports.qt.io/browse/VSCODEEXT-29) Task-number: [VSCODEEXT-30](https://bugreports.qt.io/browse/VSCODEEXT-30)
1 parent 4641038 commit 3d3cfa0

24 files changed

+11373
-25
lines changed

package.json

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,70 +12,74 @@
1212
"all_dev:qt-core": "ts-node ./scripts/all_dev.ts --extension=\"qt-core\"",
1313
"all_dev:qt-qml": "ts-node ./scripts/all_dev.ts --extension=\"qt-qml\"",
1414
"all_dev:qt-cpp": "ts-node ./scripts/all_dev.ts --extension=\"qt-cpp\"",
15-
"test:qt-core": "npm --prefix qt-core run test",
16-
"test:qt-cpp": "npm --prefix qt-cpp run test",
17-
"test:qt-qml": "npm --prefix qt-qml run test",
18-
"test:qt-ui": "npm --prefix qt-ui run test",
19-
"test:all": "npm run test:qt-core && npm run test:qt-cpp && npm run test:qt-ui && npm run test:qt-qml",
15+
"all_dev:qt-python": "ts-node ./scripts/all_dev.ts --extension=\"qt-python\"",
2016
"all_dev:qt-ui": "ts-node ./scripts/all_dev.ts --extension=\"qt-ui\"",
2117
"lint": "npm run prettierWrite && eslint scripts --fix --cache",
2218
"lint:qt-core": "cd qt-core && npm run lint",
2319
"lint:qt-qml": "cd qt-qml && npm run lint",
2420
"lint:qt-cpp": "cd qt-cpp && npm run lint",
21+
"lint:qt-python": "cd qt-python && npm run lint",
2522
"lint:qt-ui": "cd qt-ui && npm run lint",
2623
"lint:qt-lib": "cd qt-lib && npm run lint",
27-
"lint:all": "concurrently \"npm run lint\" \"npm run lint:qt-lib\" \"npm run lint:qt-core\" \"npm run lint:qt-cpp\" \"npm run lint:qt-ui\" \"npm run lint:qt-qml\"",
28-
"lint:all_sync": "npm run lint && npm run lint:qt-lib && npm run lint:qt-core && npm run lint:qt-cpp && npm run lint:qt-ui && npm run lint:qt-qml",
24+
"lint:all": "concurrently \"npm run lint\" \"npm run lint:qt-lib\" \"npm run lint:qt-core\" \"npm run lint:qt-cpp\" \"npm run lint:qt-python\" \"npm run lint:qt-ui\" \"npm run lint:qt-qml\"",
25+
"lint:all_sync": "npm run lint && npm run lint:qt-lib && npm run lint:qt-core && npm run lint:qt-cpp && npm run lint:qt-python && npm run lint:qt-ui && npm run lint:qt-qml",
2926
"pretest": "npm run prettierWrite && npx tsc --incremental --noEmit && eslint scripts --fix --cache",
3027
"pretest:qt-core": "cd qt-core && npm run pretest",
3128
"pretest:qt-qml": "cd qt-qml && npm run pretest",
3229
"pretest:qt-cpp": "cd qt-cpp && npm run pretest",
30+
"pretest:qt-python": "cd qt-python && npm run pretest",
3331
"pretest:qt-ui": "cd qt-ui && npm run pretest",
3432
"pretest:qt-lib": "cd qt-lib && npm run pretest",
35-
"pretest:all": "concurrently \"npm run pretest\" \"npm run pretest:qt-lib\" \"npm run pretest:qt-core\" \"npm run pretest:qt-cpp\" \"npm run pretest:qt-ui\" \"npm run pretest:qt-qml\"",
36-
"pretest:all_sync": "npm run pretest && npm run pretest:qt-lib && npm run pretest:qt-core && npm run pretest:qt-cpp && npm run pretest:qt-ui && npm run pretest:qt-qml",
33+
"pretest:all": "concurrently \"npm run pretest\" \"npm run pretest:qt-lib\" \"npm run pretest:qt-core\" \"npm run pretest:qt-cpp\" \"npm run pretest:qt-python\" \"npm run pretest:qt-ui\" \"npm run pretest:qt-qml\"",
34+
"pretest:all_sync": "npm run pretest && npm run pretest:qt-lib && npm run pretest:qt-core && npm run pretest:qt-cpp && npm run pretest:qt-python && npm run pretest:qt-ui && npm run pretest:qt-qml",
3735
"ci-lint:qt-core": "ts-node ./scripts/ci_lint.ts --dir=\"qt-core\" --exclude_licenses=\"qt-core\"",
3836
"ci-lint:qt-qml": "ts-node ./scripts/ci_lint.ts --dir=\"qt-qml\" --exclude_licenses=\"qt-qml\"",
3937
"ci-lint:qt-cpp": "ts-node ./scripts/ci_lint.ts --dir=\"qt-cpp\" --exclude_licenses=\"qt-cpp\"",
38+
"ci-lint:qt-python": "ts-node ./scripts/ci_lint.ts --dir=\"qt-python\" --exclude_licenses=\"qt-python\"",
4039
"ci-lint:qt-ui": "ts-node ./scripts/ci_lint.ts --dir=\"qt-ui\" --exclude_licenses=\"qt-ui\"",
4140
"ci-lint:qt-lib": "npm run checkStyle -- --dir=\"qt-lib\" && npm run eslint -- --dir=\"qt-lib\" && npm run checkPackage -- --dir=\"qt-lib\"",
42-
"ci-lint:all": "concurrently \"npm run ci-lint\" \"npm run ci-lint:qt-lib\" \"npm run ci-lint:qt-core\" \"npm run ci-lint:qt-cpp\" \"npm run ci-lint:qt-ui\" \"npm run ci-lint:qt-qml\" \"npm run checkChangelog:all_ext_pack\"",
43-
"ci-lint:all_sync": "npm run ci-lint && npm run ci-lint:qt-lib && npm run ci-lint:qt-core && npm run ci-lint:qt-cpp && npm run ci-lint:qt-ui && npm run ci-lint:qt-qml ",
41+
"ci-lint:all": "concurrently \"npm run ci-lint\" \"npm run ci-lint:qt-lib\" \"npm run ci-lint:qt-core\" \"npm run ci-lint:qt-cpp\" \"npm run ci-lint:qt-python\" \"npm run ci-lint:qt-ui\" \"npm run ci-lint:qt-qml\" \"npm run checkChangelog:all_ext_pack\"",
42+
"ci-lint:all_sync": "npm run ci-lint && npm run ci-lint:qt-lib && npm run ci-lint:qt-core && npm run ci-lint:qt-cpp && npm run ci-lint:qt-python && npm run ci-lint:qt-ui && npm run ci-lint:qt-qml ",
4443
"ci-lint": "npm run prettierCheck && eslint scripts",
4544
"install-ext:qt-core": "ts-node ./scripts/install-ext.ts --dir=\"qt-core\" --name=\"qt-core\"",
4645
"install-ext:qt-qml": "ts-node ./scripts/install-ext.ts --dir=\"qt-qml\" --name=\"qt-qml\"",
4746
"install-ext:qt-cpp": "ts-node ./scripts/install-ext.ts --dir=\"qt-cpp\" --name=\"qt-cpp\"",
47+
"install-ext:qt-python": "ts-node ./scripts/install-ext.ts --dir=\"qt-python\" --name=\"qt-python\"",
4848
"install-ext:qt-ui": "ts-node ./scripts/install-ext.ts --dir=\"qt-ui\" --name=\"qt-ui\"",
49-
"install-ext:all": "concurrently \"npm run install-ext:qt-core\" \"npm run install-ext:qt-cpp\" \"npm run install-ext:qt-ui\" \"npm run install-ext:qt-qml\"",
50-
"install-ext:all_sync": "npm run install-ext:qt-core && npm run install-ext:qt-ui && npm run install-ext:qt-cpp && npm run install-ext:qt-qml",
49+
"install-ext:all": "concurrently \"npm run install-ext:qt-core\" \"npm run install-ext:qt-cpp\" \"npm run install-ext:qt-python\" \"npm run install-ext:qt-ui\" \"npm run install-ext:qt-qml\"",
50+
"install-ext:all_sync": "npm run install-ext:qt-core && npm run install-ext:qt-ui && npm run install-ext:qt-cpp && npm run install-ext:qt-python && npm run install-ext:qt-qml",
5151
"install:qt-core": "cd qt-core && npm run install:all",
5252
"install:qt-qml": "cd qt-qml && npm install",
5353
"install:qt-cpp": "cd qt-cpp && npm install",
54+
"install:qt-python": "cd qt-python && npm install",
5455
"install:qt-ui": "cd qt-ui && npm install",
5556
"install:qt-lib": "cd qt-lib && npm install",
56-
"install:all": "concurrently \"npm install\" \"npm run install:qt-lib\" \"npm run install:qt-core\" \"npm run install:qt-cpp\" \"npm run install:qt-ui\" \"npm run install:qt-qml\"",
57-
"install:all_sync": "npm install && npm run install:qt-lib && npm run install:qt-core && npm run install:qt-cpp && npm run install:qt-ui && npm run install:qt-qml",
57+
"install:all": "concurrently \"npm install\" \"npm run install:qt-lib\" \"npm run install:qt-core\" \"npm run install:qt-cpp\" \"npm run install:qt-python\" \"npm run install:qt-ui\" \"npm run install:qt-qml\"",
58+
"install:all_sync": "npm install && npm run install:qt-lib && npm run install:qt-core && npm run install:qt-cpp && npm run install:qt-python && npm run install:qt-ui && npm run install:qt-qml",
5859
"eslint": "ts-node ./scripts/eslint.ts",
5960
"ci:qt-core": "cd qt-core && npm run ci:all",
6061
"ci:qt-qml": "cd qt-qml && npm ci",
6162
"ci:qt-cpp": "cd qt-cpp && npm ci",
63+
"ci:qt-python": "cd qt-python && npm ci",
6264
"ci:qt-ui": "cd qt-ui && npm ci",
6365
"ci:qt-lib": "cd qt-lib && npm ci",
64-
"ci:all": "npm ci && concurrently \"npm run ci:qt-lib\" \"npm run ci:qt-core\" \"npm run ci:qt-cpp\" \"npm run ci:qt-ui\" \"npm run ci:qt-qml\"",
65-
"ci:all_sync": "npm ci && npm run ci:qt-lib && npm run ci:qt-core && npm run ci:qt-cpp && npm run ci:qt-ui && npm run ci:qt-qml",
66+
"ci:all": "npm ci && concurrently \"npm run ci:qt-lib\" \"npm run ci:qt-core\" \"npm run ci:qt-cpp\" \"npm run ci:qt-python\" \"npm run ci:qt-ui\" \"npm run ci:qt-qml\"",
67+
"ci:all_sync": "npm ci && npm run ci:qt-lib && npm run ci:qt-core && npm run ci:qt-cpp && npm run ci:qt-python && npm run ci:qt-ui && npm run ci:qt-qml",
6668
"package:qt-core": "ts-node ./scripts/package.ts --extension=\"qt-core\"",
6769
"package:qt-qml": "ts-node ./scripts/package.ts --extension=\"qt-qml\"",
6870
"package:qt-cpp": "ts-node ./scripts/package.ts --extension=\"qt-cpp\"",
71+
"package:qt-python": "ts-node ./scripts/package.ts --extension=\"qt-python\"",
6972
"package:qt-ui": "ts-node ./scripts/package.ts --extension=\"qt-ui\"",
70-
"package:all": "concurrently \"npm run package:qt-core\" \"npm run package:qt-cpp\" \"npm run package:qt-ui\" \"npm run package:qt-qml\"",
71-
"package:all_sync": "npm run package:qt-core && npm run package:qt-cpp && npm run package:qt-ui && npm run package:qt-qml",
73+
"package:all": "concurrently \"npm run package:qt-core\" \"npm run package:qt-cpp\" \"npm run package:qt-python\" \"npm run package:qt-ui\" \"npm run package:qt-qml\"",
74+
"package:all_sync": "npm run package:qt-core && npm run package:qt-cpp && npm run package:qt-python && npm run package:qt-ui && npm run package:qt-qml",
7275
"compile:qt-core": "cd qt-core && npm run compile",
7376
"compile:qt-qml": "cd qt-qml && npm run compile",
7477
"compile:qt-cpp": "npm run prepareNatvisFiles && cd qt-cpp && npm run compile",
78+
"compile:qt-python": "cd qt-python && npm run compile",
7579
"compile:qt-ui": "cd qt-ui && npm run compile",
7680
"compile:qt-lib": "cd qt-lib && npm run compile",
77-
"compile:all": "concurrently \"npm run compile:qt-core\" \"npm run compile:qt-cpp\" \"npm run compile:qt-ui\" \"npm run compile:qt-qml\"",
78-
"compile:all_sync": "npm run compile:qt-core && npm run compile:qt-cpp && npm run compile:qt-ui && npm run compile:qt-qml && npm run compile:qt-lib",
81+
"compile:all": "concurrently \"npm run compile:qt-core\" \"npm run compile:qt-cpp\" \"npm run compile:qt-python\" \"npm run compile:qt-ui\" \"npm run compile:qt-qml\"",
82+
"compile:all_sync": "npm run compile:qt-core && npm run compile:qt-cpp && npm run compile:qt-python && npm run compile:qt-ui && npm run compile:qt-qml && npm run compile:qt-lib",
7983
"checkLicenses": "ts-node ./scripts/check_licenses.ts",
8084
"checkPackage": "ts-node ./scripts/check_package.ts",
8185
"checkStyle": "ts-node ./scripts/check_style.ts",
@@ -89,14 +93,16 @@
8993
"generateLicenses:qt-core-webview": "npm run generateLicenses -- --dir=\"qt-core/webview-ui\" --exclude=\"qt-core-webview\" --output=\"qt-core/webview-ui/ThirdPartyNotices.txt\"",
9094
"generateLicenses:qt-qml": "npm run generateLicenses -- --dir=\"qt-qml\" --exclude=\"qt-qml, qt-lib\" --output=\"qt-qml/ThirdPartyNotices.txt\"",
9195
"generateLicenses:qt-cpp": "npm run generateLicenses -- --dir=\"qt-cpp\" --exclude=\"qt-cpp, qt-lib\" --output=\"qt-cpp/ThirdPartyNotices.txt\"",
96+
"generateLicenses:qt-python": "npm run generateLicenses -- --dir=\"qt-python\" --exclude=\"qt-python, qt-lib\" --output=\"qt-python/ThirdPartyNotices.txt\"",
9297
"generateLicenses:qt-ui": "npm run generateLicenses -- --dir=\"qt-ui\" --exclude=\"qt-ui, qt-lib\" --output=\"qt-ui/ThirdPartyNotices.txt\"",
93-
"generateLicenses:all": "concurrently \"npm run generateLicenses:qt-core\" \"npm run generateLicenses:qt-cpp\" \"npm run generateLicenses:qt-ui\" \"npm run generateLicenses:qt-qml\"",
94-
"generateLicenses:all_sync": "npm run generateLicenses:qt-core && npm run generateLicenses:qt-cpp && npm run generateLicenses:qt-ui && npm run generateLicenses:qt-qml",
98+
"generateLicenses:all": "concurrently \"npm run generateLicenses:qt-core\" \"npm run generateLicenses:qt-cpp\" \"npm run generateLicenses:qt-python\" \"npm run generateLicenses:qt-ui\" \"npm run generateLicenses:qt-qml\"",
99+
"generateLicenses:all_sync": "npm run generateLicenses:qt-core && npm run generateLicenses:qt-cpp && npm run generateLicenses:qt-python && npm run generateLicenses:qt-ui && npm run generateLicenses:qt-qml",
95100
"_prepublish_git": "git reset --hard && git clean -ffdx",
96101
"_prepublish": "npm run _prepublish_git && npm ci && npm run ci:qt-lib && npm run compile:qt-lib && npm run ci-lint:qt-lib",
97102
"publish:qt-core": "ts-node ./scripts/publish.ts --extension=\"qt-core\"",
98103
"publish:qt-qml": "ts-node ./scripts/publish.ts --extension=\"qt-qml\"",
99104
"publish:qt-cpp": "ts-node ./scripts/publish.ts --extension=\"qt-cpp\"",
105+
"publish:qt-python": "ts-node ./scripts/publish.ts --extension=\"qt-python\"",
100106
"publish:qt-ui": "ts-node ./scripts/publish.ts --extension=\"qt-ui\"",
101107
"publish:qt-cpp-pack": "ts-node ./scripts/publish_ext_pack.ts --dir=\"extension_packs/cpp\" --pack=\"qt-cpp-pack\"",
102108
"publish:qt-wasm-pack": "ts-node ./scripts/publish_ext_pack.ts --dir=\"extension_packs/wasm\" --pack=\"qt-wasm-pack\"",
@@ -105,8 +111,8 @@
105111
"prettierWrite": "npm run prettierBase -- --write \"scripts/**/*.{js,ts,mts,json,mjs,cjs}\" \"eslint.config.mjs\" \"common/.eslintrc.cjs\" --log-level silent",
106112
"prettierCheck": "npm run prettierBase -- --check \"scripts/**/*.{js,ts,mts,json,mjs,cjs}\" \"eslint.config.mjs\" \"common/.eslintrc.cjs\"",
107113
"prettierBase": "prettier --config \"common/.prettierrc\" --ignore-path \"common/.prettierignore\"",
108-
"auditFix": "npm audit fix && cd qt-lib && npm audit fix && cd ../qt-core && npm audit fix && cd ../qt-cpp && npm audit fix && cd ../qt-ui && npm audit fix && cd ../qt-qml && npm audit fix && cd ../qt-core/webview-ui && npm audit fix",
109-
"auditFixForce": "npm audit fix --force && cd qt-lib && npm audit fix --force && cd ../qt-core && npm audit fix --force && cd ../qt-cpp && npm audit fix --force && cd ../qt-ui && npm audit fix --force && cd ../qt-qml && npm audit fix --force && cd ../qt-core/webview-ui && npm audit fix --force",
114+
"auditFix": "npm audit fix && cd qt-lib && npm audit fix && cd ../qt-core && npm audit fix && cd ../qt-cpp && npm audit fix && cd ../qt-ui && npm audit fix && cd ../qt-qml && npm audit fix && cd ../qt-python && npm audit fix && cd ../qt-core/webview-ui && npm audit fix",
115+
"auditFixForce": "npm audit fix --force && cd qt-lib && npm audit fix --force && cd ../qt-core && npm audit fix --force && cd ../qt-cpp && npm audit fix --force && cd ../qt-ui && npm audit fix --force && cd ../qt-qml && npm audit fix --force && cd ../qt-python && npm audit fix --force && cd ../qt-core/webview-ui && npm audit fix --force",
110116
"build:qt-cli": "cd qt-cli && bash run.sh build"
111117
},
112118
"devDependencies": {

qt-python/.vscodeignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.vscode/**
2+
.vscode-test/**
3+
src/**
4+
.gitignore
5+
**/tsconfig.json
6+
**/.eslintrc.json
7+
**/*.map
8+
**/*.ts
9+
node_modules/**
10+
**/package-lock.json
11+
.eslintignore
12+
.prettierrc
13+
.prettierignore
14+
.github/**
15+
out/test/**
16+
out/scripts/**
17+
Development.md
18+
esbuild.mjs
19+
.eslintrc.cjs
20+
package-lock.json
21+
extension_packs/**
22+
../**/*
23+
.eslintcache
24+
tsconfig.tsbuildinfo

qt-python/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Change Log

0 commit comments

Comments
 (0)