Skip to content

Commit e3ab48c

Browse files
Support Python 3.12 and above versions (#17)
* update python ver * fix poetry lock * add pyspark as test dependency * Fix Poetry installation for Python 3.12+ compatibility using official action * fix * fix coverage * more fix * fix
1 parent ecaa405 commit e3ab48c

File tree

4 files changed

+200
-3
lines changed

4 files changed

+200
-3
lines changed

.github/workflows/ci.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
python-version: ['3.9', '3.10', '3.11', '3.12']
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
26+
- name: Install Poetry
27+
uses: snok/install-poetry@v1.3.4
28+
with:
29+
version: latest
30+
virtualenvs-create: true
31+
virtualenvs-in-project: true
32+
33+
- name: Load cached venv
34+
id: cached-poetry-dependencies
35+
uses: actions/cache@v4
36+
with:
37+
path: .venv
38+
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
39+
40+
- name: Install dependencies
41+
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
42+
run: poetry install --no-interaction --no-root --extras "all"
43+
44+
- name: Install project
45+
run: poetry install --no-interaction --extras "all"
46+
47+
- name: Run tests
48+
run: poetry run pytest tests/ -v
49+
50+
- name: Run tests with coverage
51+
run: |
52+
poetry run pytest tests/ --cov=pyspark_datasources --cov-report=xml --cov-report=term-missing
53+

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,3 +158,10 @@ cython_debug/
158158
# and can be added to the global gitignore or merged into this file. For a more nuclear
159159
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
160160
.idea/
161+
162+
# Claude Code
163+
.claude/
164+
claude_cache/
165+
166+
# Gemini
167+
.gemini/

poetry.lock

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

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ packages = [
1010
]
1111

1212
[tool.poetry.dependencies]
13-
python = ">=3.9,<=3.12"
13+
python = ">=3.9,<3.13"
1414
pyarrow = ">=11.0.0"
1515
requests = "^2.31.0"
1616
faker = "^23.1.0"
@@ -29,10 +29,12 @@ all = ["faker", "datasets", "databricks-sdk", "kagglehub"]
2929

3030
[tool.poetry.group.dev.dependencies]
3131
pytest = "^8.0.0"
32+
pytest-cov = "^4.0.0"
3233
grpcio = "^1.60.1"
3334
grpcio-status = "^1.60.1"
3435
pandas = "^2.2.0"
3536
mkdocs-material = "^9.5.40"
37+
pyspark = "4.0.0"
3638

3739
[build-system]
3840
requires = ["poetry-core"]

0 commit comments

Comments
 (0)