Skip to content

Commit

Permalink
Fix docs, finish migration to pnpm
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
  • Loading branch information
timkpaine committed Nov 16, 2024
1 parent b705092 commit 4e97642
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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

###########
Expand Down
4 changes: 2 additions & 2 deletions docs/wiki/Build-from-Source.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4e97642

Please sign in to comment.