Skip to content

Migrate Clickhouse and ASAP manual benchmarking folder to new repo #46

Migrate Clickhouse and ASAP manual benchmarking folder to new repo

Migrate Clickhouse and ASAP manual benchmarking folder to new repo #46

Workflow file for this run

name: Python Projects CI
on:
push:
branches: [ main ]
paths:
- 'asap-sketch-ingest/**'
- 'asap-tools/queriers/prometheus-client/**'
- 'asap-planner/**'
- 'asap-tools/**'
- 'asap-tools/data-sources/prometheus-exporters/**'
- 'asap-tools/execution-utilities/**'
- 'asap-common/dependencies/py/**'
- '.github/workflows/python.yml'
pull_request:
branches: [ main ]
paths:
- 'asap-sketch-ingest/**'
- 'asap-tools/queriers/prometheus-client/**'
- 'asap-planner/**'
- 'asap-tools/**'
- 'asap-tools/data-sources/prometheus-exporters/**'
- 'asap-tools/execution-utilities/**'
- 'asap-common/dependencies/py/**'
- '.github/workflows/python.yml'
workflow_dispatch:
permissions:
contents: read
pull-requests: read
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
arroyo_sketch: ${{ steps.filter.outputs.arroyo_sketch }}
prometheus_client: ${{ steps.filter.outputs.prometheus_client }}
controller: ${{ steps.filter.outputs.controller }}
utilities: ${{ steps.filter.outputs.utilities }}
prometheus_exporters: ${{ steps.filter.outputs.prometheus_exporters }}
execution_utilities: ${{ steps.filter.outputs.execution_utilities }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
arroyo_sketch:
- 'asap-sketch-ingest/**'
- 'asap-common/dependencies/py/**'
prometheus_client:
- 'asap-tools/queriers/prometheus-client/**'
- 'asap-common/dependencies/py/**'
controller:
- 'asap-planner/**'
- 'asap-common/dependencies/py/**'
utilities:
- 'asap-tools/**'
- 'asap-common/dependencies/py/**'
prometheus_exporters:
- 'asap-tools/data-sources/prometheus-exporters/**'
- 'asap-common/dependencies/py/**'
execution_utilities:
- 'asap-tools/execution-utilities/**'
- 'asap-common/dependencies/py/**'
test-arroyo-sketch:
needs: detect-changes
if: needs.detect-changes.outputs.arroyo_sketch == 'true'
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black==24.8.0 flake8==6.1.0
if [ -f asap-sketch-ingest/requirements.txt ]; then pip install -r asap-sketch-ingest/requirements.txt; fi
- name: Check formatting with Black
working-directory: asap-sketch-ingest
run: black --check --diff .
- name: Lint with flake8
working-directory: asap-sketch-ingest
run: |
# Stop the build if there are Python syntax errors or undefined names
flake8 . --config=../.flake8 --count --select=E9,F63,F7,F82 --show-source --statistics
# Exit-zero treats all errors as warnings
flake8 . --config=../.flake8 --count --exit-zero --max-complexity=10 --statistics
test-prometheus-client:
needs: detect-changes
if: needs.detect-changes.outputs.prometheus_client == 'true'
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black==24.8.0 flake8==6.1.0 mypy types-requests types-PyYAML typing-extensions numpy prometheus-client urllib3
if [ -f asap-tools/queriers/prometheus-client/requirements.txt ]; then pip install -r asap-tools/queriers/prometheus-client/requirements.txt; fi
- name: Check formatting with Black
working-directory: asap-tools/queriers/prometheus-client
run: black --check --diff .
- name: Lint with flake8
working-directory: asap-tools/queriers/prometheus-client
run: |
# Stop the build if there are Python syntax errors or undefined names
flake8 . --config=../../../.flake8 --count --select=E9,F63,F7,F82 --show-source --statistics
# Exit-zero treats all errors as warnings
flake8 . --config=../../../.flake8 --count --exit-zero --max-complexity=10 --statistics
- name: Type check with mypy
working-directory: asap-tools/queriers/prometheus-client
run: mypy .
test-controller:
needs: detect-changes
if: needs.detect-changes.outputs.controller == 'true'
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black==24.8.0 flake8==6.1.0
if [ -f asap-planner/requirements.txt ]; then pip install -r asap-planner/requirements.txt; fi
- name: Check formatting with Black
working-directory: asap-planner
run: black --check --diff .
- name: Lint with flake8
working-directory: asap-planner
run: |
# Stop the build if there are Python syntax errors or undefined names
flake8 . --config=../.flake8 --count --select=E9,F63,F7,F82 --show-source --statistics
# Exit-zero treats all errors as warnings
flake8 . --config=../.flake8 --count --exit-zero --max-complexity=10 --statistics
test-utilities:
needs: detect-changes
if: needs.detect-changes.outputs.utilities == 'true'
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black==24.8.0 flake8==6.1.0
if [ -f asap-tools/requirements.txt ]; then pip install -r asap-tools/requirements.txt; fi
- name: Check formatting with Black
working-directory: asap-tools
run: black --check --diff .
- name: Lint with flake8
working-directory: asap-tools
run: |
# Stop the build if there are Python syntax errors or undefined names
flake8 . --config=../.flake8 --count --select=E9,F63,F7,F82 --show-source --statistics
# Exit-zero treats all errors as warnings
flake8 . --config=../.flake8 --count --exit-zero --max-complexity=10 --statistics
test-prometheus-exporters:
needs: detect-changes
if: needs.detect-changes.outputs.prometheus_exporters == 'true'
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black==24.8.0 flake8==6.1.0 mypy isort
if [ -f asap-tools/data-sources/prometheus-exporters/requirements.txt ]; then pip install -r asap-tools/data-sources/prometheus-exporters/requirements.txt; fi
- name: Check formatting with Black
working-directory: asap-tools/data-sources/prometheus-exporters
run: black --check --diff .
- name: Check import sorting with isort
working-directory: asap-tools/data-sources/prometheus-exporters
run: isort --check-only --diff --settings-file .isort.cfg .
- name: Lint with flake8
working-directory: asap-tools/data-sources/prometheus-exporters
run: |
# Stop the build if there are Python syntax errors or undefined names
flake8 . --config=../../../.flake8 --count --select=E9,F63,F7,F82 --show-source --statistics
# Exit-zero treats all errors as warnings
flake8 . --config=../../../.flake8 --count --exit-zero --max-complexity=10 --statistics
- name: Type check with mypy
working-directory: asap-tools/data-sources/prometheus-exporters
run: mypy . --config-file=.mypy.ini
test-execution-utilities:
needs: detect-changes
if: needs.detect-changes.outputs.execution_utilities == 'true'
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black==24.8.0 flake8==6.1.0
if [ -f asap-tools/execution-utilities/requirements.txt ]; then pip install -r asap-tools/execution-utilities/requirements.txt; fi
- name: Check formatting with Black
working-directory: asap-tools/execution-utilities
run: black --check --diff .
- name: Lint with flake8
working-directory: asap-tools/execution-utilities
run: |
# Stop the build if there are Python syntax errors or undefined names
flake8 . --config=../../.flake8 --count --select=E9,F63,F7,F82 --show-source --statistics
# Exit-zero treats all errors as warnings
flake8 . --config=../../.flake8 --count --exit-zero --max-complexity=10 --statistics