Skip to content

readme edit

readme edit #250

Workflow file for this run

name: Detectree2 CI
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
# permissions:
# contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10.6"
- name: Install code development dependencies
run: |
python3 --version
python -m pip install --upgrade pip
pip3 install flake8 pep8-naming pydocstyle pytest isort
pip3 install mypy data-science-types pandas-stubs types-pillow numpy==1.23.1
# if [ -f requirements/requirements.txt ]; then pip install -r requirements/requirements.txt; fi
- name: Install detectree2 dependencies
run: |
sudo apt install -yqq software-properties-common
sudo add-apt-repository -y ppa:ubuntugis/ppa
sudo apt -yqq update
sudo apt install -yqq libgdal-dev gdal-bin python3-pip git python3-opencv
export CPLUS_INCLUDE_PATH=/usr/include/gdal
export C_INCLUDE_PATH=/usr/include/gdal
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu \
opencv-python wandb sphinx
pip3 install wheel cython
pip3 install 'git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI'
pip3 install --no-build-isolation 'git+https://github.com/facebookresearch/detectron2.git'
- name: Install detectree2
run: |
export CPLUS_INCLUDE_PATH=/usr/include/gdal
export C_INCLUDE_PATH=/usr/include/gdal
pip3 install GDAL==3.3.2
pip3 install .
- name: flake8 checks
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 detectree2 --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings.
flake8 detectree2 --count --max-complexity=10 --statistics
- name: pytest checks
run: |
pip install pytest-order
pytest
- name: mypy checks
run: |
mypy detectree2
- name: isort checks
run: |
isort --check detectree2