feat(expr-ir): Add read_{csv,parquet}
#13543
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: PyTest | |
| on: | |
| pull_request: | |
| env: | |
| PY_COLORS: 1 | |
| PYTEST_ADDOPTS: "--numprocesses=logical" | |
| jobs: | |
| pytest-39: | |
| strategy: | |
| matrix: | |
| python-version: ["3.9"] | |
| os: [windows-latest, ubuntu-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: "true" | |
| cache-suffix: pytest-39-${{ matrix.python-version }} | |
| cache-dependency-glob: "pyproject.toml" | |
| - name: install-reqs | |
| run: uv pip install -e ".[pandas,polars,pyarrow]" --group tests --system | |
| - name: show-deps | |
| run: uv pip freeze | |
| - name: Run pytest | |
| run: pytest tests --cov=narwhals --cov=tests --cov-fail-under=75 --constructors=pandas,pyarrow,polars[eager],polars[lazy] | |
| - name: install-test-plugin | |
| run: uv pip install -e test-plugin/. --system | |
| pytest-windows: | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.12"] | |
| os: [windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: "true" | |
| cache-suffix: pytest-windows-${{ matrix.python-version }} | |
| cache-dependency-glob: "pyproject.toml" | |
| - name: install-reqs | |
| # we are not testing pyspark, modin, or dask on Windows here because nobody got time for that | |
| run: uv pip install -e ".[ibis]" --group core-tests --group extra --system | |
| - name: install-test-plugin | |
| run: uv pip install -e test-plugin/. --system | |
| - name: show-deps | |
| run: uv pip freeze | |
| - name: Run pytest | |
| run: | | |
| pytest tests --cov=narwhals --cov=tests --runslow --cov-fail-under=95 --constructors=pandas,pandas[nullable],pandas[pyarrow],pyarrow,polars[eager],polars[lazy],duckdb,sqlframe,ibis --durations=30 | |
| pytest-full-coverage: | |
| strategy: | |
| matrix: | |
| python-version: ["3.11", "3.13"] | |
| os: [ubuntu-latest] | |
| include: | |
| - python-version: "3.11" | |
| polars_streaming: true | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| NARWHALS_POLARS_NEW_STREAMING: ${{ matrix.polars_streaming == true }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: "true" | |
| cache-suffix: pytest-full-coverage-${{ matrix.python-version }} | |
| cache-dependency-glob: "pyproject.toml" | |
| - name: install-reqs | |
| run: uv pip install -e ".[dask, modin, ibis]" --group core-tests --group extra --system | |
| - name: install-test-plugin | |
| run: uv pip install -e test-plugin/. --system | |
| - name: show-deps | |
| run: uv pip freeze | |
| - name: Run pytest | |
| run: pytest tests --cov=narwhals --cov=tests --cov-fail-under=100 --runslow --constructors=pandas,pandas[nullable],pandas[pyarrow],pyarrow,modin[pyarrow],polars[eager],polars[lazy],dask,duckdb,sqlframe,ibis --durations=30 | |
| - name: Run doctests | |
| # reprs differ between versions, so we only run doctests on the latest Python | |
| if: matrix.python-version == '3.13' | |
| run: pytest narwhals --doctest-modules | |
| # Test against smaller dependency set, used e.g. on Gentoo. | |
| pytest-narrower-dependencies: | |
| strategy: | |
| matrix: | |
| python-version: ["3.13"] | |
| os: [ubuntu-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: "true" | |
| cache-suffix: pytest-narrower-deps-${{ matrix.python-version }} | |
| cache-dependency-glob: "pyproject.toml" | |
| - name: install-reqs | |
| run: | | |
| uv pip install -e ".[pandas]" --group tests --system | |
| uv pip freeze | |
| - name: Run pytest (pandas and pandas[nullable]) | |
| run: pytest tests --runslow --constructors=pandas,pandas[nullable] | |
| - name: install-more-reqs | |
| run: | | |
| uv pip install -U pyarrow --system | |
| uv pip freeze | |
| - name: Run pytest (pandas[pyarrow] and pyarrow) | |
| run: pytest tests --runslow --constructors=pandas[pyarrow],pyarrow | |
| - name: install-polars | |
| run: | | |
| uv pip uninstall pandas pyarrow --system | |
| uv pip install polars --system | |
| uv pip freeze | |
| - name: Run pytest (polars) | |
| run: pytest tests --runslow --constructors=polars[eager],polars[lazy] | |
| python-314: | |
| strategy: | |
| matrix: | |
| python-version: ["3.14"] | |
| os: [ubuntu-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: "true" | |
| cache-suffix: python-314-${{ matrix.python-version }} | |
| cache-dependency-glob: "pyproject.toml" | |
| - name: install-reqs | |
| # Use `--pre` as duckdb stable not compatible with 3.14 | |
| run: uv pip install -e . --group tests --pre pandas polars pyarrow duckdb sqlframe --system | |
| - name: show-deps | |
| run: uv pip freeze | |
| - name: Run pytest | |
| run: pytest tests --cov=narwhals --cov=tests --runslow --durations=30 --constructors=pandas,pandas[nullable],pandas[pyarrow],pyarrow,polars[eager],polars[lazy],duckdb,sqlframe --cov-fail-under=50 | |
| python-314t: | |
| strategy: | |
| matrix: | |
| python-version: ["3.14t"] | |
| os: [ubuntu-latest] | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| PYTHON_GIL: 0 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: "true" | |
| cache-suffix: python-314t-${{ matrix.python-version }} | |
| cache-dependency-glob: "pyproject.toml" | |
| - name: install-reqs | |
| run: uv pip install -e . --group tests --pre pandas pyarrow --system | |
| - name: show-deps | |
| run: uv pip freeze | |
| - name: Run pytest | |
| run: pytest tests --cov=narwhals --cov=tests --runslow --durations=30 --constructors=pandas,pandas[nullable],pandas[pyarrow],pyarrow --cov-fail-under=50 |