Skip to content
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
ed53c99
WIP: downloading from s3
john-sanchez31 Nov 7, 2025
a05fab6
testing infrastructure for s3 custom datasets [run ci]
john-sanchez31 Nov 11, 2025
fddceff
flag run custom for custom dataset tests created
john-sanchez31 Nov 12, 2025
26d039c
adding all connectors for custom test
john-sanchez31 Nov 12, 2025
cd894dd
synthea s3 testing, adding bug test [run custom]
john-sanchez31 Nov 12, 2025
7b1f1f0
excluding custom test for [run ci] [run custom]
john-sanchez31 Nov 13, 2025
277aea7
now dialect flag does not run custom tests
john-sanchez31 Nov 14, 2025
4fc6a2f
testing [run all]
john-sanchez31 Nov 14, 2025
dce5428
adding mark and secrets for custom tests [run all]
john-sanchez31 Nov 14, 2025
1af103d
set env for custom dataset [run all]
john-sanchez31 Nov 14, 2025
2ee3a34
custom ci separated [run all]
john-sanchez31 Nov 17, 2025
5680d1f
secret name fixed [run all]
john-sanchez31 Nov 17, 2025
78fb6e5
comments addressed [run all]
john-sanchez31 Nov 17, 2025
447fcb4
keeping the db files
john-sanchez31 Nov 19, 2025
654b105
custom and s3 datasets separated
john-sanchez31 Nov 19, 2025
cf2aac2
s3 flag created [run s3]
john-sanchez31 Nov 19, 2025
f116a22
conlficts solved [run s3]
john-sanchez31 Nov 19, 2025
10b2e23
testing [run all]
john-sanchez31 Nov 19, 2025
68e2139
fixture added [run all]
john-sanchez31 Nov 19, 2025
47fef7f
testing [run ci]
john-sanchez31 Nov 19, 2025
25e1474
no initialized db fixed [run all]
john-sanchez31 Nov 19, 2025
fa6f4d1
init script added [run all]
john-sanchez31 Nov 19, 2025
339d1a5
minor fixes [run all]
john-sanchez31 Nov 20, 2025
8996c48
comment fixed [run all]
john-sanchez31 Nov 20, 2025
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
105 changes: 105 additions & 0 deletions .github/workflows/custom_testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Run Custom Tests All dialects

on:
workflow_call:
inputs:
python-versions:
description: "JSON string of Python versions"
type: string
required: true
secrets:
READ_LLM_FIXTURES_ROLE:
required: true
SF_USERNAME:
required: true
SF_PASSWORD:
required: true
SF_ACCOUNT:
required: true
MYSQL_USERNAME:
required: true
MYSQL_PASSWORD:
required: true
POSTGRES_USER:
required: true
POSTGRES_PASSWORD:
required: true

jobs:
custom-tests:
name: Custom Tests (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
strategy:
matrix:
python-version: ${{ fromJSON(inputs.python-versions) }}

# Define services here to run Docker containers alongside your job
services:
mysql:
image: bodoai1/pydough-mysql-tpch:latest
env:
# Set environment variables for MySQL container
MYSQL_ROOT_PASSWORD: ${{ secrets.MYSQL_PASSWORD }}
MYSQL_DATABASE: tpch
ports:
- 3306:3306

postgres:
image: bodoai1/pydough-postgres-tpch:latest
env:
# Set environment variables for Postgres container
POSTGRES_USER: ${{ secrets.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
POSTGRES_DB: "pydough_test"
ports:
- 5432:5432
env:
# MYSQL env
MYSQL_USERNAME: ${{ secrets.MYSQL_USERNAME }}
MYSQL_PASSWORD: ${{ secrets.MYSQL_PASSWORD }}
MYSQL_DATABASE: tpch
MYSQL_HOST: 127.0.0.1
# POSTGRES env
POSTGRES_USER: ${{ secrets.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
POSTGRES_DB: pydough_test
POSTGRES_HOST: 127.0.0.1
# SNOWFLAKE env
SF_USERNAME: ${{ secrets.SF_USERNAME }}
SF_PASSWORD: ${{ secrets.SF_PASSWORD }}
SF_ACCOUNT: ${{ secrets.SF_ACCOUNT }}

steps:
- name: Configure AWS Credentials (OIDC)
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.READ_LLM_FIXTURES_ROLE }}
aws-region: us-east-2

- uses: actions/checkout@v4

- name: Setup Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

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

- name: Create virtual environment
run: uv venv

- name: Install dependencies
run: uv pip install -e ".[boto3, snowflake, mysql, postgres]"

- name: Confirm all connectors are installed
run: uv run python -c "import boto3; import mysql.connector; import snowflake.connector; import psycopg2; print('All connectors installed')"

- name: Run Custom Tests for all dialects
run: uv run pytest -m custom tests/ -rs
31 changes: 28 additions & 3 deletions .github/workflows/pr_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ on:
type: boolean
required: false
default: false
run-custom:
description: "Run Custom Datasets Tests"
type: boolean
required: false
default: false

# Limit CI to cancel previous runs in the same PR
concurrency:
Expand Down Expand Up @@ -108,8 +113,6 @@ jobs:
# Output to GitHub Actions expected format
echo "matrix=$joined" >> $GITHUB_OUTPUT



run-python-tests:
name: Main Python Tests
needs: [get-msg, get-py-ver-matrix]
Expand Down Expand Up @@ -148,7 +151,7 @@ jobs:
run: uv run ruff check .

- name: Run Tests
run: uv run pytest tests/ -m "not (snowflake or mysql or postgres or sf_masked)" -rs
run: uv run pytest tests/ -m "not (snowflake or mysql or postgres or sf_masked or custom)" -rs

run-defog-daily-update:
name: Run DEFOG Daily Update
Expand Down Expand Up @@ -232,3 +235,25 @@ jobs:
python-versions: ${{ github.event_name == 'workflow_dispatch'
&& needs.get-py-ver-matrix.outputs.matrix
|| '["3.10", "3.11", "3.12"]' }}

run-custom-tests:
name: Custom datasets Tests
needs: [get-msg, get-py-ver-matrix]
if: |
(github.event_name == 'pull_request' && contains(needs.get-msg.outputs.commitMsg, '[run all]')) ||
(github.event_name == 'pull_request' && contains(needs.get-msg.outputs.commitMsg, '[run custom]')) ||
(github.event_name == 'workflow_dispatch' && (inputs.run-all || inputs.run-custom))
uses: ./.github/workflows/custom_testing.yml
secrets:
READ_LLM_FIXTURES_ROLE: ${{ secrets.READ_LLM_FIXTURES_ROLE }}
SF_USERNAME: ${{ secrets.SF_USERNAME }}
SF_PASSWORD: ${{ secrets.SF_PASSWORD }}
SF_ACCOUNT: ${{ secrets.SF_ACCOUNT }}
MYSQL_USERNAME: ${{ secrets.MYSQL_USERNAME }}
MYSQL_PASSWORD: ${{ secrets.MYSQL_PASSWORD }}
POSTGRES_USER: ${{ secrets.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
with:
python-versions: ${{ github.event_name == 'workflow_dispatch'
&& needs.get-py-ver-matrix.outputs.matrix
|| '["3.10", "3.11", "3.12"]' }}
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ dev-dependencies = [
"pytest",
"ruff==0.6.7",
"pytest-repeat",
"boto3",
"pydough[snowflake]",
"pydough[mysql]",
"pydough[postgres]",
Expand Down
1 change: 1 addition & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ markers =
postgres: marks tests that require PostgresSQL credentials
server: marks tests that require api mock server
sf_masked: marks tests that require Snowflake Masked credentials
custom: marks tests that require custom datasets from s3
Copy link
Contributor

@juankx-bodo juankx-bodo Nov 18, 2025

Choose a reason for hiding this comment

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

Just a context question, should these test be more like s3_datasets instead of custom. Custom makes me think more to something like reserved words, datasets from our repo created by us and customized for edge cases instead of public datasets stored in aws.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm okay with that. I believe he just used what the test file name was.

Loading