Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,27 @@ concurrency:
cancel-in-progress: ${{ github.event_name != 'release' }}

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true

- name: Install dependencies
run: uv sync --all-extras

- name: Run Ruff lint
run: uv run ruff check --select F,E9 .

# Run the test suite with and without the xorq extra. The no-xorq leg
# verifies xorq is truly optional (its tests skip, not error).
test:
Expand Down Expand Up @@ -104,7 +125,7 @@ jobs:
deploy-docs:
name: Deploy Docs
if: github.event_name == 'release'
needs: [test, build]
needs: [lint, test, build]
runs-on: ubuntu-latest
environment:
name: github-pages
Expand All @@ -118,7 +139,7 @@ jobs:
release-pypi:
name: Release to PyPI
if: github.event_name == 'release'
needs: [test, build]
needs: [lint, test, build]
runs-on: ubuntu-latest
environment:
name: release
Expand Down
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: test examples docs-build skills-build skills-check eval eval-full check clean help
.PHONY: test lint examples docs-build skills-build skills-check eval eval-full check clean help

# Default target - show help
.DEFAULT_GOAL := help
Expand All @@ -14,6 +14,7 @@ help:
@echo " make test - Run pytest tests"
@echo " make test IBIS_VERSION=all - Run tests with all ibis versions (9.5.0, 10.8.0, 11.0.0)"
@echo " make test IBIS_VERSION=10.8.0 - Run tests with specific ibis version"
@echo " make lint - Run mandatory Ruff correctness checks"
@echo " make examples - Run all example scripts"
@echo " make examples-core - Run no-xorq-compatible examples"
@echo " make examples IBIS_VERSION=all - Run examples with all ibis versions"
Expand Down Expand Up @@ -57,6 +58,10 @@ else
@uv run pytest
endif

lint:
@echo "Running mandatory Ruff correctness checks..."
uv run ruff check --select F,E9 .

# Run all examples (skip MCP examples as they require special setup)
examples:
ifeq ($(IBIS_VERSION),all)
Expand Down Expand Up @@ -169,6 +174,7 @@ eval-list:
# Run all checks (CI target)
check:
@if [ "$(IBIS_VERSION)" = "all" ]; then \
$(MAKE) lint && \
$(MAKE) test IBIS_VERSION=all && \
$(MAKE) examples IBIS_VERSION=all && \
$(MAKE) skills-check && \
Expand All @@ -178,6 +184,7 @@ check:
echo "Note: Run 'make docs-build' separately to build documentation" && \
echo "========================================"; \
elif [ -n "$(IBIS_VERSION)" ]; then \
$(MAKE) lint && \
$(MAKE) test IBIS_VERSION=$(IBIS_VERSION) && \
$(MAKE) examples IBIS_VERSION=$(IBIS_VERSION) && \
$(MAKE) skills-check && \
Expand All @@ -187,6 +194,7 @@ check:
echo "Note: Run 'make docs-build' separately to build documentation" && \
echo "========================================"; \
else \
$(MAKE) lint && \
$(MAKE) test && \
$(MAKE) examples && \
$(MAKE) docs-build && \
Expand Down
1 change: 0 additions & 1 deletion examples/basic_flights.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

from pathlib import Path

from ibis import _

from boring_semantic_layer import from_yaml

Expand Down
1 change: 0 additions & 1 deletion examples/bucketing_with_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

from pathlib import Path

import ibis
from ibis import _

# CI runs this example with and without xorq. xibis matches BSL's active ibis
Expand Down
4 changes: 2 additions & 2 deletions examples/fan_and_chasm_traps.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def main():
true_order_count = len(orders_df) # 8
true_total_amount = orders_df["amount"].sum() # 805

print(f"\nGround truth:")
print("\nGround truth:")
print(f" Total lifetime_value (customers): {true_revenue}")
print(f" Total order_count (orders): {true_order_count}")
print(f" Total order_amount (orders): {true_total_amount}")
Expand Down Expand Up @@ -209,7 +209,7 @@ def main():
# --- 2a. Ground truth -------------------------------------------------
true_ticket_count = len(support_tickets_df) # 5

print(f"\nGround truth:")
print("\nGround truth:")
print(f" Total order_count (orders): {true_order_count}")
print(f" Total ticket_count (tickets): {true_ticket_count}")
print(f" Total lifetime_value (customers): {true_revenue}")
Expand Down
1 change: 0 additions & 1 deletion examples/joins.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

from pathlib import Path

import ibis

from boring_semantic_layer import from_yaml

Expand Down
1 change: 0 additions & 1 deletion examples/sessionized_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

from pathlib import Path

import ibis
import pandas as pd

# CI runs this example with and without xorq. xibis matches BSL's active ibis
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "boring-semantic-layer"
version = "0.3.15"
description = "A boring semantic layer built with ibis"
readme = "README.md"
requires-python = ">=3.10"
requires-python = ">=3.11"
dependencies = [
"attrs>=25.3.0",
"ibis-framework>=11.0.0",
Expand Down Expand Up @@ -95,7 +95,7 @@ markers = [
]

[tool.ruff]
target-version = "py310"
target-version = "py311"
line-length = 100

[tool.ruff.lint]
Expand Down
Loading
Loading