Skip to content

Commit b51f078

Browse files
committed
remove more unwanted dependencies, kill tests
1 parent 0da1f42 commit b51f078

File tree

5 files changed

+1473
-7477
lines changed

5 files changed

+1473
-7477
lines changed

build.py

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@
6969
)
7070

7171
parser.add_argument(
72-
"--ci-bench",
73-
action=argparse.BooleanOptionalAction,
74-
default=False,
75-
help="Run the benchmarking script that is run in CI (default is --no-ci-bench)",
72+
"--ci-bench",
73+
action=argparse.BooleanOptionalAction,
74+
default=False,
75+
help="Run the benchmarking script that is run in CI (default is --no-ci-bench)",
7676
)
7777

7878
args = parser.parse_args()
@@ -304,25 +304,46 @@ def run_python_integration_tests(cwd, interpreter):
304304
def run_ci_historic_benchmark():
305305
branch = "main"
306306
output = subprocess.check_output(
307-
["git", "rev-list", "--since=1 week ago", "--pretty=format:%ad__%h", "--date=short", branch]
307+
[
308+
"git",
309+
"rev-list",
310+
"--since=1 week ago",
311+
"--pretty=format:%ad__%h",
312+
"--date=short",
313+
branch,
314+
]
308315
).decode("utf-8")
309-
print('\n'.join([line for i, line in enumerate(output.split('\n')) if i % 2 == 1]))
316+
print("\n".join([line for i, line in enumerate(output.split("\n")) if i % 2 == 1]))
310317

311318
output = subprocess.check_output(
312-
["git", "rev-list", "--since=1 week ago", "--pretty=format:%ad__%h", "--date=short", branch]
319+
[
320+
"git",
321+
"rev-list",
322+
"--since=1 week ago",
323+
"--pretty=format:%ad__%h",
324+
"--date=short",
325+
branch,
326+
]
313327
).decode("utf-8")
314-
date_and_commits = [line for i, line in enumerate(output.split('\n')) if i % 2 == 1]
328+
date_and_commits = [line for i, line in enumerate(output.split("\n")) if i % 2 == 1]
315329

316330
for date_and_commit in date_and_commits:
317331
print("benching commit", date_and_commit)
318332
result = subprocess.run(
319-
["cargo", "criterion", "--message-format=json", "--history-id", date_and_commit],
333+
[
334+
"cargo",
335+
"criterion",
336+
"--message-format=json",
337+
"--history-id",
338+
date_and_commit,
339+
],
320340
capture_output=True,
321-
text=True
341+
text=True,
322342
)
323343
with open(f"{date_and_commit}.json", "w") as f:
324344
f.write(result.stdout)
325345

346+
326347
if build_pip:
327348
step_start("Building the pip package")
328349

@@ -388,11 +409,6 @@ def run_ci_historic_benchmark():
388409
subprocess.run(npm_args, check=True, text=True, cwd=circuit_vis_src)
389410
step_end()
390411

391-
if run_tests:
392-
step_start("Running the circuit_vis tests")
393-
subprocess.run([npm_cmd, "test"], check=True, text=True, cwd=circuit_vis_src)
394-
step_end()
395-
396412
if build_npm:
397413
step_start("Building the npm package")
398414
# Copy the wasm build files over for web and node targets

circuit_vis/package.json

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@
66
"scripts": {
77
"build": "tsc",
88
"build:prod": "tsc && webpack",
9-
"coverage": "jest --coverage",
109
"lint": "eslint .",
1110
"lint:fix": "eslint . --fix",
1211
"prepublishOnly": "npm run lint && npm run test && npm run build:prod",
13-
"start": "tsc -w",
14-
"test": "jest"
12+
"start": "tsc -w"
1513
},
1614
"files": [
1715
"README.md",
@@ -30,17 +28,5 @@
3028
],
3129
"author": "Microsoft Quantum",
3230
"license": "MIT",
33-
"devDependencies": {
34-
"@types/jest": "^26.0.4",
35-
"@types/prettier": "2.6.0",
36-
"jest": "^26.6.3",
37-
"prettier": "2.6.0",
38-
"terser-webpack-plugin": "^4.1.0",
39-
"ts-jest": "^26.1.2",
40-
"ts-loader": "^8.0.2",
41-
"typescript": "^4.9.4",
42-
"webpack": "^5.75.0",
43-
"webpack-cli": "^5.0.1"
44-
},
4531
"homepage": "https://github.com/microsoft/quantum-viz.js#readme"
4632
}

circuit_vis/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const config = {
4040
minimize: true,
4141
minimizer: [
4242
new TerserPlugin({
43-
sourceMap: true,
43+
// sourceMap: true,
4444
include: /\.min\.js$/,
4545
}),
4646
],

0 commit comments

Comments
 (0)