chore(deps): update pre-commit hook srstevenson/nb-clean to v3.3.0 #7306
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: CI | |
| on: [push] | |
| jobs: | |
| pre-commit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.10" | |
| cache: "pip" | |
| - uses: pre-commit/[email protected] | |
| pylint: | |
| runs-on: ubuntu-latest | |
| name: Pylint test | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: "pip" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - name: Analysing the code with pylint | |
| run: | | |
| pylint --rcfile=.pylintrc src/kili | |
| pyright: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: ["3.10", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.version }} | |
| cache: "pip" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - name: Run pyright | |
| run: pyright src/kili | |
| unit-integration-test: | |
| timeout-minutes: 15 | |
| name: Unit and integration tests | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| python-version: "3.10" | |
| - os: windows-latest | |
| python-version: "3.10" | |
| - os: ubuntu-latest | |
| python-version: "3.12" | |
| - os: ubuntu-latest | |
| python-version: "3.13" | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: "pip" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - name: Unit and integration tests | |
| run: pytest -n auto -ra -sv --color yes --code-highlight yes --durations=15 -vv --ignore tests/e2e/ --cov=src/kili --cov-report=term-missing --cov-config=.coveragerc --cov-fail-under=75 | |
| markdown-link-check: | |
| timeout-minutes: 10 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Convert ipynb to markdown | |
| shell: bash | |
| run: | | |
| pip install --quiet nbconvert | |
| # Find all .ipynb files under recipes/ and subfolders and convert them to .md | |
| find recipes -type f -name '*.ipynb' -print0 | while IFS= read -r -d '' file; do | |
| echo "Converting $file" | |
| jupyter nbconvert --to markdown "$file" | |
| done | |
| - uses: lycheeverse/lychee-action@v2 | |
| with: | |
| args: "-qq --no-progress --insecure --accept 200,201,202,203,204,206,207,208,226,301,302,307,308 --max-redirects 5 './**/*.md'" | |
| build-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.10" | |
| cache: "pip" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install build twine | |
| - name: Build | |
| run: | | |
| python -m build | |
| - name: Test the Build | |
| run: | | |
| python -m pip install . # to install dependencies | |
| python -m pip uninstall -y kili | |
| python -m pip install --find-links=dist --no-index kili | |
| python -c 'from kili.client import Kili; k=Kili(); print("Everything OK!")' | |
| env: | |
| KILI_API_ENDPOINT: https://staging.cloud.kili-technology.com/api/label/v2/graphql | |
| KILI_API_KEY: ${{ secrets.KILI_USER_API_KEY_STAGING }} | |
| doc-build-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.10" | |
| cache: "pip" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - name: Build | |
| run: | | |
| mkdocs build | |
| - name: Look for Warnings | |
| run: | | |
| mkdocs build 2>&1 | tee doc-build.log | |
| if grep -q "WARNING" doc-build.log; then | |
| echo $(grep "WARNING" doc-build.log) | |
| echo "::error::Documentation build completed with warnings" | |
| exit 1 | |
| else | |
| echo "Documentation build completed successfully" | |
| fi |