Skip to content

Add time masking

Add time masking #2612

Workflow file for this run

name: CI
on:
pull_request:
branches:
- main
paths-ignore:
- '**.md'
- 'benchmark/**'
jobs:
test_and_lint:
name: Test and lint
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.9, "3.10", "3.11", "3.12"]
include:
- operating-system: ubuntu-latest
path: ~/.cache/pip
- operating-system: windows-latest
path: ~\AppData\Local\pip\Cache
- operating-system: macos-latest
path: ~/Library/Caches/pip
fail-fast: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache Python packages
uses: actions/cache@v4
with:
path: ${{ matrix.path }}
key: ${{ runner.os }}-uv-${{ hashFiles('**/requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-uv-${{ matrix.python-version }}-
${{ runner.os }}-uv-
- name: Install uv
run: python -m pip install --upgrade uv
- name: Install PyTorch
run: |
if [ "${{ matrix.operating-system }}" = "macos-latest" ]; then
uv pip install --system torch==2.4.1 torchvision==0.19.1
else
uv pip install --system torch==2.4.1+cpu torchvision==0.19.1+cpu --extra-index-url https://download.pytorch.org/whl/cpu
fi
shell: bash
- name: Install all dependencies
run: |
uv pip install --system wheel
uv pip install --system -r requirements-dev.txt
uv pip install --system .
- name: Run PyTest
run: pytest --cov . --cov-report=xml
- name: Upload coverage reports to Codecov
if: matrix.operating-system == 'ubuntu-latest' && matrix.python-version == '3.12'
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: albumentations-team/albumentations
check_code_formatting_types:
name: Check code formatting with ruff and mypy
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ["3.9"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install all requirements
run: |
python -m pip install --upgrade uv
uv pip install --system -r requirements-dev.txt
uv pip install --system .
- name: Run checks
run: pre-commit run --files $(find albumentations -type f)
- name: check-defaults-in-apply
run: python -m tools.check_defaults
check_transforms_docs:
name: Check Readme is not outdated
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install all requirements
run: |
python -m pip install --upgrade uv
uv pip install --system requests
uv pip install --system .
- name: Run checks for documentation
run: python -m tools.make_transforms_docs check README.md
- name: Run checks for used by documentation
run: python -m tools.make_used_by_docs check