vgi-polars 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- vgi_polars-0.1.0/.github/workflows/ci.yml +114 -0
- vgi_polars-0.1.0/.github/workflows/release.yml +63 -0
- vgi_polars-0.1.0/.gitignore +22 -0
- vgi_polars-0.1.0/CLAUDE.md +505 -0
- vgi_polars-0.1.0/LICENSE +201 -0
- vgi_polars-0.1.0/PKG-INFO +348 -0
- vgi_polars-0.1.0/README.md +116 -0
- vgi_polars-0.1.0/pyproject.toml +134 -0
- vgi_polars-0.1.0/src/vgi_polars/__init__.py +27 -0
- vgi_polars-0.1.0/src/vgi_polars/_aggregate.py +144 -0
- vgi_polars-0.1.0/src/vgi_polars/_arguments.py +83 -0
- vgi_polars-0.1.0/src/vgi_polars/_filter_translate.py +267 -0
- vgi_polars-0.1.0/src/vgi_polars/_multi_branch.py +198 -0
- vgi_polars-0.1.0/src/vgi_polars/_polars_compat.py +45 -0
- vgi_polars-0.1.0/src/vgi_polars/_result_cache.py +132 -0
- vgi_polars-0.1.0/src/vgi_polars/_scalar.py +204 -0
- vgi_polars-0.1.0/src/vgi_polars/_source.py +447 -0
- vgi_polars-0.1.0/src/vgi_polars/_table_in_out.py +234 -0
- vgi_polars-0.1.0/src/vgi_polars/catalog.py +405 -0
- vgi_polars-0.1.0/src/vgi_polars/errors.py +29 -0
- vgi_polars-0.1.0/src/vgi_polars/table.py +312 -0
- vgi_polars-0.1.0/tests/conftest.py +328 -0
- vgi_polars-0.1.0/tests/test_aggregate.py +58 -0
- vgi_polars-0.1.0/tests/test_arguments.py +73 -0
- vgi_polars-0.1.0/tests/test_catalog.py +70 -0
- vgi_polars-0.1.0/tests/test_catalog_versioning.py +90 -0
- vgi_polars-0.1.0/tests/test_concurrency.py +183 -0
- vgi_polars-0.1.0/tests/test_docstrings.py +66 -0
- vgi_polars-0.1.0/tests/test_errors.py +96 -0
- vgi_polars-0.1.0/tests/test_http_transport.py +47 -0
- vgi_polars-0.1.0/tests/test_multi_branch.py +133 -0
- vgi_polars-0.1.0/tests/test_protocol_robustness.py +65 -0
- vgi_polars-0.1.0/tests/test_required_filters.py +143 -0
- vgi_polars-0.1.0/tests/test_result_cache.py +185 -0
- vgi_polars-0.1.0/tests/test_scalar_dedup.py +123 -0
- vgi_polars-0.1.0/tests/test_scalar_function.py +72 -0
- vgi_polars-0.1.0/tests/test_scan_basic.py +43 -0
- vgi_polars-0.1.0/tests/test_scan_filter.py +145 -0
- vgi_polars-0.1.0/tests/test_scan_projection.py +30 -0
- vgi_polars-0.1.0/tests/test_splits.py +210 -0
- vgi_polars-0.1.0/tests/test_table_in_out.py +101 -0
- vgi_polars-0.1.0/tests/test_tcp_transport.py +45 -0
- vgi_polars-0.1.0/tests/test_time_travel.py +68 -0
- vgi_polars-0.1.0/uv.lock +1090 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
inputs:
|
|
9
|
+
vgi_python_ref:
|
|
10
|
+
description: >-
|
|
11
|
+
git ref (tag/branch/sha) of Query-farm/vgi-python to test against.
|
|
12
|
+
Defaults to the pinned tag below when left blank.
|
|
13
|
+
required: false
|
|
14
|
+
default: ""
|
|
15
|
+
|
|
16
|
+
# vgi-polars depends on vgi-python via a LOCAL SIBLING checkout
|
|
17
|
+
# ([tool.uv.sources] in pyproject.toml, path = "../vgi-python"), not the
|
|
18
|
+
# published PyPI release — this repo tracks vgi-python's client-side surface
|
|
19
|
+
# as both develop together, the same way vgi-spark's settings.gradle.kts
|
|
20
|
+
# composite-builds a sibling vgi-java checkout. CI therefore checks out BOTH
|
|
21
|
+
# repos as siblings under the same workspace root, exactly mirroring local
|
|
22
|
+
# dev's ~/Development/vgi-polars + ~/Development/vgi-python layout.
|
|
23
|
+
#
|
|
24
|
+
# Pinned (not `main`) for the same reason ~/Development/vgi's CI pins
|
|
25
|
+
# VGI_FIXTURES_REF to a release tag: a protocol/fixture change landing on
|
|
26
|
+
# vgi-python's main would otherwise silently flip this repo's CI red with no
|
|
27
|
+
# change on this side. Bump VGI_PYTHON_REF in lockstep with real vgi-python
|
|
28
|
+
# API usage changes here; override per-run via the workflow_dispatch input.
|
|
29
|
+
env:
|
|
30
|
+
VGI_PYTHON_REF: v0.29.3
|
|
31
|
+
|
|
32
|
+
jobs:
|
|
33
|
+
lint:
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
steps:
|
|
36
|
+
- uses: actions/checkout@v7
|
|
37
|
+
- uses: astral-sh/setup-uv@v9.0.0
|
|
38
|
+
with:
|
|
39
|
+
enable-cache: true
|
|
40
|
+
- run: uvx ruff format --check src/ tests/
|
|
41
|
+
- run: uvx ruff check src/ tests/
|
|
42
|
+
|
|
43
|
+
build:
|
|
44
|
+
name: Build & validate package metadata
|
|
45
|
+
runs-on: ubuntu-latest
|
|
46
|
+
steps:
|
|
47
|
+
- uses: actions/checkout@v7
|
|
48
|
+
- uses: astral-sh/setup-uv@v9.0.0
|
|
49
|
+
with:
|
|
50
|
+
enable-cache: true
|
|
51
|
+
# Builds against the plain `vgi-python>=...` dependency bound in
|
|
52
|
+
# pyproject.toml (PyPI), not the [tool.uv.sources] sibling-checkout dev
|
|
53
|
+
# override — proves the package a `release.yml` run would publish
|
|
54
|
+
# actually builds and has valid metadata, on every push/PR, not just
|
|
55
|
+
# at release time.
|
|
56
|
+
- name: Build (sdist + wheel)
|
|
57
|
+
run: uv build --sdist --wheel --out-dir dist .
|
|
58
|
+
- name: Validate metadata
|
|
59
|
+
run: uvx twine check dist/*
|
|
60
|
+
|
|
61
|
+
test:
|
|
62
|
+
runs-on: ubuntu-latest
|
|
63
|
+
steps:
|
|
64
|
+
- name: Checkout vgi-polars
|
|
65
|
+
uses: actions/checkout@v7
|
|
66
|
+
with:
|
|
67
|
+
path: vgi-polars
|
|
68
|
+
|
|
69
|
+
- name: Checkout vgi-python (sibling)
|
|
70
|
+
uses: actions/checkout@v7
|
|
71
|
+
with:
|
|
72
|
+
repository: Query-farm/vgi-python
|
|
73
|
+
ref: ${{ github.event.inputs.vgi_python_ref || env.VGI_PYTHON_REF }}
|
|
74
|
+
path: vgi-python
|
|
75
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
76
|
+
|
|
77
|
+
- uses: astral-sh/setup-uv@v9.0.0
|
|
78
|
+
with:
|
|
79
|
+
enable-cache: true
|
|
80
|
+
python-version: "3.13"
|
|
81
|
+
|
|
82
|
+
# --extra http: falcon/waitress, needed for vgi-fixture-http to serve.
|
|
83
|
+
# The workspace `dev` group (synced by default) is what actually
|
|
84
|
+
# provides the vgi-fixture-worker/vgi-fixture-http console scripts.
|
|
85
|
+
- name: Sync vgi-python
|
|
86
|
+
working-directory: vgi-python
|
|
87
|
+
run: uv sync --extra http
|
|
88
|
+
|
|
89
|
+
- name: Sync vgi-polars
|
|
90
|
+
working-directory: vgi-polars
|
|
91
|
+
run: uv sync
|
|
92
|
+
|
|
93
|
+
# Needs the full sibling-checkout environment (vgi-python's types, not
|
|
94
|
+
# just vgi-polars' own code) to resolve imports, so it lives in this
|
|
95
|
+
# job rather than `lint` — mirrors vgi-python's own "Type check (mypy)"
|
|
96
|
+
# CI step, just riding this job's existing sibling setup instead of a
|
|
97
|
+
# dedicated one.
|
|
98
|
+
- name: Type check (mypy)
|
|
99
|
+
working-directory: vgi-polars
|
|
100
|
+
run: uv run mypy src/
|
|
101
|
+
|
|
102
|
+
# Docstring consistency (pydoclint) runs inside the pytest suite via
|
|
103
|
+
# tests/test_docstrings.py, mirroring vgi-python — not a separate step.
|
|
104
|
+
- name: Run tests
|
|
105
|
+
working-directory: vgi-polars
|
|
106
|
+
env:
|
|
107
|
+
VGI_PYTHON: ${{ github.workspace }}/vgi-python
|
|
108
|
+
run: uv run pytest -v --cov=vgi_polars --cov-report=term-missing --cov-report=xml
|
|
109
|
+
|
|
110
|
+
- name: Upload coverage
|
|
111
|
+
uses: actions/upload-artifact@v7
|
|
112
|
+
with:
|
|
113
|
+
name: coverage-xml
|
|
114
|
+
path: vgi-polars/coverage.xml
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
# Publishes vgi-polars to PyPI when a GitHub Release is published.
|
|
4
|
+
#
|
|
5
|
+
# Auth is PyPI Trusted Publishing (OIDC) — no API tokens. Before the first run,
|
|
6
|
+
# configure a Trusted Publisher on PyPI for the `vgi-polars` project pointing at:
|
|
7
|
+
# owner: Query-farm
|
|
8
|
+
# repository: vgi-polars
|
|
9
|
+
# workflow: release.yml
|
|
10
|
+
# environment: pypi
|
|
11
|
+
# pyproject.toml's version must match the released tag (e.g. tag v0.1.0 ->
|
|
12
|
+
# version = "0.1.0").
|
|
13
|
+
#
|
|
14
|
+
# Builds against the published vgi-python release on PyPI (not a local sibling
|
|
15
|
+
# checkout — [tool.uv.sources]'s path override is a uv-only dev-resolution hint
|
|
16
|
+
# that never reaches the built sdist/wheel's own dependency metadata, which
|
|
17
|
+
# always names the plain `vgi-python>=...` version bound from pyproject.toml).
|
|
18
|
+
|
|
19
|
+
on:
|
|
20
|
+
release:
|
|
21
|
+
types: [published]
|
|
22
|
+
|
|
23
|
+
permissions:
|
|
24
|
+
contents: read
|
|
25
|
+
|
|
26
|
+
jobs:
|
|
27
|
+
build:
|
|
28
|
+
name: Build distribution
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@v7
|
|
32
|
+
|
|
33
|
+
- name: Install uv
|
|
34
|
+
uses: astral-sh/setup-uv@v9.0.0
|
|
35
|
+
|
|
36
|
+
- name: Build (sdist + wheel)
|
|
37
|
+
run: uv build --sdist --wheel --out-dir dist .
|
|
38
|
+
|
|
39
|
+
- name: Validate metadata
|
|
40
|
+
run: uvx twine check dist/*
|
|
41
|
+
|
|
42
|
+
- name: Upload artifacts
|
|
43
|
+
uses: actions/upload-artifact@v7
|
|
44
|
+
with:
|
|
45
|
+
name: dist
|
|
46
|
+
path: dist/
|
|
47
|
+
|
|
48
|
+
publish:
|
|
49
|
+
name: Publish to PyPI
|
|
50
|
+
needs: build
|
|
51
|
+
runs-on: ubuntu-latest
|
|
52
|
+
environment: pypi
|
|
53
|
+
permissions:
|
|
54
|
+
id-token: write # required for Trusted Publishing
|
|
55
|
+
steps:
|
|
56
|
+
- name: Download artifacts
|
|
57
|
+
uses: actions/download-artifact@v8
|
|
58
|
+
with:
|
|
59
|
+
name: dist
|
|
60
|
+
path: dist/
|
|
61
|
+
|
|
62
|
+
- name: Publish to PyPI
|
|
63
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Python-generated files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[oc]
|
|
4
|
+
build/
|
|
5
|
+
dist/
|
|
6
|
+
wheels/
|
|
7
|
+
*.egg-info
|
|
8
|
+
|
|
9
|
+
# Virtual environments
|
|
10
|
+
.venv
|
|
11
|
+
|
|
12
|
+
# Test/lint artifacts
|
|
13
|
+
.pytest_cache/
|
|
14
|
+
.ruff_cache/
|
|
15
|
+
.coverage
|
|
16
|
+
.coverage.*
|
|
17
|
+
htmlcov/
|
|
18
|
+
|
|
19
|
+
# IDE / editor
|
|
20
|
+
.vscode/
|
|
21
|
+
.idea/
|
|
22
|
+
*.swp
|