Visitar URL original
Move protobuf requirement to pyproject.toml by C-Achard · Pull Request #3235 · DeepLabCut/DeepLabCut · GitHub
Skip to content
Merged
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
Merge branch 'main' into cy/move-protobuf-to-reqs
  • Loading branch information
C-Achard authored Apr 8, 2026
commit b05dd4435826d19e7342251c71debe3816163678
90 changes: 84 additions & 6 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,87 @@ jobs:
- name: Verify ffmpeg/ffprobe available
shell: bash -el {0}
run: |
pip install tensorflow tensorpack==0.11 tf_slim==1.1.0 tf-keras
pip install --no-cache-dir -e .
python examples/testscript_tensorflow_single_animal.py
python examples/testscript_tensorflow_multi_animal.py
python examples/testscript_pytorch_single_animal.py
python examples/testscript_pytorch_multi_animal.py
set -e
ffmpeg -version
ffprobe -version

- name: Run pytest
shell: bash -el {0}
env:
FULL_SUITE: ${{ inputs.full_suite }}
PYTEST_PATHS_JSON: ${{ inputs.pytest_paths_json }}
run: |
python - << 'PY'
import json
import os
import subprocess
import sys

full_suite = os.environ["FULL_SUITE"].lower() == "true"

if full_suite:
cmd = [sys.executable, "-m", "pytest"]
print("Running full pytest suite")
else:
paths = json.loads(os.environ.get("PYTEST_PATHS_JSON", "[]"))
if not paths:
print("No pytest paths selected; skipping pytest.")
raise SystemExit(0)
cmd = [sys.executable, "-m", "pytest", *paths]
print("Running targeted pytest:", " ".join(paths))

raise SystemExit(subprocess.call(cmd))
PY

- name: Run functional scripts
shell: bash -el {0}
env:
FULL_SUITE: ${{ inputs.full_suite }}
FUNCTIONAL_SCRIPTS_JSON: ${{ inputs.functional_scripts_json }}
RUNNER_OS: ${{ runner.os }}
PYTHON_VERSION: ${{ matrix.python-version }}
run: |
python - << 'PY'
import json
import os
import subprocess
import sys

full_suite = os.environ["FULL_SUITE"].lower() == "true"
runner_os = os.environ["RUNNER_OS"]
python_version = os.environ["PYTHON_VERSION"]

if full_suite:
scripts = [
"examples/testscript_tensorflow_single_animal.py",
"examples/testscript_tensorflow_multi_animal.py",
"examples/testscript_pytorch_single_animal.py",
"examples/testscript_pytorch_multi_animal.py",
]
else:
scripts = json.loads(os.environ.get("FUNCTIONAL_SCRIPTS_JSON", "[]"))
if not scripts:
print("No functional scripts selected; skipping functional tests.")
raise SystemExit(0)

# Respect current TensorFlow support expectations on Windows
tf_allowed = not (runner_os == "Windows" and python_version in {"3.11", "3.12"})

filtered = []
for script in scripts:
is_tf = "tensorflow" in script
if is_tf and not tf_allowed:
print(f"Skipping unsupported TensorFlow script on {runner_os} Python {python_version}: {script}")
continue
filtered.append(script)

if not filtered:
print("No functional scripts remain after platform filtering; skipping.")
raise SystemExit(0)

for script in filtered:
print("Running:", script)
rc = subprocess.call([sys.executable, script])
if rc != 0:
raise SystemExit(rc)
PY
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.