Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
4900890
Migrate development workflow to uv lockfile
wmcv Aug 4, 2026
c1f8601
Merge branch 'master' into issue-2015-dev-workflow
liopeer Aug 5, 2026
364261d
Merge branch 'master' into issue-2015-dev-workflow
liopeer Aug 6, 2026
cba91dd
Address dependency workflow review feedback
wmcv Aug 6, 2026
4937100
update lockfile
liopeer Aug 7, 2026
85be3fe
pin python version for extras-no-video
liopeer Aug 7, 2026
81ec3cf
Merge branch 'master' into issue-2015-dev-workflow
liopeer Aug 10, 2026
fcc6c8a
rework the make targets and workflows
liopeer Aug 10, 2026
a1fa5c4
move to v9.0.0 instead of v9 for astral uv setup
liopeer Aug 10, 2026
adecc85
lower bounds for dependency groups
liopeer Aug 10, 2026
5b7b75f
fix: raise minimal setuptools floor to 56 for py3.8 test collection
gabrielfruet Aug 28, 2026
7ff65b9
Merge branch 'master' into issue-2015-dev-workflow
gabrielfruet Aug 28, 2026
8c35e07
fix: floor numpy to 1.21 in minimal group for numpy.typing.NDArray
gabrielfruet Aug 28, 2026
b7eb847
fix: drop removed lightly-download from test-cli smoke test
gabrielfruet Aug 28, 2026
760361e
fix: cap minimal setuptools at <59.6 for torch 1.10 distutils.version
gabrielfruet Aug 28, 2026
c052116
fix: run lock-check before install-maximal so CI catches a stale lock
gabrielfruet Aug 28, 2026
eafd904
chore: drop dead API-only targets and fix stale dev-workflow docs
gabrielfruet Aug 28, 2026
0507b57
build: skip PyAV system deps outside CI and run mypy hook via uv
gabrielfruet Aug 31, 2026
1a88007
ci: run tests and type-check on 3.8/3.12, drop dead server env
gabrielfruet Aug 31, 2026
ef0ed67
build: drop redundant av python marker and refine dep comments
gabrielfruet Aug 31, 2026
aa00fa7
ci: run maximal test and type-check on 3.12 only
gabrielfruet Aug 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 13 additions & 20 deletions .github/workflows/check_example_nbs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,24 @@ on:
- "examples/**/*.py"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
convert-to-nbs:
name: "Check Example Notebooks"
runs-on: ubuntu-22.04
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set Up Python
uses: actions/setup-python@v5
uses: actions/checkout@v6
- name: Set Up uv
uses: astral-sh/setup-uv@v9.0.0
with:
python-version: 3.7
version: 0.12.3
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set Up Environment
run: |
make install-uv reset-venv
source .venv/bin/activate
make install-pinned-notebook
- name: Convert using Script
run: |
source .venv/bin/activate
make generate-example-notebooks
- name: Check for diff
run: |
source .venv/bin/activate
git add examples/notebooks/
if ! git diff --cached --exit-code; then
echo "Notebooks have changed! Please run 'make generate-example-notebooks' and commit the changes."
exit 1
fi
run: make install-notebook
- name: Check Notebooks Are Up To Date
run: make test-notebooks
25 changes: 16 additions & 9 deletions .github/workflows/release_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Checkout latest release tag
Expand All @@ -21,18 +21,25 @@ jobs:
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
git checkout $LATEST_TAG
echo "tag_name=$LATEST_TAG" >> $GITHUB_OUTPUT;
- name: Set up Python 3.12
uses: actions/setup-python@v5
- name: Set Up uv
uses: astral-sh/setup-uv@v9.0.0
with:
python-version: "3.12"
version: 0.12.3
enable-cache: true
cache-dependency-glob: "uv.lock"
# This job builds the release tag that was checked out above, not the default
# branch, so it deliberately avoids `make` targets and dependency groups: those
# only exist in the tag's own Makefile/pyproject.toml. `uv build` needs nothing
# but [build-system], and `uvx` installs twine into a throwaway environment.
- name: Build and release
id: build_and_release
env:
TWINE_USERNAME: ${{ secrets.PYPI_USER_NAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
pip3 install wheel
pip3 install twine
pip3 install build
make dist
twine upload -u ${{ secrets.PYPI_USER_NAME }} -p ${{ secrets.PYPI_PASSWORD }} dist/*
uv build
Comment thread
gabrielfruet marked this conversation as resolved.
ls -l dist
uvx twine upload dist/*
- name: Convert success/failure strings to emojis
id: emoji_status
run: |
Expand Down
79 changes: 28 additions & 51 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,22 @@ on:
merge_group:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
LIGHTLY_SERVER_LOCATION: "localhost:-1"

jobs:
detect-code-changes:
name: Detect Code Changes
runs-on: ubuntu-22.04
outputs:
run-tests: ${{ steps.filter.outputs.run-tests }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
- uses: actions/checkout@v6
- uses: dorny/paths-filter@v4
id: filter
with:
list-files: shell
Expand All @@ -31,39 +38,19 @@ jobs:
needs: detect-code-changes
if: needs.detect-code-changes.outputs.run-tests == 'true'
runs-on: ubuntu-22.04
strategy:
matrix:
python: ["3.7", "3.12"]

steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Hack to get setup-python to work on nektos/act
run: |
if [ ! -f "/etc/lsb-release" ] ; then
echo "DISTRIB_RELEASE=18.04" > /etc/lsb-release
fi
- name: Set Up Python
uses: actions/setup-python@v5
uses: actions/checkout@v6
- name: Set Up uv
uses: astral-sh/setup-uv@v9.0.0
with:
python-version: ${{ matrix.python }}
version: 0.12.3
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set Up Environment
run: |
make install-uv reset-venv
source .venv/bin/activate
make install-pinned-extras-${{ matrix.python }}
- name: Run Pytest (Python 3.7)
if: matrix.python == '3.7'
run: |
source .venv/bin/activate
export LIGHTLY_SERVER_LOCATION="localhost:-1"
python -m pytest -s -v --runslow --ignore=./lightly/openapi_generated/
- name: Run Pytest (Python 3.12)
if: matrix.python == '3.12'
run: |
source .venv/bin/activate
export LIGHTLY_SERVER_LOCATION="localhost:-1"
python -m pytest -s -v --runslow --ignore=./lightly/openapi_generated/
run: make install-maximal-extras
- name: Run Pytest
run: make test-maximal-extras

distributed-tests:
name: Distributed Tests
Expand All @@ -72,26 +59,16 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Hack to get setup-python to work on nektos/act
run: |
if [ ! -f "/etc/lsb-release" ] ; then
echo "DISTRIB_RELEASE=18.04" > /etc/lsb-release
fi
- name: Set Up Python
uses: actions/setup-python@v5
uses: actions/checkout@v6
- name: Set Up uv
uses: astral-sh/setup-uv@v9.0.0
with:
python-version: "3.12"
version: 0.12.3
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set Up Environment
run: |
make install-uv reset-venv
source .venv/bin/activate
make install-pinned-extras-3.12
# Run the @pytest.mark.DDP tests on the shared gloo pool (real multi-rank
# collective, not mocked). USE_PYTEST_POOL enables it; off by default. See #1982.
run: make install-maximal-extras
# Runs the @pytest.mark.DDP tests on the shared gloo pool (real multi-rank
# collective, not mocked). See #1982.
- name: Run Distributed Tests (gloo pool)
run: |
source .venv/bin/activate
export LIGHTLY_SERVER_LOCATION="localhost:-1"
export USE_PYTEST_POOL=1
python -m pytest -s -v --runslow -m DDP --ignore=./lightly/openapi_generated/
run: make test-distributed
34 changes: 17 additions & 17 deletions .github/workflows/test_api_deps_only.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Install API Dependencies Only

on:
Expand All @@ -9,15 +8,22 @@ on:
merge_group:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
LIGHTLY_SERVER_LOCATION: "localhost:-1"

jobs:
detect-code-changes:
name: Detect Code Changes
runs-on: ubuntu-22.04
outputs:
run-tests: ${{ steps.filter.outputs.run-tests }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
- uses: actions/checkout@v6
- uses: dorny/paths-filter@v4
id: filter
with:
list-files: shell
Expand All @@ -32,22 +38,16 @@ jobs:
needs: detect-code-changes
if: needs.detect-code-changes.outputs.run-tests == 'true'
runs-on: ubuntu-22.04

steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set Up Python
uses: actions/setup-python@v5
uses: actions/checkout@v6
- name: Set Up uv
uses: astral-sh/setup-uv@v9.0.0
with:
python-version: "3.12"
version: 0.12.3
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set Up Environment
run: |
make install-uv reset-venv
source .venv/bin/activate
make install-api-only
run: make install-api-only
- name: Test API Client
run: |
source .venv/bin/activate
# Test if ApiWorkflowClient can be created.
export LIGHTLY_SERVER_LOCATION="localhost:-1"
python -c "from lightly.api import ApiWorkflowClient; ApiWorkflowClient(token='abc')"
run: make test-api-only
39 changes: 17 additions & 22 deletions .github/workflows/test_code_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,30 @@ on:
merge_group:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Check
runs-on: ubuntu-22.04
strategy:
matrix:
python: ["3.7", "3.12"]
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Hack to get setup-python to work on nektos/act
run: |
if [ ! -f "/etc/lsb-release" ] ; then
echo "DISTRIB_RELEASE=18.04" > /etc/lsb-release
fi
- name: Set Up Python
uses: actions/setup-python@v5
uses: actions/checkout@v6
- name: Set Up uv
uses: astral-sh/setup-uv@v9.0.0
with:
python-version: ${{ matrix.python }}
version: 0.12.3
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set Up Environment
run: |
make install-uv reset-venv
source .venv/bin/activate
make install-pinned-extras
run: make install-maximal
# ruff and mypy are version-pinned in the dev dependency group, so their results do
# not depend on the Python version. Checking a single environment is enough.
- name: Check Lockfile
run: make lock-check
- name: Run Format Check
run: |
source .venv/bin/activate
make format-check
run: make format-check
- name: Run Type Check
run: |
source .venv/bin/activate
make type-check
run: make type-check
36 changes: 19 additions & 17 deletions .github/workflows/test_minimal_deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,22 @@ on:
merge_group:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
LIGHTLY_SERVER_LOCATION: "localhost:-1"

jobs:
detect-code-changes:
name: Detect Code Changes
runs-on: ubuntu-22.04
outputs:
run-tests: ${{ steps.filter.outputs.run-tests }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
- uses: actions/checkout@v6
- uses: dorny/paths-filter@v4
id: filter
with:
list-files: shell
Expand All @@ -33,23 +40,18 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
python: ["3.7"]
# Tests the lowest supported dependency versions on the lowest supported
# Python version. uv provisions the interpreter, so no setup-python needed.
dependencies: ["minimal", "minimal-extras"]
steps:
- uses: actions/checkout@v4
- name: Set Up Python
uses: actions/setup-python@v5
- uses: actions/checkout@v6
- name: Set Up uv
uses: astral-sh/setup-uv@v9.0.0
with:
python-version: ${{ matrix.python }}
version: 0.12.3
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set Up Environment
run: |
# Install system dependencies required by PyAV on CI.
make install-av-system-deps
make install-uv reset-venv
source .venv/bin/activate
make install-${{ matrix.dependencies }}
run: make install-${{ matrix.dependencies }}
- name: Run Tests
run: |
source .venv/bin/activate
export LIGHTLY_SERVER_LOCATION="localhost:-1"
python -m pytest -s -v --runslow
run: make test-${{ matrix.dependencies }}
Loading
Loading