Skip to content

[SN-118] Removed model diagnostic notebooks #5102

[SN-118] Removed model diagnostic notebooks

[SN-118] Removed model diagnostic notebooks #5102

Workflow file for this run

name: Labelbox Python SDK
on:
push:
branches: [develop, master]
pull_request:
branches: [develop, master]
jobs:
build:
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
strategy:
matrix:
include:
- python-version: 3.7
prod-key: LABELBOX_API_KEY
staging-key: STAGING_LABELBOX_API_KEY
da-test-key: DA_GCP_LABELBOX_API_KEY
- python-version: 3.8
prod-key: PROD_LABELBOX_API_KEY_2
staging-key: STAGING_LABELBOX_API_KEY_2
da-test-key: DA_GCP_LABELBOX_API_KEY
- python-version: 3.9
prod-key: PROD_LABELBOX_API_KEY_3
staging-key: STAGING_LABELBOX_API_KEY_3
da-test-key: DA_GCP_LABELBOX_API_KEY
- python-version: '3.10'
prod-key: PROD_LABELBOX_API_KEY_4
staging-key: STAGING_LABELBOX_API_KEY_4
da-test-key: DA_GCP_LABELBOX_API_KEY
steps:
- name: Cancel previous workflow
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: set environment for branch
run: |
if [[ "${{github.base_ref}}" == "master" || "${{github.ref}}" == "refs/heads/master" ]]; then
echo "LABELBOX_TEST_ENVIRON=prod" >> $GITHUB_ENV
else
echo "LABELBOX_TEST_ENVIRON=staging" >> $GITHUB_ENV
echo "FIXTURE_PROFILE=true" >> $GITHUB_ENV
fi
- uses: actions/checkout@v4
with:
token: ${{ secrets.ACTIONS_ACCESS_TOKEN }}
ref: ${{ github.head_ref }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: yapf
id: yapf
uses: AlexanderMelde/yapf-action@master
with:
args: --verbose --recursive --parallel --style "google"
- name: dependencies
run: |
sudo apt-get -y update
sudo apt install -y libsm6 \
libxext6 \
ffmpeg \
libfontconfig1 \
libxrender1 \
libgl1-mesa-glx
- name: install labelbox package
run: |
python -m pip install --upgrade pip
python -m pip install .
- name: mypy
run: |
pip install mypy==0.782
mypy -p labelbox --pretty --show-error-codes
- name: Install package and test dependencies
run: |
pip install tox==3.18.1 pytest-snapshot
# TODO: replace tox.ini with what the Makefile does
# to make sure local testing is
# identical to github actions which uses tox.ini
- name: Test with tox
env:
# make sure to tell tox to use these environs in tox.ini
LABELBOX_TEST_API_KEY_PROD: ${{ secrets[matrix.prod-key] }}
LABELBOX_TEST_API_KEY_STAGING: ${{ secrets[matrix.staging-key] }}
DA_GCP_LABELBOX_API_KEY: ${{ secrets[matrix.da-test-key] }}
run: |
tox -e py -- -n 10 -svv --reruns 5 --reruns-delay 8