Skip to content

Commit 0f8b5c3

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 90a7076 commit 0f8b5c3

23 files changed

+11357
-21
lines changed

package.json

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,70 +12,79 @@
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+
"all_dev:qt-python": "ts-node ./scripts/all_dev.ts --extension=\"qt-python\"",
16+
"all_dev:qt-ui": "ts-node ./scripts/all_dev.ts --extension=\"qt-ui\"",
1517
"test:qt-core": "npm --prefix qt-core run test",
1618
"test:qt-cpp": "npm --prefix qt-cpp run test",
1719
"test:qt-qml": "npm --prefix qt-qml run test",
1820
"test:qt-ui": "npm --prefix qt-ui run test",
1921
"test:all": "npm run test:qt-core && npm run test:qt-cpp && npm run test:qt-ui && npm run test:qt-qml",
20-
"all_dev:qt-ui": "ts-node ./scripts/all_dev.ts --extension=\"qt-ui\"",
2122
"lint": "npm run prettierWrite && eslint scripts --fix --cache",
2223
"lint:qt-core": "cd qt-core && npm run lint",
2324
"lint:qt-qml": "cd qt-qml && npm run lint",
2425
"lint:qt-cpp": "cd qt-cpp && npm run lint",
26+
"lint:qt-python": "cd qt-python && npm run lint",
2527
"lint:qt-ui": "cd qt-ui && npm run lint",
2628
"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",
29+
"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\"",
30+
"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",
2931
"pretest": "npm run prettierWrite && npx tsc --incremental --noEmit && eslint scripts --fix --cache",
3032
"pretest:qt-core": "cd qt-core && npm run pretest",
3133
"pretest:qt-qml": "cd qt-qml && npm run pretest",
3234
"pretest:qt-cpp": "cd qt-cpp && npm run pretest",
35+
"pretest:qt-python": "cd qt-python && npm run pretest",
3336
"pretest:qt-ui": "cd qt-ui && npm run pretest",
3437
"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",
38+
"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\"",
39+
"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",
3740
"ci-lint:qt-core": "ts-node ./scripts/ci_lint.ts --dir=\"qt-core\" --exclude_licenses=\"qt-core\"",
3841
"ci-lint:qt-qml": "ts-node ./scripts/ci_lint.ts --dir=\"qt-qml\" --exclude_licenses=\"qt-qml\"",
3942
"ci-lint:qt-cpp": "ts-node ./scripts/ci_lint.ts --dir=\"qt-cpp\" --exclude_licenses=\"qt-cpp\"",
43+
"ci-lint:qt-python": "ts-node ./scripts/ci_lint.ts --dir=\"qt-python\" --exclude_licenses=\"qt-python\"",
4044
"ci-lint:qt-ui": "ts-node ./scripts/ci_lint.ts --dir=\"qt-ui\" --exclude_licenses=\"qt-ui\"",
4145
"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 ",
46+
"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\"",
47+
"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 ",
4448
"ci-lint": "npm run prettierCheck && eslint scripts",
4549
"install-ext:qt-core": "ts-node ./scripts/install-ext.ts --dir=\"qt-core\" --name=\"qt-core\"",
4650
"install-ext:qt-qml": "ts-node ./scripts/install-ext.ts --dir=\"qt-qml\" --name=\"qt-qml\"",
4751
"install-ext:qt-cpp": "ts-node ./scripts/install-ext.ts --dir=\"qt-cpp\" --name=\"qt-cpp\"",
52+
"install-ext:qt-python": "ts-node ./scripts/install-ext.ts --dir=\"qt-python\" --name=\"qt-python\"",
4853
"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",
54+
"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\"",
55+
"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",
5156
"install:qt-core": "cd qt-core && npm run install:all",
5257
"install:qt-qml": "cd qt-qml && npm install",
5358
"install:qt-cpp": "cd qt-cpp && npm install",
59+
"install:qt-python": "cd qt-python && npm install",
5460
"install:qt-ui": "cd qt-ui && npm install",
5561
"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",
62+
"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\"",
63+
"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",
5864
"eslint": "ts-node ./scripts/eslint.ts",
5965
"ci:qt-core": "cd qt-core && npm run ci:all",
6066
"ci:qt-qml": "cd qt-qml && npm ci",
6167
"ci:qt-cpp": "cd qt-cpp && npm ci",
68+
"ci:qt-python": "cd qt-python && npm ci",
6269
"ci:qt-ui": "cd qt-ui && npm ci",
6370
"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",
71+
"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\"",
72+
"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",
6673
"package:qt-core": "ts-node ./scripts/package.ts --extension=\"qt-core\"",
6774
"package:qt-qml": "ts-node ./scripts/package.ts --extension=\"qt-qml\"",
6875
"package:qt-cpp": "ts-node ./scripts/package.ts --extension=\"qt-cpp\"",
76+
"package:qt-python": "ts-node ./scripts/package.ts --extension=\"qt-python\"",
6977
"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",
78+
"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\"",
79+
"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",
7280
"compile:qt-core": "cd qt-core && npm run compile",
7381
"compile:qt-qml": "cd qt-qml && npm run compile",
7482
"compile:qt-cpp": "npm run prepareNatvisFiles && cd qt-cpp && npm run compile",
83+
"compile:qt-python": "cd qt-python && npm run compile",
7584
"compile:qt-ui": "cd qt-ui && npm run compile",
7685
"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",
86+
"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\"",
87+
"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",
7988
"checkLicenses": "ts-node ./scripts/check_licenses.ts",
8089
"checkPackage": "ts-node ./scripts/check_package.ts",
8190
"checkStyle": "ts-node ./scripts/check_style.ts",
@@ -89,14 +98,16 @@
8998
"generateLicenses:qt-core-webview": "npm run generateLicenses -- --dir=\"qt-core/webview-ui\" --exclude=\"qt-core-webview\" --output=\"qt-core/webview-ui/ThirdPartyNotices.txt\"",
9099
"generateLicenses:qt-qml": "npm run generateLicenses -- --dir=\"qt-qml\" --exclude=\"qt-qml, qt-lib\" --output=\"qt-qml/ThirdPartyNotices.txt\"",
91100
"generateLicenses:qt-cpp": "npm run generateLicenses -- --dir=\"qt-cpp\" --exclude=\"qt-cpp, qt-lib\" --output=\"qt-cpp/ThirdPartyNotices.txt\"",
101+
"generateLicenses:qt-python": "npm run generateLicenses -- --dir=\"qt-python\" --exclude=\"qt-python, qt-lib\" --output=\"qt-python/ThirdPartyNotices.txt\"",
92102
"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",
103+
"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\"",
104+
"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",
95105
"_prepublish_git": "git reset --hard && git clean -ffdx",
96106
"_prepublish": "npm run _prepublish_git && npm ci && npm run ci:qt-lib && npm run compile:qt-lib && npm run ci-lint:qt-lib",
97107
"publish:qt-core": "ts-node ./scripts/publish.ts --extension=\"qt-core\"",
98108
"publish:qt-qml": "ts-node ./scripts/publish.ts --extension=\"qt-qml\"",
99109
"publish:qt-cpp": "ts-node ./scripts/publish.ts --extension=\"qt-cpp\"",
110+
"publish:qt-python": "ts-node ./scripts/publish.ts --extension=\"qt-python\"",
100111
"publish:qt-ui": "ts-node ./scripts/publish.ts --extension=\"qt-ui\"",
101112
"publish:qt-cpp-pack": "ts-node ./scripts/publish_ext_pack.ts --dir=\"extension_packs/cpp\" --pack=\"qt-cpp-pack\"",
102113
"publish:qt-wasm-pack": "ts-node ./scripts/publish_ext_pack.ts --dir=\"extension_packs/wasm\" --pack=\"qt-wasm-pack\"",
@@ -105,8 +116,8 @@
105116
"prettierWrite": "npm run prettierBase -- --write \"scripts/**/*.{js,ts,mts,json,mjs,cjs}\" \"eslint.config.mjs\" \"common/.eslintrc.cjs\" --log-level silent",
106117
"prettierCheck": "npm run prettierBase -- --check \"scripts/**/*.{js,ts,mts,json,mjs,cjs}\" \"eslint.config.mjs\" \"common/.eslintrc.cjs\"",
107118
"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",
119+
"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",
120+
"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",
110121
"build:qt-cli": "cd qt-cli && bash run.sh build"
111122
},
112123
"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)