Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improve CI #103

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 2 additions & 6 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ jobs:
pandas-version: "none"
- python-version: "3.13"
pandas-version: "2.2.*"
# https://github.com/pandas-dev/pandas/issues/60016
- python-version: "3.13"
pandas-version: "none"
pandas-version: "2.2.*"
disable-gil: true

runs-on: ubuntu-latest
Expand Down Expand Up @@ -128,10 +127,7 @@ jobs:
py
${{ env.pythonLocation }}

- run: pip install pre-commit
if: steps.cache-py.outputs.cache-hit != 'true'

- run: pip install .
- run: pip install .[dev]
if: steps.cache-py.outputs.cache-hit != 'true'

- run: pip freeze
Expand Down
15 changes: 10 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,18 @@ repos:
rev: 24.1.1
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
- repo: local
hooks:
- id: mypy
additional_dependencies:
- pandas-stubs
exclude: ^tests/.*$
name: mypy
entry: mypy
language: python
pass_filenames: false
- id: mypy-stubtest
name: stubtest python_calamine
entry: mypy
language: python
pass_filenames: false
- repo: local
hooks:
- id: rust-linting
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ dynamic = ["version"]
dev = [
"maturin~=1.0",
"pre-commit~=3.0",
"mypy~=1.13",
"pytest~=8.0",
"pandas[excel]~=2.0",
"numpy~=1.0",
"pandas[excel]~=2.2",
"pandas-stubs~=2.2",
]

[tool.isort]
Expand All @@ -31,6 +32,7 @@ multi_line_output = 3
profile = "black"

[tool.mypy]
files = ["python"]
python_version = "3.8"
ignore_missing_imports = false
disallow_untyped_defs = true
Expand Down
8 changes: 6 additions & 2 deletions python/python_calamine/pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@
import pandas as pd
from packaging.version import Version, parse
from pandas._typing import Scalar
from pandas.compat._optional import import_optional_dependency
from pandas.core.shared_docs import _shared_docs
from pandas.compat._optional import ( # type:ignore[import-untyped] # missing in pandas-stubs
import_optional_dependency,
)
from pandas.core.shared_docs import ( # type:ignore[import-untyped] # missing in pandas-stubs
_shared_docs,
)
from pandas.io.excel import ExcelFile
from pandas.io.excel._base import ( # type:ignore[attr-defined] # missing in pandas-stubs
BaseExcelReader,
Expand Down
Loading