Skip to content

Remove PY2 and PY3 #1018

Remove PY2 and PY3

Remove PY2 and PY3 #1018

Workflow file for this run

name: ci
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
python-version: ['3.9']
PYTEST_QT_API: [pyqt5]
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up Python
shell: bash -l {0}
run: |
which python
python --version
pip --version
- name: Install dependencies
shell: bash -l {0}
run: |
pip install -r requirements-dev.txt
- name: Install main
shell: bash -l {0}
run: |
pip install .
- name: Run ruff
shell: bash -l {0}
if: matrix.os != 'windows-latest'
run: |
ruff format --check
ruff check
- name: Test with pytest
shell: bash -l {0}
if: matrix.os == 'ubuntu-latest'
env:
PYTEST_QT_API: ${{ matrix.PYTEST_QT_API }}
MPLBACKEND: 'agg'
run: |
sudo apt-get update
sudo apt-get install -y xvfb libqt5widgets5
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
export DISPLAY=:99
pytest tests
- name: Run examples
shell: bash -l {0}
if: matrix.os != 'windows-latest'
env:
MPLBACKEND: agg
run: |
labelme --help
labelme --version
(cd examples/primitives && labelme_json_to_dataset primitives.json && rm -rf primitives_json)
(cd examples/tutorial && rm -rf apc2016_obj3_json && labelme_json_to_dataset apc2016_obj3.json && python load_label_png.py && git checkout -- .)
(cd examples/semantic_segmentation && rm -rf data_dataset_voc && ./labelme2voc.py data_annotated data_dataset_voc --labels labels.txt && git checkout -- .)
(cd examples/instance_segmentation && rm -rf data_dataset_voc && ./labelme2voc.py data_annotated data_dataset_voc --labels labels.txt && git checkout -- .)
(cd examples/video_annotation && rm -rf data_dataset_voc && ./labelme2voc.py data_annotated data_dataset_voc --labels labels.txt && git checkout -- .)
pip install 'lxml<5.0.0' # for bbox_detection/labelme2voc.py
(cd examples/bbox_detection && rm -rf data_dataset_voc && ./labelme2voc.py data_annotated data_dataset_voc --labels labels.txt && git checkout -- .)
pip install cython && pip install pycocotools # for instance_segmentation/labelme2coco.py
(cd examples/instance_segmentation && rm -rf data_dataset_coco && ./labelme2coco.py data_annotated data_dataset_coco --labels labels.txt && git checkout -- .)