diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..f12d030 --- /dev/null +++ b/.vscode/tasks.json @@ -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" + } + ] +} diff --git a/rr.sh b/rr.sh index baf2a2c..a074470 100755 --- a/rr.sh +++ b/rr.sh @@ -44,7 +44,7 @@ trace() { } run-python-tests() { - python -c ' + ./.venv/bin/python -c ' import sys import unittest from test.runtime import ResultAdapter @@ -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 @@ -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 }