Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e09894d
First try to test Modin with pandas implementation of dataframe api p…
anmyachev Dec 4, 2023
4060764
Second try to implement DataFrame API protocol on Modin
anmyachev Jan 24, 2024
9ddb92c
fix modin issue - 6881
anmyachev Feb 1, 2024
9f2187c
add modin dep
anmyachev Feb 2, 2024
346c489
add 'library' option
anmyachev Feb 2, 2024
5562983
fixes
anmyachev Feb 2, 2024
22c98de
add missed deps file for modin
anmyachev Feb 2, 2024
ae8f919
fixes
anmyachev Feb 2, 2024
565107e
workarounds for coverage
anmyachev Feb 2, 2024
70bd212
fix mypy errors
anmyachev Feb 12, 2024
3274d9b
fixes
anmyachev Feb 12, 2024
fdbde78
fixes
anmyachev Feb 12, 2024
76e423a
fixes
anmyachev Feb 12, 2024
324b7eb
ignore missing imports for modin
anmyachev Feb 12, 2024
5da37b1
Pin polars<0.20.8 (#74)
anmyachev Apr 19, 2024
05a2824
FIX `mkdocs` job (#75)
anmyachev Apr 19, 2024
3d2a4f0
Make tests independent of implementation (#72)
anmyachev Apr 22, 2024
65c056c
Merge branch 'main' of https://github.com/data-apis/dataframe-api-com…
anmyachev Apr 23, 2024
fb0ea59
cleanup
anmyachev Apr 23, 2024
069ca3a
cleanup[2]
anmyachev Apr 23, 2024
3f44f21
fix
anmyachev Apr 23, 2024
af46c22
fix
anmyachev Apr 23, 2024
52336b8
add an ability to run tests if polars is not installed
anmyachev Apr 23, 2024
ec77b48
improve coverage
anmyachev Apr 23, 2024
cb5afb5
fix mypy errors
anmyachev Apr 24, 2024
c17bc32
fix mypy errors[2]
anmyachev Apr 24, 2024
06f200a
fix mypy errors[3]
anmyachev Apr 24, 2024
09cd244
cleanup
anmyachev Apr 24, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/earliest_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ jobs:
- name: install-reqs
run: python -m pip install --upgrade tox virtualenv setuptools pip && python -m pip install -r requirements-dev.txt
- name: Run pytest
run: pytest tests --cov=dataframe_api_compat --cov=tests --cov-fail-under=80
run: pytest tests --cov=dataframe_api_compat/pandas_standard --cov=dataframe_api_compat/polars_standard --cov=tests --cov-fail-under=80
5 changes: 1 addition & 4 deletions .github/workflows/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,11 @@ jobs:
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV


- uses: actions/cache@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install -r docs/requirements-docs.txt -e . pandas polars

- run: pip install -r docs/requirements-docs.txt -e . pandas "polars<0.20.8"
- run: mkdocs gh-deploy --force
2 changes: 1 addition & 1 deletion .github/workflows/random_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ jobs:
- name: install-reqs
run: python -m pip install --upgrade tox virtualenv setuptools pip && python -m pip install -r requirements-dev.txt
- name: Run pytest
run: pytest tests --cov=dataframe_api_compat --cov=tests --cov-fail-under=80
run: pytest tests --cov=dataframe_api_compat/pandas_standard --cov=dataframe_api_compat/polars_standard --cov=tests --cov-fail-under=80
23 changes: 19 additions & 4 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,32 @@ jobs:
key: ${{ runner.os }}-build-${{ matrix.python-version }}
- name: install-reqs
run: python -m pip install --upgrade tox virtualenv setuptools pip -r requirements-dev.txt
- name: Run pytest
run: pytest tests --cov=dataframe_api_compat --cov=tests --cov-fail-under=100
- name: Run pytest for pandas and polars
run: |
pytest tests --cov=dataframe_api_compat/pandas_standard --cov=tests --cov-append --cov-fail-under=50 --cov-report= --library pandas-numpy
pytest tests --cov=dataframe_api_compat/pandas_standard --cov=tests --cov-append --cov-fail-under=50 --cov-report= --library pandas-nullable
pytest tests --cov=dataframe_api_compat/polars_standard --cov=tests --cov-append --cov-fail-under=95 --library polars-lazy
- name: install type-checking reqs
run: python -m pip install 'git+https://github.com/data-apis/dataframe-api.git#egg=dataframe_api&subdirectory=spec/API_specification' mypy typing-extensions
- name: run mypy
run: mypy dataframe_api_compat tests
run: mypy dataframe_api_compat/pandas_standard dataframe_api_compat/polars_standard
- name: run polars integration tests
run: pip uninstall pandas -y && pytest tests/integration/upstream_test.py::TestPolars && pip install -U pandas
- name: run pandas integration tests
run: pip uninstall polars -y && pytest tests/integration/upstream_test.py::TestPandas

- name: Update env for modin
run: |
python -m pip uninstall -r requirements-dev.txt -y
python -m pip install -r requirements-dev-modin.txt
- name: Run pytest for modin
run: |
pytest tests --cov=dataframe_api_compat/modin_standard --cov=tests --cov-append --cov-fail-under=100 --library modin
- name: install type-checking reqs
run: python -m pip install 'git+https://github.com/data-apis/dataframe-api.git#egg=dataframe_api&subdirectory=spec/API_specification' mypy typing-extensions
- name: run mypy
run: |
mypy dataframe_api_compat/modin_standard
mypy tests --follow-imports silent
tox-all-supported:
strategy:
matrix:
Expand Down
18 changes: 12 additions & 6 deletions dataframe_api_compat/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
from __future__ import annotations

import contextlib
import importlib
from typing import TYPE_CHECKING

with contextlib.suppress(ModuleNotFoundError):
from dataframe_api_compat import pandas_standard
if TYPE_CHECKING:
from types import ModuleType

with contextlib.suppress(ModuleNotFoundError):
from dataframe_api_compat import polars_standard
__all__ = ["pandas_standard", "polars_standard", "modin_standard"]


def __getattr__(name: str) -> ModuleType:
if name in __all__:
return importlib.import_module("." + name, __name__)
msg = f"module {__name__!r} has no attribute {name!r}"
raise AttributeError(msg)

__all__ = ["pandas_standard", "polars_standard"]

__version__ = "0.2.6"
Loading