Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
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
88 changes: 88 additions & 0 deletions .github/workflows/build_pip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Build PyDough Pip Wheel

on:
workflow_dispatch:
release:
types: [published]

jobs:
build_pydough_wheels:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
name: Build PyDough Wheels

steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-2
role-to-assume: arn:aws:iam::427443013497:role/PyDoughBuildWheelRole
role-session-name: PyDoughBuildWheelSession
role-skip-session-tagging: true

- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.4.23"

- name: Build Wheels
run: |
uv build

- uses: actions/upload-artifact@v4
with:
name: pydough-wheel
path: ./dist/*.whl

test_pydough_wheels:
needs: [build_pydough_wheels]
runs-on: ubuntu-latest
name: Test PyDough Wheels

strategy:
matrix:
python_version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/download-artifact@v4
id: download-artifact
with:
pattern: pydough-wheel*
path: .

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}

- name: Install
run: |
# Install pydough from the local wheel
pip install pydough --find-links "$(find . -name "pydough-wheel*" -print)" --no-index --no-deps
# Install dependencies from pypi
pip install pydough
- name: Test Import
run: |
python -c "import pydough; assert pydough.active_session is not None"
# TODO: Consider a more detailed test of functionality.


upload_pydough_wheels:
needs: [build_pydough_wheels, test_pydough_wheels]
runs-on: ubuntu-latest
permissions:
id-token: write
name: Upload PyDough Wheels

if: github.event_name == 'release' && github.event.action == 'published'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only step that isn't properly tested. I had problems because I tried to setup the OIDC step on pypi and the package name was already taken. I've asked about next steps on slack. However, the testing steps pass, so I don't think this should be a blocker since we can test once we determine how to proceed.

steps:
- uses: actions/download-artifact@v4
with:
pattern: pydough-wheel*
path: dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
26 changes: 23 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,40 @@
[project]
name = "pydough"
version = "0.1.0"
description = "TODO"
dynamic = ["version"]
keywords = ["analytics"]
description = "Analytics DSL for Python"
readme = "README.md"
authors = [{name = "Bodo.ai"}]
requires-python = ">=3.10"

classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]

# Note: sqlite is included in the standard library, so it doesn't need to be listed here.
dependencies = ["pytz", "sqlglot", "pandas>=2.0.0", "jupyterlab"]

[project.urls]
# TODO: Add homepage + documentation when docs are live.
Repository = "https://github.com/bodo-ai/PyDough"

[tool.uv]
dev-dependencies = ["pre-commit", "pytest", "ruff==0.6.7"]

[build-system]
requires = ["hatchling"]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[tool.hatch.version]
source = "vcs"

[tool.ruff]
unsafe-fixes = true
lint.extend-select = [
Expand Down
Loading