Skip to content

fix(web_api): temporary cv hack for non aligned writes #2751

fix(web_api): temporary cv hack for non aligned writes

fix(web_api): temporary cv hack for non aligned writes #2751

Workflow file for this run

name: CI Pipeline
on:
pull_request:
type: [ opened, synchronize ]
push:
branches: [ main ]
env:
WANDB_MODE: offline
ZETTA_USER: test
ZETTA_PROJECT: test
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
#SETUPTOOLS_ENABLE_FEATURES: legacy-editable
jobs:
pytest:
strategy:
matrix:
os:
- ubuntu-latest
python-version:
- "3.10"
- "3.11"
runs-on: ${{ matrix.os }}
steps:
- name: Get token from Github App
uses: actions/create-github-app-token@v1
id: app_token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PEM }}
# owner is required, otherwise the creds will fail the checkout step
owner: ${{ github.repository_owner }}
- name: Checkout from GitHub
uses: actions/checkout@v4
with:
lfs: 'false'
submodules: true
ssh-key: ${{ secrets.git_ssh_key }}
token: ${{ steps.app_token.outputs.token }}
- name: Get changed files
id: changed-py-files
uses: tj-actions/changed-files@v41
with:
files: |
**/*.py
- name: Install libboost
if: ${{ steps.changed-py-files.outputs.any_changed == 'true' }}
run: sudo apt install libboost-dev
- name: Setup Python
if: ${{ steps.changed-py-files.outputs.any_changed == 'true' }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
cache: 'pip'
- name: Setup Go
if: ${{ steps.changed-py-files.outputs.any_changed == 'true' }}
uses: actions/setup-go@v4
with:
go-version: '1.18.4'
- name: Install Python dependencies
if: ${{ steps.changed-py-files.outputs.any_changed == 'true' }}
run: pip install -e '.[modules, test]'
- name: Install CUE
if: ${{ steps.changed-py-files.outputs.any_changed == 'true' }}
run: go install cuelang.org/go/cmd/[email protected]
- name: Run pytest
if: ${{ steps.changed-py-files.outputs.any_changed == 'true' }}
run: coverage run -m py.test ./tests/unit
- name: Send coverage repot to codecov
uses: codecov/codecov-action@v3
if: ${{ steps.changed-py-files.outputs.any_changed == 'true' }}
with:
files: /home/runner/work/zetta_utils/zetta_utils/coverage.xml
pylint-isort:
strategy:
matrix:
os:
- ubuntu-latest
python-version:
- "3.10"
- "3.11"
runs-on: ${{ matrix.os }}
steps:
- name: Get token from Github App
uses: actions/create-github-app-token@v1
id: app_token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PEM }}
# owner is required, otherwise the creds will fail the checkout step
owner: ${{ github.repository_owner }}
- name: Checkout from GitHub
uses: actions/checkout@v4
with:
lfs: 'false'
submodules: true
ssh-key: ${{ secrets.git_ssh_key }}
token: ${{ steps.app_token.outputs.token }}
- name: Get changed files
id: changed-py-files
uses: tj-actions/changed-files@v41
with:
files: |
**/*.py
- name: Install libboost
if: ${{ steps.changed-py-files.outputs.any_changed == 'true' }}
run: sudo apt install libboost-dev
- name: Setup Python
if: ${{ steps.changed-py-files.outputs.any_changed == 'true' }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
cache: 'pip'
- name: Install Python dependencies
if: ${{ steps.changed-py-files.outputs.any_changed == 'true' }}
run: pip install -e '.[modules, test]'
- name: Run pylint
if: ${{ steps.changed-py-files.outputs.any_changed == 'true' }}
run: pylint ${{ steps.changed-py-files.outputs.all_changed_files }}
- name: Run isort
if: ${{ steps.changed-py-files.outputs.any_changed == 'true' }}
run: isort --check-only --df --verbose --om --profile black .
mypy:
strategy:
matrix:
os:
- ubuntu-latest
python-version:
- "3.10"
- "3.11"
runs-on: ${{ matrix.os }}
steps:
- name: Get token from Github App
uses: actions/create-github-app-token@v1
id: app_token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PEM }}
# owner is required, otherwise the creds will fail the checkout step
owner: ${{ github.repository_owner }}
- name: Checkout from GitHub
uses: actions/checkout@v4
with:
lfs: 'false'
submodules: true
ssh-key: ${{ secrets.git_ssh_key }}
token: ${{ steps.app_token.outputs.token }}
- name: Get changed files
id: changed-py-files
uses: tj-actions/changed-files@v41
with:
files: |
**/*.py
- name: Install libboost
if: ${{ steps.changed-py-files.outputs.any_changed == 'true' }}
run: sudo apt install libboost-dev
- name: Setup Python
if: ${{ steps.changed-py-files.outputs.any_changed == 'true' }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
cache: 'pip'
- name: Install Python dependencies
if: ${{ steps.changed-py-files.outputs.any_changed == 'true' }}
run: pip install -e '.[modules, test]'
- name: Run mypy
if: ${{ steps.changed-py-files.outputs.any_changed == 'true' }}
run: mypy .
test-docs:
strategy:
matrix:
os:
- ubuntu-latest
python-version:
- "3.11"
runs-on: ${{ matrix.os }}
steps:
- name: Get token from Github App
uses: actions/create-github-app-token@v1
id: app_token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PEM }}
# owner is required, otherwise the creds will fail the checkout step
owner: ${{ github.repository_owner }}
- name: Checkout from GitHub
uses: actions/checkout@v4
with:
lfs: 'false'
submodules: true
ssh-key: ${{ secrets.git_ssh_key }}
token: ${{ steps.app_token.outputs.token }}
- name: Get changed files
id: changed-py-files
uses: tj-actions/changed-files@v41
with:
files: |
**/*.py
- name: Get changed files
id: changed-docs-files
uses: tj-actions/changed-files@v41
with:
files: |
**/*.rst
- name: Install libboost
if: ${{ steps.changed-py-files.outputs.any_changed == 'true' || steps.changed-docs-files.outputs.any_changed == 'true'}}
run: sudo apt install libboost-dev
- name: Setup Python
if: ${{ steps.changed-py-files.outputs.any_changed == 'true' || steps.changed-docs-files.outputs.any_changed == 'true'}}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
cache: 'pip'
- name: Install Python dependencies
if: ${{ steps.changed-py-files.outputs.any_changed == 'true' || steps.changed-docs-files.outputs.any_changed == 'true'}}
run: pip install -e '.[all]'
- name: Doctest
if: ${{ steps.changed-py-files.outputs.any_changed == 'true' || steps.changed-docs-files.outputs.any_changed == 'true'}}
run: make -C docs doctest
- name: Build Docs
if: ${{ steps.changed-py-files.outputs.any_changed == 'true' || steps.changed-docs-files.outputs.any_changed == 'true'}}
run: make -C docs html
all-checks-test:
runs-on: ubuntu-20.04
needs: [mypy, pytest, pylint-isort, test-docs]
if: always()
steps:
- name: Success
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Failure
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1