Skip to content

Commit d68cc00

Browse files
authored
Relax required Python version to 3.10 (#123)
* Downgrade required Python version to 3.10 * Matrix over Python versions in GH Actions * Temporary edaplot version * Temporary edaplot version * Set edaplot 0.1.2 version * Remove pre-commit caching from pre-commit.yml * Revert "Remove pre-commit caching from pre-commit.yml" This reverts commit be5a47c. * Fix formatting errors * Revert "Fix formatting errors" This reverts commit 7c31e08. * Fix formatting * Disable ipynb formatting and linting
1 parent e13553d commit d68cc00

File tree

9 files changed

+1024
-33
lines changed

9 files changed

+1024
-33
lines changed

.github/workflows/pre-commit.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,22 @@ on:
1010

1111
jobs:
1212
pre-commit:
13+
name: pre-commit on ${{ matrix.python-version }}
14+
1315
runs-on: ubuntu-latest
1416

17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
python-version: ["3.10", "3.11", "3.12", "3.13"]
21+
1522
steps:
1623
- uses: actions/checkout@v5
1724

1825
- name: Set up Python
1926
uses: actions/setup-python@v6
2027
with:
21-
python-version-file: ".python-version"
28+
python-version: ${{ matrix.python-version }}
2229

2330
- name: Install uv
2431
uses: astral-sh/setup-uv@v7

.github/workflows/pytest.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,22 @@ on:
1010

1111
jobs:
1212
pytest:
13+
name: pytest on ${{ matrix.python-version }}
14+
1315
runs-on: ubuntu-latest
1416

17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
python-version: ["3.10", "3.11", "3.12", "3.13"]
21+
1522
steps:
1623
- uses: actions/checkout@v5
1724

1825
- name: Set up Python
1926
uses: actions/setup-python@v6
2027
with:
21-
python-version-file: ".python-version"
28+
python-version: ${{ matrix.python-version }}
2229

2330
- name: Install uv
2431
uses: astral-sh/setup-uv@v7

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.12.9
1+
3.10

databao/configs/llm.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import os
22
from functools import cached_property
33
from pathlib import Path
4-
from typing import Any, Literal, Self
4+
from typing import Any, Literal
55

66
from langchain.chat_models import init_chat_model
77
from langchain_core.language_models import BaseChatModel
88
from pydantic import BaseModel, ConfigDict, Field
9+
from typing_extensions import Self
910

1011
_OPENAI_PREFIXES = ["gpt", "o1", "o3", "o4"]
1112
_ANTHROPIC_PREFIXES = ["claude", "anthropic"]

databao/core/pipe.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import uuid
2-
from typing import TYPE_CHECKING, Any, Self
2+
from typing import TYPE_CHECKING, Any
33

44
from pandas import DataFrame
5+
from typing_extensions import Self
56

67
from databao.core.executor import ExecutionResult, OutputModalityHints
78
from databao.core.opa import Opa

databao/executors/lighthouse/graph.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from collections.abc import Sequence
2-
from typing import Annotated, Any, Literal, TypedDict
2+
from typing import Annotated, Any, Literal
33

44
import pandas as pd
55
from duckdb import DuckDBPyConnection
@@ -12,6 +12,7 @@
1212
from langgraph.graph import add_messages
1313
from langgraph.graph.state import CompiledStateGraph, StateGraph
1414
from langgraph.prebuilt import InjectedState
15+
from typing_extensions import TypedDict
1516

1617
from databao.configs.llm import LLMConfig
1718
from databao.core import ExecutionResult

examples/demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@
3939
print(f"\n{df.to_string() if df is not None else df}\n")
4040

4141
plot = thread.plot()
42-
print(plot.text)
42+
print(plot.text)

pyproject.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "databao"
33
description = "databao: NL queries for data"
44
dynamic = ["version"] # Based on the git tag
5-
requires-python = ">=3.12,<3.14"
5+
requires-python = ">=3.10, <3.14"
66
readme = "README.md"
77
license = "Apache-2.0 AND LicenseRef-Additional-Terms"
88
license-files = ["LICENSE.md"]
@@ -24,7 +24,7 @@ dependencies = [
2424
"tabulate>=0.9.0",
2525
"psycopg2-binary>=2.9.10",
2626
"matplotlib>=3.10.0",
27-
"edaplot-vl~=0.1.0",
27+
"edaplot-vl~=0.1.2",
2828
"diskcache>=5.6.3",
2929
"sqlglot>=27.29.0",
3030
]
@@ -63,6 +63,7 @@ dev = [
6363
"pytest>=7.4.0",
6464
"ruff>=0.13.2",
6565
"types-pyyaml>=6.0.12.20250915",
66+
"typing-extensions>=4.15.0",
6667
]
6768

6869
[tool.mypy]
@@ -80,6 +81,7 @@ plugins = ["pydantic.mypy", "sqlalchemy.ext.mypy.plugin"]
8081

8182
[tool.ruff]
8283
line-length = 120
84+
extend-exclude = ["*.ipynb"]
8385

8486
[tool.ruff.lint]
8587
select = [

uv.lock

Lines changed: 996 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)