Skip to content

Commit

Permalink
make runner script work without Python activation; add VS Code tasks …
Browse files Browse the repository at this point in the history
…to execute runner script
  • Loading branch information
apparebit committed Aug 4, 2024
1 parent c4f31ff commit e3e9904
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
19 changes: 19 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"group": "build",
"label": "Build (Rust and Python)",
"type": "shell",
"command": "./rr.sh build"
},
{
"group": "test",
"label": "Test (Rust and Python)",
"type": "shell",
"command": "./rr.sh check"
}
]
}
6 changes: 3 additions & 3 deletions rr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ trace() {
}

run-python-tests() {
python -c '
./.venv/bin/python -c '
import sys
import unittest
from test.runtime import ResultAdapter
Expand All @@ -67,7 +67,7 @@ check() {
trace cargo clippy --all-features
trace cargo test
if [ -d prettypretty ]; then
trace npm run pyright
trace npm run pyright -- --pythonpath ./.venv/bin/python
fi
if [ -d test ]; then
trace run-python-tests
Expand All @@ -87,7 +87,7 @@ docs() {
trace cargo rustdoc --all-features -- -e $(realpath docs/pretty.css)

if [ -d docs ]; then
trace sphinx-build -a -b html docs target/doc/python
trace ./.venv/bin/sphinx-build -a -b html docs target/doc/python
trace rm -rf target/doc/python/.doctrees
fi
}
Expand Down

0 comments on commit e3e9904

Please sign in to comment.