From 4e97642fa97f8a9a7465d4a65f135bdff1fc8625 Mon Sep 17 00:00:00 2001 From: Tim Paine <3105306+timkpaine@users.noreply.github.com> Date: Fri, 15 Nov 2024 23:49:35 -0500 Subject: [PATCH] Fix docs, finish migration to pnpm Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com> --- .github/workflows/build.yml | 11 +++++++---- Makefile | 10 +++++----- docs/wiki/Build-from-Source.md | 4 ++-- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f2b28b6..2d491fc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,11 +47,14 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - cache: 'yarn' - cache-dependency-path: js/yarn.lock + cache: 'pnpm' + cache-dependency-path: js/pnpm-lock.yaml - - name: Install yarn - run: npm install -g yarn + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + package_json_file: js/package.json - name: Install dependencies run: make develop diff --git a/Makefile b/Makefile index 45f3df7..eebf7d2 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ requirements: ## install prerequisite python build requirements python -m pip install `python -c 'import toml; c = toml.load("pyproject.toml"); print(" ".join(c["project"]["optional-dependencies"]["develop"]))'` develop: ## install to site-packages in editable mode - cd js; yarn + cd js; pnpm install python -m pip install -e .[develop] install: ## install to site-packages @@ -27,7 +27,7 @@ testpy: ## run the python unit tests python -m pytest -v raydar/tests --junitxml=junit.xml --cov=raydar --cov-report=xml:.coverage.xml --cov-branch --cov-fail-under=1 --cov-report term-missing testjs: ## run the javascript unit tests - cd js; yarn test + cd js; pnpm run test test: tests tests: testpy testjs ## run all the unit tests @@ -42,7 +42,7 @@ lintpy: ## lint python with ruff python -m ruff format --check raydar setup.py lintjs: ## lint javascript with eslint - cd js; yarn lint + cd js; pnpm run lint lint: lintpy lintjs ## run all linters @@ -51,7 +51,7 @@ fixpy: ## autoformat python code with isort and ruff python -m ruff format raydar setup.py fixjs: ## autoformat javascript code with eslint - cd js; yarn fix + cd js; pnpm run fix fix: fixpy fixjs ## run all autofixers format: fix @@ -95,7 +95,7 @@ clean: ## clean the repository find . -name ".ipynb_checkpoints" | xargs rm -rf rm -rf .coverage coverage *.xml build dist *.egg-info lib node_modules .pytest_cache *.egg-info rm -rf raydar/dashboard/static - cd js && yarn clean + cd js; pnpm run clean git clean -fd ########### diff --git a/docs/wiki/Build-from-Source.md b/docs/wiki/Build-from-Source.md index bf9f0cf..2cda3b5 100644 --- a/docs/wiki/Build-from-Source.md +++ b/docs/wiki/Build-from-Source.md @@ -42,10 +42,10 @@ cd raydar ## Install NodeJS -Follow the instructions for [installing NodeJS](https://nodejs.org/en/download/package-manager/all) for your system. Once installed, you can [install `yarn`](https://classic.yarnpkg.com/lang/en/docs/install/) with: +Follow the instructions for [installing NodeJS](https://nodejs.org/en/download/package-manager/all) for your system. Once installed, you can [install `pnpm`](https://pnpm.io) with: ```bash -npm instal --global yarn +npm install --global pnpm ``` ## Install Python dependencies