Skip to content

Commit ab88f25

Browse files
feat: update nmr-cli to replace 'chromium' with 'firefox' for spectra image capture(#104)
* chore(nmr-cli): update dependencies * feat(nmr-cli): update nmrium core dependencies * refactor(nmr-cli): replace 'chromium' with 'firefox' for spectra image capture * chore(nmr-cli): update playwright to version 1.58.2
1 parent 2349a97 commit ab88f25

File tree

4 files changed

+78
-77
lines changed

4 files changed

+78
-77
lines changed

app/scripts/nmr-cli/Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# build the image ` docker build --tag nmr-cli . `
22
# run the container ` docker run -it nmr-cli bash `
33

4-
FROM mcr.microsoft.com/playwright:v1.56.1-noble
4+
FROM mcr.microsoft.com/playwright:v1.58.2-noble
55

66
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
77

8+
# Downgrade to Node 22
9+
RUN npm install -g n && n 22 && hash -r
810

911
WORKDIR /app
1012

@@ -26,10 +28,9 @@ COPY . ./
2628

2729
RUN npm run build
2830

31+
2932
# Install the nmr-cli as a global package
33+
# For example, nmr-cli parse-spectra -u https://s3.uni-jena.de/nmrxiv/production/archive/d5ec45db-d984-46e9-bb72-c43fd4a463fa/Sali_Eth.zip -s
3034
# For example, nmr-cli parse-spectra -u https://cheminfo.github.io/bruker-data-test/data/zipped/aspirin-1h.zip
3135
# nmr-cli predict -n "1H" --id 1 --type "nmr;1H;1d" --shifts "1" --solvent "Dimethylsulphoxide-D6 (DMSO-D6, C2D6SO)" -m $"\n Ketcher 6122516162D 1 1.00000 0.00000 0\n\n 16 17 0 0 0 0 0 0 0 0999 V2000\n 1.1954 -4.6484 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 2.9258 -4.6479 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 2.0622 -4.1483 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 2.9258 -5.6488 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 1.1954 -5.6533 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 2.0644 -6.1483 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 3.7902 -4.1495 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n 4.6574 -4.6498 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 3.7964 -6.1512 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n 4.6596 -5.6458 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 5.5228 -4.1488 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 5.5277 -6.1421 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 6.3895 -4.6477 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 5.5216 -3.1488 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 7.2548 -4.1466 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 8.1215 -4.6455 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 3 1 2 0 0 0 0\n 1 5 1 0 0 0 0\n 5 6 2 0 0 0 0\n 6 4 1 0 0 0 0\n 4 2 1 0 0 0 0\n 2 3 1 0 0 0 0\n 4 9 1 0 0 0 0\n 9 10 2 0 0 0 0\n 10 8 1 0 0 0 0\n 8 7 2 0 0 0 0\n 7 2 1 0 0 0 0\n 8 11 1 0 0 0 0\n 10 12 1 0 0 0 0\n 11 13 1 0 0 0 0\n 11 14 2 0 0 0 0\n 13 15 1 0 0 0 0\n 15 16 1 0 0 0 0\nM END"
3236
RUN npm install . -g
33-
34-
35-

app/scripts/nmr-cli/package-lock.json

Lines changed: 62 additions & 62 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/scripts/nmr-cli/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,23 @@
1515
"nmr-cli": "./build/index.js"
1616
},
1717
"dependencies": {
18-
"@zakodium/nmr-types": "^0.5.0",
19-
"@zakodium/nmrium-core": "^0.5.6",
20-
"@zakodium/nmrium-core-plugins": "^0.6.25",
21-
"axios": "^1.13.2",
22-
"file-collection": "^6.5.0",
18+
"@zakodium/nmr-types": "^0.5.2",
19+
"@zakodium/nmrium-core": "^0.6.5",
20+
"@zakodium/nmrium-core-plugins": "^0.6.39",
21+
"axios": "^1.13.5",
22+
"file-collection": "^6.6.0",
2323
"json-stream-stringify": "^3.1.6",
2424
"lodash.merge": "^4.6.2",
2525
"mf-parser": "^3.6.0",
26-
"ml-spectra-processing": "^14.19.0",
27-
"nmr-processing": "^22.1.0",
28-
"openchemlib": "^9.19.0",
29-
"playwright": "1.56.1",
26+
"ml-spectra-processing": "^14.20.0",
27+
"nmr-processing": "^22.5.0",
28+
"openchemlib": "^9.20.0",
29+
"playwright": "1.58.2",
3030
"yargs": "^18.0.0"
3131
},
3232
"devDependencies": {
3333
"@types/lodash.merge": "^4.6.9",
34-
"@types/node": "^25.0.8",
34+
"@types/node": "^25.3.0",
3535
"@types/yargs": "^17.0.35",
3636
"ts-node": "^10.9.2",
3737
"typescript": "^5.9.3"

app/scripts/nmr-cli/src/parse/prase-spectra.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function generateNMRiumURL() {
3838
}
3939

4040
async function launchBrowser() {
41-
return playwright.chromium.launch();
41+
return playwright.firefox.launch();
4242
}
4343

4444
async function captureSpectraViewAsBase64(nmriumState: Partial<NmriumState>): Promise<Snapshot[]> {

0 commit comments

Comments
 (0)