diff --git a/.github/actions/test_tutorials/action.yml b/.github/actions/test_tutorials/action.yml index 0f65e059..c18b0f59 100644 --- a/.github/actions/test_tutorials/action.yml +++ b/.github/actions/test_tutorials/action.yml @@ -8,27 +8,26 @@ runs: using: "composite" steps: ### Setup prerequisites + - name: Set up uv + shell: bash + # Install a specific uv version using the installer + run: curl -LsSf https://astral.sh/uv/0.4.0/install.sh | sh + - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: ${{ inputs.python-version }} + shell: bash + run: uv python install # Installing - name: Install dependencies shell: bash run: | - pip install invoke - inv install + make install ### Run tests - - name: Install jupyter - shell: bash - run: | - pip install jupyter - name: Compile notebooks and check for errors shell: bash run: | - inv test-tutorials + make test-tutorials for notebook in tutorials/*.ipynb; do if grep -q "\"cell_type\": \"error\"" $notebook; then echo "Error cell found in $notebook" diff --git a/.github/workflows/static_type_checks.yml b/.github/workflows/static_type_checks.yml index 94d3e281..46a3d774 100644 --- a/.github/workflows/static_type_checks.yml +++ b/.github/workflows/static_type_checks.yml @@ -18,7 +18,8 @@ jobs: uses: actions/checkout@v4 - name: Create github hosts file - run: | # If this file is not created, the dev container fails because of non-existent mount + run: + | # If this file is not created, the dev container fails because of non-existent mount mkdir -p ~/.config/gh touch ~/.config/gh/hosts.yml @@ -26,4 +27,4 @@ jobs: uses: devcontainers/ci@v0.3 with: runCmd: | - inv types \ No newline at end of file + make types diff --git a/Makefile b/Makefile index e9f93efc..08b37f2b 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,9 @@ test-tutorials: types: uv run pyright src +install: + uv sync --all-extras + lint: uv run pre-commit run --all-files