Skip to content

remove top-level pandera __init__ import warning #3633

remove top-level pandera __init__ import warning

remove top-level pandera __init__ import warning #3633

Workflow file for this run

name: CI Tests
on:
push:
branches:
- main
- dev
- bugfix
- "release/*"
pull_request:
branches:
- main
- dev
- ibis-dev
- bugfix
- "release/*"
env:
DEFAULT_PYTHON: 3.11
CI: "true"
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
lint:
name: Linters (${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v4
with:
path: ~/.cache/pip # ubuntu location
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install 'uv<0.7.0' nox pre_commit \
mypy==0.982 \
types-click \
types-pytz \
types-pyyaml \
types-requests \
types-setuptools \
setuptools \
polars
- name: Install pandera
run: python -m pip install -e .
- name: Pip info
run: python -m pip list
- name: Testing
run: which uv
- name: Testing 2
run: which nox
- name: Check requirements
run: nox -db uv -r --non-interactive --python ${{ matrix.python-version }} --session requirements-${{ matrix.python-version }}
- name: Sort Imports
run: pre-commit run isort --all-files
- name: Black
if: always()
run: pre-commit run black --all-files
- name: Pylint
if: always()
run: pre-commit run pylint --all-files
- name: Mypy Type Checking
if: always()
run: pre-commit run mypy --all-files
# test base functionality
unit-tests-base:
name: >
Unit Tests Base: python-${{ matrix.python-version }} ${{ matrix.os }} (pydantic-${{ matrix.pydantic-version }})
runs-on: ${{ matrix.os }}
defaults:
run:
shell: pwsh
env:
PYTHONUTF8: 1
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
pydantic-version: ["2.10.6"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dev deps
shell: bash
run: pip install 'uv<0.7.0' nox
- run: |
pip list
printenv | sort
- name: Unit Tests Base
run: nox -v -db uv --non-interactive --session "tests-${{ matrix.python-version }}(extra=None, pandas=None, pydantic=None)"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
# test pandas functionality
unit-tests-pandas:
name: >
Unit Tests Pandas: python-${{ matrix.python-version }} ${{ matrix.os }} (extra-pandas, pandas-${{ matrix.pandas-version }}, pydantic-${{ matrix.pydantic-version }})
runs-on: ${{ matrix.os }}
defaults:
run:
shell: pwsh
env:
PYTHONUTF8: 1
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
pandas-version: ["2.1.1", "2.2.3"]
pydantic-version: ["1.10.11", "2.10.6"]
exclude:
- pandas-version: "2.1.1"
python-version: "3.13"
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dev deps
shell: bash
run: pip install 'uv<0.7.0' nox
- run: |
pip list
printenv | sort
- name: Unit Tests - pandas
run: nox -v -db uv --non-interactive --session "tests-${{ matrix.python-version }}(extra='pandas', pandas='${{ matrix.pandas-version }}', pydantic='${{ matrix.pydantic-version }}')"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
# test extras that add functionality to core pandera features
unit-tests-supplemental-extras:
name: >
Unit Tests Supplemental Extras: python-${{ matrix.python-version }} ${{ matrix.os }} (extra-${{ matrix.extra }}, pandas-${{ matrix.pandas-version }}, pydantic-${{ matrix.pydantic-version }})
runs-on: ${{ matrix.os }}
defaults:
run:
shell: pwsh
env:
PYTHONUTF8: 1
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
pandas-version: ["2.2.3"]
pydantic-version: ["2.10.6"]
extra:
- hypotheses
- io
- mypy
- strategies
- fastapi
- geopandas
exclude:
- extra: mypy
os: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dev deps
shell: bash
run: pip install 'uv<0.7.0' nox
- run: |
pip list
printenv | sort
- name: Unit Tests - ${{ matrix.extra }}
run: nox -v -db uv --non-interactive --session "tests-${{ matrix.python-version }}(extra='${{ matrix.extra }}', pandas='${{ matrix.pandas-version }}', pydantic='${{ matrix.pydantic-version }}')"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
# test extras for popular dataframe libraries
unit-tests-dataframe-extras:
name: >
Unit Tests DataFrame Extras: python-${{ matrix.python-version }} ${{ matrix.os }} (extra-${{ matrix.extra }}, pandas-${{ matrix.pandas-version }}, pydantic-${{ matrix.pydantic-version }})
runs-on: ${{ matrix.os }}
defaults:
run:
shell: pwsh
env:
PYTHONUTF8: 1
PYTEST_FLAGS: --cov=pandera --cov-report=term-missing --cov-report=xml --cov-append
HYPOTHESIS_FLAGS: -n=auto -q --hypothesis-profile=ci
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
pandas-version: ["2.2.3"]
pydantic-version: ["2.10.6"]
extra:
- dask
- polars
- pyspark
- modin-dask
- modin-ray
- ibis
exclude:
# mypy tests hang on windows
- extra: mypy
os: windows-latest
- extra: modin-ray
os: windows-latest
# pyspark serialization issue on windows: "pandas" module not found
- extra: pyspark
os: windows-latest
- extra: pyspark
python-version: "3.12"
- extra: pyspark
python-version: "3.13"
- extra: modin-dask
python-version: "3.13"
- extra: modin-ray
python-version: "3.13"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "17"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dev deps
shell: bash
run: pip install 'uv<0.7.0' nox
- run: |
pip list
printenv | sort
- name: Unit Tests - ${{ matrix.extra }}
run: nox -v -db uv --non-interactive --session "tests-${{ matrix.python-version }}(extra='${{ matrix.extra }}', pandas='${{ matrix.pandas-version }}', pydantic='${{ matrix.pydantic-version }}')"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
docs:
name: Docs (${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "17"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v4
with:
path: ~/.cache/pip # ubuntu location
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: pip install 'uv<0.7.0' nox
- name: Pip info
run: python -m pip list
- name: Build docs and run doctest
run: >
nox
-db uv -r
--non-interactive
--session docs-${{ matrix.python-version }}