diff --git a/.github/workflows/build_pip.yml b/.github/workflows/build_pip.yml new file mode 100644 index 000000000..48e60d926 --- /dev/null +++ b/.github/workflows/build_pip.yml @@ -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' + steps: + - uses: actions/download-artifact@v4 + with: + pattern: pydough-wheel* + path: dist + merge-multiple: true + + - uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/pyproject.toml b/pyproject.toml index e071951c2..499ac95d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 = [