Skip to content

Print seed diagnostics in random-seed tests #93

Print seed diagnostics in random-seed tests

Print seed diagnostics in random-seed tests #93

Workflow file for this run

name: CI
on:
push:
branches: [ "**" ]
pull_request:
branches: [ "**" ]
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- 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 -r kll_sketch/requirements-test.txt
- name: Run tests with coverage
run: python -m pytest --cov=kll_sketch --cov-report=term-missing --cov-report=xml kll_sketch/tests
- name: Upload coverage reports to Codecov
if: matrix.os == 'ubuntu-latest' && matrix['python-version'] == '3.11'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
bench:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install bench extras
run: |
python -m pip install --upgrade pip
python -m pip install -e './kll_sketch[bench]'
- name: Run smoke benchmark
working-directory: ${{ github.workspace }}
run: |
python benchmarks/bench_kll.py \
--outdir bench_out \
--Ns 1e5 \
--capacities 200 \
--distributions normal \
--qs 0.25 0.5 0.75 \
--shards 4
- name: Validate benchmark thresholds
run: python benchmarks/validate_benchmarks.py bench_out --summary bench_summary.md
- name: Upload benchmark summary
uses: actions/upload-artifact@v4
with:
name: bench-validation-summary
path: bench_out/bench_summary.md
- name: Upload benchmark artifacts
uses: actions/upload-artifact@v4
with:
name: bench-out
path: bench_out
offline-install:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- name: Create isolated virtual environment
run: |
python -m venv .venv
. .venv/bin/activate
python -m pip list
- name: Install from source with no index
env:
PIP_NO_INDEX: "1"
run: |
. .venv/bin/activate
python -m pip install --no-index .
- name: Smoke test the offline install
run: |
. .venv/bin/activate
python - <<'PY'
from kll_sketch import KLL

Check failure on line 84 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

You have an error in your yaml syntax on line 84
sketch = KLL(capacity=128)
sketch.extend(range(10_000))
assert abs(sketch.quantile(0.5) - 4_999.5) < 10
print("offline smoke test passed")
PY