Replace pylint with ruff for repository linting, modernize packaging, and update CI for Python 3.10+ with uv sync #80
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test installation | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| # ----------------------------------------- | |
| # Use a module from local source | |
| # ----------------------------------------- | |
| use_as_local_module: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python-version: ['3.10', '3.11', '3.12'] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install requirements | |
| run: | | |
| pip install --user -U pip | |
| pip install --user -r requirements.txt | |
| - name: Run 'import nbtools' | |
| run: python -c 'import nbtools' | |
| # ----------------------------------------- | |
| # Install with pip | |
| # ----------------------------------------- | |
| install_with_pip: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python-version: ['3.10', '3.11', '3.12'] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install with pip | |
| run: | | |
| pip install --user -U pip | |
| pip install wheel | |
| pip install --user git+https://github.com/${{ github.event.pull_request.head.repo.full_name }}.git@${{ github.head_ref }}#egg=py-nbtools | |
| - name: Run 'import nbtools' | |
| run: python -c 'import nbtools' | |
| # ----------------------------------------- | |
| # Install with uv | |
| # ----------------------------------------- | |
| install_with_uv: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python-version: ['3.10', '3.11', '3.12'] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v2 | |
| - name: Install with uv | |
| run: | | |
| uv venv | |
| uv pip install -e . | |
| - name: Test import with uv | |
| run: | | |
| source .venv/bin/activate || .venv\\Scripts\\activate | |
| python -c 'import nbtools; print("nbtools version:", nbtools.__version__)' | |
| - name: Test console scripts with uv | |
| run: | | |
| source .venv/bin/activate || .venv\\Scripts\\activate | |
| nbstat --help | |
| - name: Test optional dependencies with uv | |
| run: | | |
| uv pip install -e .[dev,nbrun] | |
| source .venv/bin/activate || .venv\\Scripts\\activate | |
| python -c 'import ruff; print("ruff available")' |