feat: add IMU data in CAMM as experimental feature #1062
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Python package | |
on: | |
# Runs your workflow when activity on a pull request in the workflow's repository occurs. | |
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request | |
pull_request: | |
# only run on pull requests that target specific branches | |
branches: [main] | |
push: | |
branches: [main] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
platform: ["ubuntu-latest", "macos-latest", "windows-latest"] | |
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
# Optional - x64 or x86 architecture, defaults to x64 | |
# architecture: "x64" | |
runs-on: ${{ matrix.platform }} | |
defaults: | |
run: | |
working-directory: ./main | |
steps: | |
# https://github.com/actions/checkout#Checkout-multiple-repos-side-by-side | |
# pull into mapillary/mapillary_tools/main | |
- uses: actions/checkout@v4 | |
with: | |
path: main | |
# https://github.com/actions/checkout#Checkout-multiple-repos-side-by-side | |
# pull into mapillary/mapillary_tools/exiftool | |
- name: Setup ExifTool | |
uses: actions/checkout@v4 | |
with: | |
repository: "exiftool/exiftool" | |
path: exiftool | |
- name: Check ExifTool version | |
# DO NOT USE envvars here which does not work on Windows (needs prefixing with $env:) | |
# need to rename exiftool to exiftool.pl according to https://exiftool.org/install.html | |
run: | | |
mv ${{ github.workspace }}/exiftool/exiftool ${{ github.workspace }}/exiftool/exiftool.pl | |
perl ${{ github.workspace }}/exiftool/exiftool.pl -ver | |
- name: Setup FFmpeg | |
uses: FedericoCarboni/setup-ffmpeg@v3 | |
# ffmpeg is not supported in the latest macOS arch: | |
# Error: setup-ffmpeg can only be run on 64-bit systems | |
if: matrix.platform != 'macos-latest' | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install . | |
python -m pip install -r requirements-dev.txt | |
- name: Lint with ruff | |
run: | | |
ruff check mapillary_tools | |
- name: Format with ruff | |
run: | | |
ruff format --check mapillary_tools tests | |
- name: Sort imports with usort | |
run: | | |
usort diff mapillary_tools/ | |
- name: Type check with mypy | |
run: | | |
mypy mapillary_tools | |
- name: Test with pytest | |
run: | | |
mapillary_tools --version | |
pytest -s -vv tests | |
env: | |
MAPILLARY_TOOLS__TESTS_EXECUTABLE: mapillary_tools | |
MAPILLARY_TOOLS__TESTS_EXIFTOOL_EXECUTABLE: perl ${{ github.workspace }}/exiftool/exiftool.pl |