diff --git a/.github/workflows/dev-build.yml b/.github/workflows/dev-build.yml index 583a0f5..336817e 100644 --- a/.github/workflows/dev-build.yml +++ b/.github/workflows/dev-build.yml @@ -35,19 +35,19 @@ jobs: steps: # Clone repository code to runner - name: Check out the repo - uses: actions/checkout@v4 + uses: actions/checkout@v7 # Enable multi-architecture builds via QEMU emulation - name: Set up QEMU - uses: docker/setup-qemu-action@v3 + uses: docker/setup-qemu-action@v4 # Enable advanced Docker build features (required for caching) - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@v4 # Authenticate with Docker Hub for image push access - name: Log in to Docker Hub - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} @@ -55,7 +55,7 @@ jobs: # Detect changes in nmr-cli folder to skip unnecessary builds - name: Check for file changes id: changes - uses: dorny/paths-filter@v3 + uses: dorny/paths-filter@v4 with: filters: | nmr-cli: @@ -63,7 +63,7 @@ jobs: # Build main nmrKit image with registry caching for faster builds - name: Build and push nmrKit Docker image - uses: docker/build-push-action@v6 + uses: docker/build-push-action@v7 with: context: . file: ./Dockerfile @@ -77,7 +77,7 @@ jobs: # Build nmr-cli image only if files in app/scripts/nmr-cli/ changed - name: Build and push nmr-cli Docker image if: steps.changes.outputs.nmr-cli == 'true' - uses: docker/build-push-action@v6 + uses: docker/build-push-action@v7 with: context: ./app/scripts/nmr-cli/ file: ./app/scripts/nmr-cli/Dockerfile diff --git a/.github/workflows/doc-deploy.yml b/.github/workflows/doc-deploy.yml index 8c6678c..319710e 100644 --- a/.github/workflows/doc-deploy.yml +++ b/.github/workflows/doc-deploy.yml @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: fetch-depth: 0 # Not needed if lastUpdated is not enabled # - uses: pnpm/action-setup@v2 # Uncomment this if you're using pnpm diff --git a/.github/workflows/prod-build.yml b/.github/workflows/prod-build.yml index 1cfdcc2..628048b 100644 --- a/.github/workflows/prod-build.yml +++ b/.github/workflows/prod-build.yml @@ -71,19 +71,19 @@ jobs: steps: # Clone repository code to runner - name: Check out the repo - uses: actions/checkout@v4 + uses: actions/checkout@v7 # Enable multi-architecture builds via QEMU emulation - name: Set up QEMU - uses: docker/setup-qemu-action@v3 + uses: docker/setup-qemu-action@v4 # Enable advanced Docker build features (required for caching) - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@v4 # Authenticate with Docker Hub for image push access - name: Log in to Docker Hub - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} @@ -91,7 +91,7 @@ jobs: # Detect changes in nmr-cli folder to skip unnecessary builds - name: Check for file changes id: changes - uses: dorny/paths-filter@v3 + uses: dorny/paths-filter@v4 with: filters: | nmr-cli: @@ -107,7 +107,7 @@ jobs: # Build main nmrKit image with registry caching for faster builds - name: Build and push nmrKit Docker image - uses: docker/build-push-action@v6 + uses: docker/build-push-action@v7 with: context: . file: ./Dockerfile @@ -123,7 +123,7 @@ jobs: # Build nmr-cli image only if files in app/scripts/nmr-cli/ changed - name: Build and push nmr-cli Docker image if: steps.changes.outputs.nmr-cli == 'true' - uses: docker/build-push-action@v6 + uses: docker/build-push-action@v7 with: context: ./app/scripts/nmr-cli/ file: ./app/scripts/nmr-cli/Dockerfile diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1ef0a94..845d3a0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,7 +31,7 @@ jobs: python-version: ["3.10"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: diff --git a/Dockerfile b/Dockerfile index e9f73d1..0964b23 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM continuumio/miniconda3:24.1.2-0 AS nmrkit-ms +FROM continuumio/miniconda3:25.3.1-1 AS nmrkit-ms ARG TARGETARCH=amd64 ENV PYTHON_VERSION=3.10 @@ -24,8 +24,13 @@ RUN apt-get update && \ RUN apt-get update && apt-get -y install docker.io -RUN conda install -c conda-forge python>=PYTHON_VERSION -RUN conda install -c conda-forge openbabel>=OPENBABEL_VERSION +RUN conda config --remove-key channels && \ + conda config --add channels conda-forge && \ + conda config --set channel_priority strict + +RUN conda install -y \ + "python=${PYTHON_VERSION}" \ + "openbabel>=${OPENBABEL_VERSION}" RUN pip3 install rdkit @@ -51,8 +56,11 @@ RUN python3 -m pip install uvicorn[standard] COPY ./app /code/app -RUN curl -sL https://deb.nodesource.com/setup_current.x | bash - -RUN apt-get install -y nodejs +# Download the setup script first so a failure fails the build instead of being masked by the pipe +RUN curl -fsSL https://deb.nodesource.com/setup_24.x -o /tmp/nodesource_setup.sh && \ + bash /tmp/nodesource_setup.sh && \ + apt-get install -y nodejs && \ + rm -rf /var/lib/apt/lists/* /tmp/nodesource_setup.sh RUN npm install -g npm@latest RUN npm install -g /code/app/scripts/nmr-cli diff --git a/README.md b/README.md index 80a5b7a..76a686e 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -
+ [](https://opensource.org/licenses/MIT) [](https://github.com/NFDI4Chem/nmrkit/graphs/commit-activity) [](https://github.com/NFDI4Chem/nmrkit/issues) -[]([https://GitHub.com/Steinbeck-Lab/cheminformatics-python-microservice/graphs/contributors/](https://github.com/NFDI4Chem/nmrkit/graphs/contributors)) +[](<[https://GitHub.com/Steinbeck-Lab/cheminformatics-python-microservice/graphs/contributors/](https://github.com/NFDI4Chem/nmrkit/graphs/contributors)>) [](https://cdk.github.io) [](https://www.rdkit.org/)  @@ -12,7 +12,6 @@ [](https://fastapi.tiangolo.com/) [](https://doi.org/10.5281/zenodo.8211374) - # Welcome to NMRKit ๐ NMRKit features a collection of powerful microservices designed to simplify your NMR data processing and analysis. Whether you're a seasoned researcher or a curious chemist, our suite of tools offers NMR Prediction, Validation, and Depiction via the nmrium library, along with seamless Format Conversion using the nmr-load-save package. With our robust API, functionalities, and developer-friendly documentation, exploring and interpreting NMR spectra has never been easier. @@ -27,7 +26,7 @@ Key Features: API Reference (Scalar) - https://dev.nmrkit.nmrxiv.org/latest/docs ๐ข Found a bug or have a feature request? We'd love to hear from you! Please open an issue: [https://github.com/NFDI4Chem/nmrkit/issues] -Happy NMR exploring! ๐งช๐" +Happy NMR exploring..! ๐งช๐" ## Help Desk @@ -46,9 +45,9 @@ Licensed under the [MIT license](https://opensource.org/licenses/MIT). Venkata, C., Sharma, N. , Stefan Kuhn, Hamed Musallam nmrKit [Computer software]. https://doi.org/10.5281/zenodo.8211374 ## Maintained by -NMRKit is developed and maintained by the [NFDI4Chem partners](https://www.nfdi4chem.de/) at the [Friedrich Schiller University](https://www.uni-jena.de/en/) Jena, Germany. -The code for this web application is released under the [MIT license](https://opensource.org/licenses/MIT). +NMRKit is developed and maintained by the [NFDI4Chem partners](https://www.nfdi4chem.de/) at the [Friedrich Schiller University](https://www.uni-jena.de/en/) Jena, Germany. +The code for this web application is released under the [MIT license](https://opensource.org/licenses/MIT). diff --git a/app/routers/spectra.py b/app/routers/spectra.py index 1e46e3c..1fa8ef9 100644 --- a/app/routers/spectra.py +++ b/app/routers/spectra.py @@ -3,7 +3,7 @@ import io from app.schemas import HealthCheck from pydantic import BaseModel, HttpUrl, Field -from typing import Optional +from typing import Optional, List import subprocess import tempfile import os @@ -50,6 +50,10 @@ class UrlParseRequest(BaseModel): ) raw_data: bool = Field( False, description="Include raw data in the output (default: data source)") + include: Optional[List[str]] = Field( + None, description="Only include files matching pattern(s) (glob/regex string)") + exclude: Optional[List[str]] = Field( + None, description="Exclude files matching pattern(s) (glob/regex string)") model_config = { "json_schema_extra": { @@ -95,6 +99,8 @@ def run_command( auto_processing: bool = False, auto_detection: bool = False, raw_data: bool = False, + include: Optional[List[str]] = None, + exclude: Optional[List[str]] = None, ) -> StreamingResponse: """Execute nmr-cli parse-spectra command in Docker container.""" @@ -113,6 +119,12 @@ def run_command( cmd.append("-d") if raw_data: cmd.append("-r") + if include: + cmd.append("--include") + cmd.extend(include) + if exclude: + cmd.append("--exclude") + cmd.extend(exclude) try: result = subprocess.run( @@ -362,7 +374,11 @@ async def parse_spectra_from_file( description="Enable ranges and zones automatic detection", ), raw_data: bool = Form( - False, description="Include raw data in the output (default: data source references)") + False, description="Include raw data in the output (default: data source references)"), + include: Optional[List[str]] = Form( + None, description="Only include files matching pattern(s) (glob/regex string)"), + exclude: Optional[List[str]] = Form( + None, description="Exclude files matching pattern(s) (glob/regex string)"), ): """ ## Parse spectra from an uploaded file @@ -376,6 +392,8 @@ async def parse_spectra_from_file( | `auto_processing` | Automatically process FID โ FT spectra | | `auto_detection` | Automatically detect ranges and zones | | `raw_data` | Include raw data in the output (default: data source) | + | `include` | Only include files matching pattern(s) | + | `exclude` | Exclude files matching pattern(s) | ### Returns Parsed spectra data in NMRium-compatible JSON format. """ @@ -405,6 +423,8 @@ async def parse_spectra_from_file( auto_processing=auto_processing, auto_detection=auto_detection, raw_data=raw_data, + include=include, + exclude=exclude, ) except HTTPException: @@ -452,6 +472,8 @@ async def parse_spectra_from_url(request: UrlParseRequest): | `auto_processing` | Automatically process FID โ FT spectra | | `auto_detection` | Automatically detect ranges and zones | | `raw_data` | Include raw data in the output (default: data source) | + | `include` | Only include files matching pattern(s) | + | `exclude` | Exclude files matching pattern(s) | ### Returns Parsed spectra data in NMRium-compatible JSON format. @@ -463,6 +485,8 @@ async def parse_spectra_from_url(request: UrlParseRequest): auto_processing=request.auto_processing, auto_detection=request.auto_detection, raw_data=request.raw_data, + include=request.include, + exclude=request.exclude, ) except HTTPException: diff --git a/app/scripts/nmr-cli/Dockerfile b/app/scripts/nmr-cli/Dockerfile index 2e38276..f7877d5 100644 --- a/app/scripts/nmr-cli/Dockerfile +++ b/app/scripts/nmr-cli/Dockerfile @@ -1,13 +1,21 @@ # build the image ` docker build --tag nmr-cli . ` # run the container ` docker run -it nmr-cli bash ` -FROM mcr.microsoft.com/playwright:v1.58.2-noble +# NOTE: if `docker run` prints +# "Error while loading conda entry point: conda-libmamba-solver (module 'libmambapy' has no attribute 'QueryFormat')" +# this is unrelated to this image/container โ it comes from a version mismatch between +# conda-libmamba-solver and libmambapy in your HOST shell's conda (base) environment. +# It does not affect the container. To fix it on the host, run: +# conda update -n base -c conda-forge conda conda-libmamba-solver libmambapy +# or, if that doesn't resolve it: +# conda install -n base -c conda-forge --force-reinstall conda-libmamba-solver libmambapy +# or, to bypass libmamba entirely: +# conda config --set solver classic + +FROM mcr.microsoft.com/playwright:v1.62.1-noble SHELL ["/bin/bash", "-o", "pipefail", "-c"] -# Downgrade to Node 22 -RUN npm install -g n && n 22 && hash -r - WORKDIR /app #ENV BASE_NMRIUM_URL=https://nmrium.nmrxiv.org/ diff --git a/app/scripts/nmr-cli/package-lock.json b/app/scripts/nmr-cli/package-lock.json index dd4eebf..91f5f24 100644 --- a/app/scripts/nmr-cli/package-lock.json +++ b/app/scripts/nmr-cli/package-lock.json @@ -9,27 +9,28 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "@zakodium/nmr-types": "^0.5.12", - "@zakodium/nmrium-core": "0.7.30", - "@zakodium/nmrium-core-plugins": "0.7.39", - "axios": "^1.13.6", + "@zakodium/nmr-types": "^0.5.26", + "@zakodium/nmrium-core": "0.7.65", + "@zakodium/nmrium-core-plugins": "0.7.87", + "axios": "^1.19.0", "fifo-logger": "^2.0.1", - "file-collection": "^6.6.1", - "json-stream-stringify": "^3.1.6", + "file-collection": "^6.7.0", + "json-stream-stringify": "^3.1.7", "lodash.merge": "^4.6.2", - "mf-parser": "^3.7.1", - "ml-spectra-processing": "^14.22.0", - "nmr-processing": "^22.5.2", - "openchemlib": "^9.20.0", - "playwright": "1.58.2", - "yargs": "^18.0.0" + "mf-parser": "^3.9.2", + "ml-spectra-processing": "^14.34.0", + "nmr-correlation": "^3.0.2", + "nmr-processing": "^22.23.6", + "openchemlib": "^9.25.0", + "playwright": "1.62.1", + "yargs": "^18.1.0" }, "bin": { "nmr-cli": "build/index.js" }, "devDependencies": { "@types/lodash.merge": "^4.6.9", - "@types/node": "^25.3.5", + "@types/node": "^26.2.0", "@types/yargs": "^17.0.35", "ts-node": "^10.9.2", "typescript": "^5.9.3" @@ -128,13 +129,14 @@ } }, "node_modules/@types/node": { - "version": "25.3.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-25.3.5.tgz", - "integrity": "sha512-oX8xrhvpiyRCQkG1MFchB09f+cXftgIXb3a7UUa4Y3wpmZPw5tyZGTLWhlESOLq1Rq6oDlc8npVU2/9xiCuXMA==", + "version": "26.4.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-26.4.0.tgz", + "integrity": "sha512-faiGnoIrLH/V8cibOMEAZ8pMw6oXqSukl29ra4mN8GdaB2ZewzeaLj+INpV5N+Z1eKWzY+IzaIZH2EIR6YZRNQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { - "undici-types": "~7.18.0" + "undici-types": "~8.3.0" } }, "node_modules/@types/yargs": { @@ -155,73 +157,84 @@ "license": "MIT" }, "node_modules/@zakodium/nmr-types": { - "version": "0.5.23", - "resolved": "https://registry.npmjs.org/@zakodium/nmr-types/-/nmr-types-0.5.23.tgz", - "integrity": "sha512-a8zmplUHOevUeOQ69yFwzCNNiUi867q2RY63GXg4Clhm+3BnXonBeHXicSycOoJzSz2V0pQ4LFPuqJMxKNjLvw==", + "version": "0.5.26", + "resolved": "https://registry.npmjs.org/@zakodium/nmr-types/-/nmr-types-0.5.26.tgz", + "integrity": "sha512-Da7K23q8O3EK8gslzyx5Hgd3k4TXq0w8JW+Qt2pDBZNY1M+uyVE97R9vcQKtcZiGVl/O0f57+qJ3kxvqVEnRgQ==", "license": "CC-BY-NC-SA-4.0", "dependencies": { + "cheminfo-types": "^1.15.0", "ml-peak-shape-generator": "^5.5.0", "ml-signal-processing": "^2.2.2", - "ml-spectra-processing": "^14.33.0" - } - }, - "node_modules/@zakodium/nmr-types/node_modules/ml-peak-shape-generator": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/ml-peak-shape-generator/-/ml-peak-shape-generator-5.5.0.tgz", - "integrity": "sha512-DyBq/u5S+/0F49Hm0OWHwWvPPM1aaCZIs/eI7/fUTWfIm86Yu03YXWMQ3874eq33MLZVgM8KguGkfeGDffCLog==", - "license": "MIT", - "dependencies": { - "cheminfo-types": "^1.15.0" + "ml-spectra-processing": "^14.33.0", + "zod": "^4.4.3" } }, "node_modules/@zakodium/nmrium-core": { - "version": "0.7.30", - "resolved": "https://registry.npmjs.org/@zakodium/nmrium-core/-/nmrium-core-0.7.30.tgz", - "integrity": "sha512-uds3UysKrAgm38Yt2swNnt8nmf5SHqt1LuVnewwDTolztl3Lead0RtgOYsRjnL30k6gpvGrgaoENkIMxSY0/kQ==", + "version": "0.7.65", + "resolved": "https://registry.npmjs.org/@zakodium/nmrium-core/-/nmrium-core-0.7.65.tgz", + "integrity": "sha512-mXXylnGVMbYRdz23kalRziwMK6OCkJkS3HW9izjatH/6/VZgnbiSa5DBm+SazBuNe5QAutrXIFUWa+t2D/5Esw==", "license": "CC-BY-NC-SA-4.0", "dependencies": { + "@zakodium/utils": "^0.5.1", "cheminfo-types": "^1.15.0", "fifo-logger": "^2.0.1", - "file-collection": "^6.6.1", + "file-collection": "^6.7.0", "is-any-array": "^3.0.0", "lodash.merge": "^4.6.2", - "ml-spectra-processing": "^14.28.1", - "nmr-correlation": "^2.3.5" + "ml-spectra-processing": "^14.33.0" }, "peerDependencies": { "zod": "^4.4.3" } }, "node_modules/@zakodium/nmrium-core-plugins": { - "version": "0.7.39", - "resolved": "https://registry.npmjs.org/@zakodium/nmrium-core-plugins/-/nmrium-core-plugins-0.7.39.tgz", - "integrity": "sha512-WFO8UmUB4ZGwO+eCTjC1RfUBeCtv+raQmsuVx6L7zf1/BuD0N3Lq0q+JpKkdn85sfFGckyejJr1yo2qd91EVMQ==", + "version": "0.7.87", + "resolved": "https://registry.npmjs.org/@zakodium/nmrium-core-plugins/-/nmrium-core-plugins-0.7.87.tgz", + "integrity": "sha512-g/JwP7tgfndzQAy8xmVBWb0PASoQc/IabMHONC7uZ+juXpYizX/XM31WwNSnmAWlbGVmKHM53xU7F+mCJX2Imw==", "license": "CC-BY-NC-SA-4.0", "dependencies": { "@date-fns/utc": "^2.1.1", - "@zakodium/nmrium-core": "^0.7.30", + "@zakodium/nmrium-core": "^0.7.65", "cheminfo-types": "^1.15.0", - "convert-to-jcamp": "^7.0.0", - "date-fns": "^4.1.0", - "file-collection": "^6.6.1", + "convert-to-jcamp": "^7.0.1", + "date-fns": "^4.4.0", + "file-collection": "^6.7.0", "gyromagnetic-ratio": "^2.0.0", "is-any-array": "^3.0.0", - "jcampconverter": "^12.3.3", + "jcampconverter": "^12.5.5", "linear-sum-assignment": "^1.0.9", "lodash.merge": "^4.6.2", - "ml-spectra-processing": "^14.28.1", - "nmr-processing": "^22.13.0", - "openchemlib": "^9.22.0", - "openchemlib-utils": "^8.15.0", - "sdf-parser": "^8.0.0", + "ml-spectra-processing": "^14.33.0", + "nmr-processing": "^22.23.6", + "openchemlib": "^9.24.0", + "openchemlib-utils": "^8.17.1", + "sdf-parser": "^9.0.0", "ts-pattern": "^5.9.0", "zod": "^4.4.3" + }, + "peerDependencies": { + "react": "*", + "react-dom": "*" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } } }, + "node_modules/@zakodium/utils": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@zakodium/utils/-/utils-0.5.1.tgz", + "integrity": "sha512-aRtHXol0w/nL4ZYiVNicw/7batBasftRDmYSCXj54AWf1MvLrKZNk9hthzp8I+wm7jL938HAIv8eg/45J+XyOg==", + "license": "MIT" + }, "node_modules/@zip.js/zip.js": { - "version": "2.8.23", - "resolved": "https://registry.npmjs.org/@zip.js/zip.js/-/zip.js-2.8.23.tgz", - "integrity": "sha512-RB+RLnxPJFPrGvQ9rgO+4JOcsob6lD32OcF0QE0yg24oeW9q8KnTTNlugcDaIveEcCbclobJcZP+fLQ++sH0bw==", + "version": "2.8.61", + "resolved": "https://registry.npmjs.org/@zip.js/zip.js/-/zip.js-2.8.61.tgz", + "integrity": "sha512-F9RnQJXgvCSdAJfMtSrH5Uh/LcLg8fZlg5ARC4u5N4w9v/DG27cN3C/ngUrY1JdJGX2LRv5DDViXeZJgbcppWA==", "license": "BSD-3-Clause", "engines": { "bun": ">=0.7.0", @@ -255,6 +268,18 @@ "node": ">=0.4.0" } }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, "node_modules/ansi-regex": { "version": "6.2.2", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", @@ -299,14 +324,15 @@ "license": "MIT" }, "node_modules/axios": { - "version": "1.13.6", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.6.tgz", - "integrity": "sha512-ChTCHMouEe2kn713WHbQGcuYrr6fXTBiu460OTwWrWob16g1bXn4vtz07Ope7ewMozJAnEquLk5lWQWtBig9DQ==", + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.20.0.tgz", + "integrity": "sha512-r8aOh8j9cGKpgQAqpzrUHnSIc6a59Y3Xf/cv8sy1DrHCkZHzQGEuoq1tARk6qSyDdtQGSDgpb9kFlruzPvrgwg==", "license": "MIT", "dependencies": { - "follow-redirects": "^1.15.11", - "form-data": "^4.0.5", - "proxy-from-env": "^1.1.0" + "follow-redirects": "^1.16.0", + "form-data": "^4.0.6", + "https-proxy-agent": "^5.0.1", + "proxy-from-env": "^2.1.0" } }, "node_modules/baselines": { @@ -341,9 +367,9 @@ } }, "node_modules/chemical-elements": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/chemical-elements/-/chemical-elements-2.2.2.tgz", - "integrity": "sha512-EL7cKE8FSyTcsWbs3uECKfYtdZW6Z8tD2OAeRXK4+rRc3+AMsJUqu/Sl790Ej4qbcy11/35ErdfnI5Yy7zQopw==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/chemical-elements/-/chemical-elements-2.3.2.tgz", + "integrity": "sha512-3q1h/yFUqTFitGAEShu5AcC9KWHZqtFDuiqxgnViVx77zIvrVJH1jSNHPzQGSsCkCe+czVcFdF/E9XyexOIuaw==", "license": "MIT" }, "node_modules/chemical-groups": { @@ -431,15 +457,32 @@ } }, "node_modules/date-fns": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-4.1.0.tgz", - "integrity": "sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-4.4.0.tgz", + "integrity": "sha512-+1UMbeh68lH1SegH83CGWwpb6OHHbpSgr3+s5Eww5M4CAgswBpoWS0AjTOfEJ33HiYKz1hdj/KTFprzXHmq/6w==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/kossnocorp" } }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -513,9 +556,9 @@ } }, "node_modules/es-object-atoms": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", - "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", + "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", "license": "MIT", "dependencies": { "es-errors": "^1.3.0" @@ -564,19 +607,19 @@ } }, "node_modules/file-collection": { - "version": "6.6.1", - "resolved": "https://registry.npmjs.org/file-collection/-/file-collection-6.6.1.tgz", - "integrity": "sha512-YJtg82Xo3pqhfXdM3tT7+vYAYj2GgC+J4jQvhYT2GDk3UsochfrHr7BxGEiQQmjIPu05ogQx9ZJ1VclhNViPJQ==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/file-collection/-/file-collection-6.7.0.tgz", + "integrity": "sha512-IQEIgbRZIJgU91DVQXMjq6zSK0lcwsG/p1Sx0HqfvdsSrCnjtvcME9xsNB5qzNVZH8TyJ9sYJDt1QvIWoVvnNQ==", "license": "MIT", "dependencies": { - "@zip.js/zip.js": "^2.8.15", + "@zip.js/zip.js": "^2.8.23", "cheminfo-types": "^1.10.0" } }, "node_modules/follow-redirects": { - "version": "1.15.11", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", - "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz", + "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==", "funding": [ { "type": "individual", @@ -594,16 +637,16 @@ } }, "node_modules/form-data": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", - "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.6.tgz", + "integrity": "sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==", "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", - "hasown": "^2.0.2", - "mime-types": "^2.1.12" + "hasown": "^2.0.4", + "mime-types": "^2.1.35" }, "engines": { "node": ">= 6" @@ -642,9 +685,9 @@ } }, "node_modules/get-east-asian-width": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.4.0.tgz", - "integrity": "sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.6.0.tgz", + "integrity": "sha512-QRbvDIbx6YklUe6RxeTeleMR0yv3cYH6PsPZHcnVn7xv7zO1BHN8r0XETu8n6Ye3Q+ahtSarc3WgtNWmehIBfA==", "license": "MIT", "engines": { "node": ">=18" @@ -742,9 +785,9 @@ } }, "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", "license": "MIT", "dependencies": { "function-bind": "^1.1.2" @@ -759,6 +802,19 @@ "integrity": "sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg==", "license": "MIT" }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/is-any-array": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-any-array/-/is-any-array-3.0.0.tgz", @@ -766,9 +822,9 @@ "license": "MIT" }, "node_modules/jcampconverter": { - "version": "12.5.3", - "resolved": "https://registry.npmjs.org/jcampconverter/-/jcampconverter-12.5.3.tgz", - "integrity": "sha512-KoUW2KSG561Mz/rt8Jg1SNZInqRgdltU5ZDn0Xdl7AfC5b90ExF+LYzBdgbcgDf1cBFc+WA9eJFysijkhRmquA==", + "version": "12.5.5", + "resolved": "https://registry.npmjs.org/jcampconverter/-/jcampconverter-12.5.5.tgz", + "integrity": "sha512-D5s2gsklqBv6IASEjp1gze7d0gG1BsRcNDm7ZC8esMfv1iVVVoVuehkp0Kg3SRJ09k3N9r1RSTUe1KQeYlxQ2g==", "license": "CC-BY-NC-SA-4.0", "dependencies": { "cheminfo-types": "^1.15.0", @@ -780,9 +836,9 @@ } }, "node_modules/json-stream-stringify": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/json-stream-stringify/-/json-stream-stringify-3.1.6.tgz", - "integrity": "sha512-x7fpwxOkbhFCaJDJ8vb1fBY3DdSa4AlITaz+HHILQJzdPMnHEFjxPwVUi1ALIbcIxDE0PNe/0i7frnY8QnBQog==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/json-stream-stringify/-/json-stream-stringify-3.1.7.tgz", + "integrity": "sha512-F4MWetLtY42YMaAKw5cV4e47zMD5aOT+tjjQWjX18ACtdkQ5Y/vrcfbcQ107Rh+MXjOCIx4KhW0wPmOvG8iQ5w==", "license": "MIT", "engines": { "node": ">=7.10.1" @@ -828,13 +884,13 @@ "license": "ISC" }, "node_modules/mf-parser": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/mf-parser/-/mf-parser-3.7.1.tgz", - "integrity": "sha512-JgVo43b7rkb/miykgXpE0eT+udACCvKWg2BYPysLnkOOQtosI3wP2dq7mUS8guGx2I75PnVs8/HLXbXM4K+IdQ==", + "version": "3.9.2", + "resolved": "https://registry.npmjs.org/mf-parser/-/mf-parser-3.9.2.tgz", + "integrity": "sha512-b/ZweyvktEly+zg3DMI/9UmwX3RriuwNh6kB0xd+NgI0wzDgl3fqyZGa4E8Gbp149N0jAXfT70FQgqGb53GvBg==", "license": "MIT", "dependencies": { "atom-sorter": "^2.2.1", - "chemical-elements": "^2.2.2", + "chemical-elements": "^2.3.2", "chemical-groups": "^2.2.3" } }, @@ -984,15 +1040,6 @@ "ml-spectra-processing": "^14.29.0" } }, - "node_modules/ml-gsd/node_modules/ml-peak-shape-generator": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/ml-peak-shape-generator/-/ml-peak-shape-generator-5.5.0.tgz", - "integrity": "sha512-DyBq/u5S+/0F49Hm0OWHwWvPPM1aaCZIs/eI7/fUTWfIm86Yu03YXWMQ3874eq33MLZVgM8KguGkfeGDffCLog==", - "license": "MIT", - "dependencies": { - "cheminfo-types": "^1.15.0" - } - }, "node_modules/ml-hash-table": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/ml-hash-table/-/ml-hash-table-1.0.0.tgz", @@ -1036,31 +1083,31 @@ } }, "node_modules/ml-matrix-convolution": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/ml-matrix-convolution/-/ml-matrix-convolution-1.0.0.tgz", - "integrity": "sha512-+gS36VTRjBMtUDXlKlAgSs+pZLfOEY0JF/64QRRNq+6KIPCfPlzVO3P41iSEjp1NPwofhLcIJBgKIZyH6ylSVA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ml-matrix-convolution/-/ml-matrix-convolution-2.0.0.tgz", + "integrity": "sha512-XuEZf4ZTffAz7oDMG4olkh9aZmsIMr343gPTY+ZvnLWTlMiG+TegRbP4fpA1ju7/IK9q8u3TcC2cxf/N3ydtRA==", "license": "MIT", "dependencies": { - "ml-fft": "1.3.5" + "ml-fft": "^1.3.5" } }, "node_modules/ml-matrix-peaks-finder": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/ml-matrix-peaks-finder/-/ml-matrix-peaks-finder-1.0.0.tgz", - "integrity": "sha512-a3SZrvADI6kAbOvICnnNbacC+UB6xPRbgbKxGhFeISUCoe4M3g3RMp9UaUFNFA/rRjWNtW+rGioeOH8UNPZT/Q==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ml-matrix-peaks-finder/-/ml-matrix-peaks-finder-2.0.1.tgz", + "integrity": "sha512-PSMwStdTMtnLAhnKlFuKU0PCeQhSZxyNuKPx/t9qQ2N/00+ZkQRoY/+pGlJSG3V7BG5Rz8xz90tyYDno7FDlhw==", "license": "MIT", "dependencies": { "ml-disjoint-set": "^1.0.0", - "ml-matrix-convolution": "^1.0.0" + "ml-matrix-convolution": "^2.0.0" } }, "node_modules/ml-peak-shape-generator": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/ml-peak-shape-generator/-/ml-peak-shape-generator-4.2.0.tgz", - "integrity": "sha512-BDtR0rhUor5/4J9pJOEMRnD+QQ5v6ohx+o6MfRRg2e2IOTeZfp/uJcy5Y852v5CsNec1GmYMkd5PYrY0245qlQ==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/ml-peak-shape-generator/-/ml-peak-shape-generator-5.5.0.tgz", + "integrity": "sha512-DyBq/u5S+/0F49Hm0OWHwWvPPM1aaCZIs/eI7/fUTWfIm86Yu03YXWMQ3874eq33MLZVgM8KguGkfeGDffCLog==", "license": "MIT", "dependencies": { - "cheminfo-types": "^1.1.0" + "cheminfo-types": "^1.15.0" } }, "node_modules/ml-regression-base": { @@ -1164,19 +1211,10 @@ "ml-spectra-processing": "^14.29.0" } }, - "node_modules/ml-spectra-fitting/node_modules/ml-peak-shape-generator": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/ml-peak-shape-generator/-/ml-peak-shape-generator-5.5.0.tgz", - "integrity": "sha512-DyBq/u5S+/0F49Hm0OWHwWvPPM1aaCZIs/eI7/fUTWfIm86Yu03YXWMQ3874eq33MLZVgM8KguGkfeGDffCLog==", - "license": "MIT", - "dependencies": { - "cheminfo-types": "^1.15.0" - } - }, "node_modules/ml-spectra-processing": { - "version": "14.33.0", - "resolved": "https://registry.npmjs.org/ml-spectra-processing/-/ml-spectra-processing-14.33.0.tgz", - "integrity": "sha512-zg71v6exRvPpzDh9SiN5iNAIG8yTFpzfJrRCRSb/hWf5gMsik7q60DkO5ew4knR7xF4DbjYmNWeqLq8gWcQdEQ==", + "version": "14.34.0", + "resolved": "https://registry.npmjs.org/ml-spectra-processing/-/ml-spectra-processing-14.34.0.tgz", + "integrity": "sha512-sNM3nOg7s4tyinRnU5FyYZFV//cPHMvjwfxQvFh3GyrvWNuZmPIZTPS+kiT/SPXMymxA4+qx8oFSZ9K03clGyQ==", "license": "MIT", "dependencies": { "binary-search": "^1.3.6", @@ -1199,6 +1237,12 @@ "integrity": "sha512-Fz2q6dwgzGM8wYKGArTUTZDGa4lQFA2Vi6orjGeTVRy22ZnQFKlJuwS9n8NRviqz1KHAHAzdKJwbnYhdo38uYg==", "license": "MIT" }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, "node_modules/multiplet-analysis": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/multiplet-analysis/-/multiplet-analysis-3.0.2.tgz", @@ -1218,20 +1262,20 @@ "license": "MIT" }, "node_modules/nmr-correlation": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/nmr-correlation/-/nmr-correlation-2.3.5.tgz", - "integrity": "sha512-WmJXckcF+epK0u2DVv+LBahvtlbFiCbTtXQsYmq07fze6i6XLPHnFcE1q6HKtiYYbePd6ks2PMOmWQEDdU2XbA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/nmr-correlation/-/nmr-correlation-3.0.2.tgz", + "integrity": "sha512-0nEUMNIENB+l9C+gERvefWg4grByUVzwVnOl9RGcLNKDnfsvbLDm44ejkMG/Vw2Lp4+i04WJRZThhX/L1UHaqg==", "license": "MIT", "dependencies": { - "cheminfo-types": "^1.8.1", - "ml-matrix-peaks-finder": "^1.0.0", - "ml-peak-shape-generator": "^4.1.4" + "cheminfo-types": "^1.15.0", + "ml-matrix-peaks-finder": "^2.0.0", + "ml-peak-shape-generator": "^5.2.0" } }, "node_modules/nmr-processing": { - "version": "22.23.0", - "resolved": "https://registry.npmjs.org/nmr-processing/-/nmr-processing-22.23.0.tgz", - "integrity": "sha512-DNmi9ybVqnNDTGp8UlJx4ZLqACuynz4AlBVhzi3M4Vp2jy7K7C2wbJRVuBMH5rI3ZkZBHe11nm+JWW56Qtvrpw==", + "version": "22.23.6", + "resolved": "https://registry.npmjs.org/nmr-processing/-/nmr-processing-22.23.6.tgz", + "integrity": "sha512-Psz5P8ZFR4m6szehlvRRqVPxemV5XD6KW+AVKC1DleC7xnyVdivLR+L+4IyoxzWI6709OyjYdXBndHfpoeG2Sw==", "license": "CC-BY-NC-SA-4.0", "dependencies": { "binary-search": "^1.3.6", @@ -1261,61 +1305,12 @@ "ml-spectra-processing": "^14.33.0", "ml-tree-set": "^1.0.1", "multiplet-analysis": "^3.0.2", - "nmr-correlation": "^3.0.0", "numeral": "^2.0.6", "openchemlib": "^9.24.0", "openchemlib-utils": "^8.17.1", "spectrum-generator": "^8.2.1" } }, - "node_modules/nmr-processing/node_modules/ml-matrix-convolution": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ml-matrix-convolution/-/ml-matrix-convolution-2.0.0.tgz", - "integrity": "sha512-XuEZf4ZTffAz7oDMG4olkh9aZmsIMr343gPTY+ZvnLWTlMiG+TegRbP4fpA1ju7/IK9q8u3TcC2cxf/N3ydtRA==", - "license": "MIT", - "dependencies": { - "ml-fft": "^1.3.5" - } - }, - "node_modules/nmr-processing/node_modules/ml-matrix-peaks-finder": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/ml-matrix-peaks-finder/-/ml-matrix-peaks-finder-2.0.1.tgz", - "integrity": "sha512-PSMwStdTMtnLAhnKlFuKU0PCeQhSZxyNuKPx/t9qQ2N/00+ZkQRoY/+pGlJSG3V7BG5Rz8xz90tyYDno7FDlhw==", - "license": "MIT", - "dependencies": { - "ml-disjoint-set": "^1.0.0", - "ml-matrix-convolution": "^2.0.0" - } - }, - "node_modules/nmr-processing/node_modules/ml-peak-shape-generator": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/ml-peak-shape-generator/-/ml-peak-shape-generator-5.5.0.tgz", - "integrity": "sha512-DyBq/u5S+/0F49Hm0OWHwWvPPM1aaCZIs/eI7/fUTWfIm86Yu03YXWMQ3874eq33MLZVgM8KguGkfeGDffCLog==", - "license": "MIT", - "dependencies": { - "cheminfo-types": "^1.15.0" - } - }, - "node_modules/nmr-processing/node_modules/nmr-correlation": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/nmr-correlation/-/nmr-correlation-3.0.1.tgz", - "integrity": "sha512-0iuce3dLBpdcHn0Q/SX3gHvshRCUyN8X6iL6Y97VcK7JS3g8yZSQCIKjft8jsAOUzWP1rX8c1aCxw3BnCjrBEQ==", - "license": "MIT", - "dependencies": { - "cheminfo-types": "^1.8.1", - "ml-matrix-peaks-finder": "^2.0.0", - "ml-peak-shape-generator": "^4.2.0" - } - }, - "node_modules/nmr-processing/node_modules/nmr-correlation/node_modules/ml-peak-shape-generator": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/ml-peak-shape-generator/-/ml-peak-shape-generator-4.2.0.tgz", - "integrity": "sha512-BDtR0rhUor5/4J9pJOEMRnD+QQ5v6ohx+o6MfRRg2e2IOTeZfp/uJcy5Y852v5CsNec1GmYMkd5PYrY0245qlQ==", - "license": "MIT", - "dependencies": { - "cheminfo-types": "^1.1.0" - } - }, "node_modules/num-sort": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/num-sort/-/num-sort-2.1.0.tgz", @@ -1341,7 +1336,8 @@ "version": "9.25.0", "resolved": "https://registry.npmjs.org/openchemlib/-/openchemlib-9.25.0.tgz", "integrity": "sha512-FGTaZLJRTGXNC7khx8QvX/EiQBHpH1ncUbT7YXDJhw/Y/aDUKe5WrUIqTguMEtSs3GUHcRUjNUhfkpxulx2UXw==", - "license": "BSD-3-Clause" + "license": "BSD-3-Clause", + "peer": true }, "node_modules/openchemlib-utils": { "version": "8.18.0", @@ -1361,62 +1357,55 @@ "openchemlib": ">=9.25.0" } }, - "node_modules/openchemlib-utils/node_modules/sdf-parser": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/sdf-parser/-/sdf-parser-9.0.0.tgz", - "integrity": "sha512-yi69gjBudryiKrLsT35OkyoGmskvXbVpUjkcd9tX4M4sLVmqeptsZtcx6Etf/bvdk9Ts1Wy6PuyXVIPktn6ZNQ==", - "license": "MIT", - "dependencies": { - "dynamic-typing": "^2.0.0", - "ensure-string": "^2.0.0" - } - }, "node_modules/papaparse": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/papaparse/-/papaparse-5.6.0.tgz", - "integrity": "sha512-N2vuNQAYGK1/4vs6HJX86+VYU6OkiSTgdJz3JQfTk1y51cFCO/U8gnaeTF4iNE4r57Tt0sV47dUua1/19pxO6Q==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/papaparse/-/papaparse-5.7.0.tgz", + "integrity": "sha512-qBGxg/7Q3Kl9Wfhrz2Z74UnvnHTXLNG6jmKJFeBvP2+y4lV7So+7SR62+Zd47JvdrCkX+nDcnr0ObPzek/+6RA==", "license": "MIT" }, "node_modules/playwright": { - "version": "1.58.2", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.58.2.tgz", - "integrity": "sha512-vA30H8Nvkq/cPBnNw4Q8TWz1EJyqgpuinBcHET0YVJVFldr8JDNiU9LaWAE1KqSkRYazuaBhTpB5ZzShOezQ6A==", + "version": "1.62.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.62.1.tgz", + "integrity": "sha512-0M+L3LAD8/nm554LOla9Ayx0j0tmFZ0FBcoQ7F1VuVHpM/XpiC8RcDzBQB8W5+hA8L22THxELzeF+2WcUzvcLg==", "license": "Apache-2.0", "dependencies": { - "playwright-core": "1.58.2" + "playwright-core": "1.62.1" }, "bin": { "playwright": "cli.js" }, "engines": { - "node": ">=18" + "node": ">=20" }, "optionalDependencies": { "fsevents": "2.3.2" } }, "node_modules/playwright-core": { - "version": "1.58.2", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.58.2.tgz", - "integrity": "sha512-yZkEtftgwS8CsfYo7nm0KE8jsvm6i/PTgVtB8DL726wNf6H2IMsDuxCpJj59KDaxCtSnrWan2AeDqM7JBaultg==", + "version": "1.62.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.62.1.tgz", + "integrity": "sha512-wPYSwEBJY9GHraISXqyqtx0na0LpO3XEX7jNDhntbex7tzUS7kLnZsOlFruFJB4Hi/rhDMjXGqHewDZ68nYZVw==", "license": "Apache-2.0", "bin": { "playwright-core": "cli.js" }, "engines": { - "node": ">=18" + "node": ">=20" } }, "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", - "license": "MIT" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz", + "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==", + "license": "MIT", + "engines": { + "node": ">=10" + } }, "node_modules/sdf-parser": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/sdf-parser/-/sdf-parser-8.0.0.tgz", - "integrity": "sha512-Mh+FbnUGfu+I7/xN0JOiuQ9GP3H36USFXg3ZpeuUMXpGmYHmzmv763poF1u152Xz76nmqRLTL2ibA4dfU0yzjw==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/sdf-parser/-/sdf-parser-9.0.0.tgz", + "integrity": "sha512-yi69gjBudryiKrLsT35OkyoGmskvXbVpUjkcd9tX4M4sLVmqeptsZtcx6Etf/bvdk9Ts1Wy6PuyXVIPktn6ZNQ==", "license": "MIT", "dependencies": { "dynamic-typing": "^2.0.0", @@ -1433,15 +1422,6 @@ "ml-spectra-processing": "^14.28.1" } }, - "node_modules/spectrum-generator/node_modules/ml-peak-shape-generator": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/ml-peak-shape-generator/-/ml-peak-shape-generator-5.5.0.tgz", - "integrity": "sha512-DyBq/u5S+/0F49Hm0OWHwWvPPM1aaCZIs/eI7/fUTWfIm86Yu03YXWMQ3874eq33MLZVgM8KguGkfeGDffCLog==", - "license": "MIT", - "dependencies": { - "cheminfo-types": "^1.15.0" - } - }, "node_modules/string-width": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", @@ -1530,6 +1510,7 @@ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -1545,9 +1526,9 @@ "license": "MIT" }, "node_modules/undici-types": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz", - "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.3.0.tgz", + "integrity": "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==", "dev": true, "license": "MIT" }, @@ -1585,15 +1566,15 @@ } }, "node_modules/yargs": { - "version": "18.0.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.0.0.tgz", - "integrity": "sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==", + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.1.0.tgz", + "integrity": "sha512-2rAgRKu54VsHkqI0/tYkmluGXHD4KW7yZoycuqDQ15QOTnc2VVfy0nN/1eMhnQLO00A+dwtK20xuCnc1YGeUyg==", "license": "MIT", "dependencies": { "cliui": "^9.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", - "string-width": "^7.2.0", + "string-width": "^8.2.1", "y18n": "^5.0.5", "yargs-parser": "^22.0.0" }, @@ -1610,6 +1591,22 @@ "node": "^20.19.0 || ^22.12.0 || >=23" } }, + "node_modules/yargs/node_modules/string-width": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.2.2.tgz", + "integrity": "sha512-GaPUh5gfdrYzqeVNZvUfT23vYYxXzKYidUcnMtJg/3rxRV63EFZy3k6xfKlmfeJD0176lnUV/Usr3XcwSvFzpg==", + "license": "MIT", + "dependencies": { + "get-east-asian-width": "^1.5.0", + "strip-ansi": "^7.1.2" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/yn": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", @@ -1625,6 +1622,7 @@ "resolved": "https://registry.npmjs.org/zod/-/zod-4.4.3.tgz", "integrity": "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==", "license": "MIT", + "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } diff --git a/app/scripts/nmr-cli/package.json b/app/scripts/nmr-cli/package.json index 0d3bd4d..9180a20 100644 --- a/app/scripts/nmr-cli/package.json +++ b/app/scripts/nmr-cli/package.json @@ -15,24 +15,25 @@ "nmr-cli": "./build/index.js" }, "dependencies": { - "@zakodium/nmr-types": "^0.5.12", - "@zakodium/nmrium-core": "0.7.30", - "@zakodium/nmrium-core-plugins": "0.7.39", - "axios": "^1.13.6", + "@zakodium/nmr-types": "^0.5.26", + "@zakodium/nmrium-core": "0.7.65", + "@zakodium/nmrium-core-plugins": "0.7.87", + "axios": "^1.19.0", "fifo-logger": "^2.0.1", - "file-collection": "^6.6.1", - "json-stream-stringify": "^3.1.6", + "file-collection": "^6.7.0", + "json-stream-stringify": "^3.1.7", "lodash.merge": "^4.6.2", - "mf-parser": "^3.7.1", - "ml-spectra-processing": "^14.22.0", - "nmr-processing": "^22.5.2", - "openchemlib": "^9.20.0", - "playwright": "1.58.2", - "yargs": "^18.0.0" + "mf-parser": "^3.9.2", + "ml-spectra-processing": "^14.34.0", + "nmr-correlation": "^3.0.2", + "nmr-processing": "^22.23.6", + "openchemlib": "^9.25.0", + "playwright": "1.62.1", + "yargs": "^18.1.0" }, "devDependencies": { "@types/lodash.merge": "^4.6.9", - "@types/node": "^25.3.5", + "@types/node": "^26.2.0", "@types/yargs": "^17.0.35", "ts-node": "^10.9.2", "typescript": "^5.9.3" diff --git a/app/scripts/nmr-cli/src/correlation.ts b/app/scripts/nmr-cli/src/correlation.ts new file mode 100644 index 0000000..0c8382b --- /dev/null +++ b/app/scripts/nmr-cli/src/correlation.ts @@ -0,0 +1,115 @@ +import { buildCorrelationData } from 'nmr-correlation' +import type { Options as CorrelationOptions, Spectra } from 'nmr-correlation' +import { FifoLogger } from 'fifo-logger' +import type { NmriumState, Spectrum } from '@zakodium/nmrium-core' +import { + buildWebSource, + core, + loadFileCollection, + parsingOptions, + processSpectra, +} from './parse/prase-spectra' +import { isSpectrum2D } from './parse/data/data2d/isSpectrum2D' + +// Default tolerances confirmed by vcnainala on issue #66 +const DEFAULT_TOLERANCE_H = 0.02 +const DEFAULT_TOLERANCE_C = 0.25 + +export interface CorrelationInput { + url?: string + dir?: string + mf: string + toleranceH?: number + toleranceC?: number +} + +interface ReadSpectraOptions { + url?: string + dir?: string +} + +async function readSpectra( + options: ReadSpectraOptions, + logger: FifoLogger +): Promise