diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ff78f20a..0bfcaaaa 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -278,20 +278,17 @@ jobs: linkcheck-docs: runs-on: ubuntu-latest - env: - NO_RYE: 1 steps: - name: Checkout repository uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - name: Setup Rye + uses: eifinger/setup-rye@v4 with: - python-version: '3.11' - cache: pip - cache-dependency-path: requirements-dev.lock + enable-cache: true - name: Install dependencies - run: pip install -r requirements-dev.lock + run: rye sync - name: Install Just uses: taiki-e/install-action@just diff --git a/docs/justfile b/docs/justfile index d3491be5..604a1d53 100644 --- a/docs/justfile +++ b/docs/justfile @@ -1,6 +1,3 @@ -# Run Python commands inside environment -env-run := if env("NO_RYE", "") == "1" { "" } else { "rye run" } - # Default command (list all commands) default: @just --list @@ -12,11 +9,11 @@ clean: # Build docs build builder="html" *OPTIONS="-W --keep-going": - {{env-run}} sphinx-build -M {{builder}} source build {{OPTIONS}} + rye run sphinx-build -M {{builder}} source build {{OPTIONS}} # Build docs in "draft" mode draft *ARGS: - NB_OFF="1" just build {{ARGS}} + NB_OFF="1" just build {{ARGS}} # Check links linkcheck *ARGS: (draft "linkcheck" ARGS) diff --git a/justfile b/justfile index d75514c6..6c862cfd 100644 --- a/justfile +++ b/justfile @@ -1,6 +1,3 @@ -# Run Python commands inside environment -env-run := if env("NO_RYE", "") == "1" { "" } else { "rye run" } - # Default command (list all commands) default: @just --list @@ -13,7 +10,7 @@ bench: bench-python bench-rust [group('python')] [group('test')] bench-python *ARGS: - pytest --benchmark-only {{ARGS}} + rye run pytest --benchmark-only {{ARGS}} # Benchmark Rust code [group('rust')] @@ -29,7 +26,7 @@ build *ARGS: # Bump packages version [group('dev')] bump +ARGS="patch": - {{env-run}} bump-my-version {{ARGS}} + rye run bump-my-version {{ARGS}} # Check the code can compile [group('rust')] @@ -51,7 +48,7 @@ install: # Run code linters and formatters [group('dev')] lint: - {{env-run}} pre-commit run --all-files + rye pre-commit run --all-files alias fmt := lint @@ -63,7 +60,7 @@ test: test-python test-rust [group('python')] [group('test')] test-python *ARGS: - {{env-run}} pytest {{ARGS}} + rye pytest {{ARGS}} # Test Rust code [group('rust')]