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

Prepare for pandas 2.0 update #11

Open
wants to merge 9 commits into
base: main
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
31 changes: 8 additions & 23 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,39 +11,24 @@ jobs:
strategy:
fail-fast: true
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

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

- name: Install poetry
uses: snok/install-poetry@v1
with:
version: 1.1.6
virtualenvs-create: true
virtualenvs-in-project: true

- name: Load cache
uses: actions/cache@v2
id: cache
with:
path: .venv
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: poetry install --no-interaction
- name: Install hatch
run: pip install --upgrade hatch

- name: Run mypy
run: poetry run mypy src
run: hatch run dev:mypy src

- name: Check styling
run: poetry run black . --check
run: hatch run dev:black .

- name: Run tests
run: poetry run py.test
run: hatch run dev:test
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
__pycache__
/dist
.ipynb_checkpoints
/.ruff_cache

# poetry cruft
poetry.lock

# Editor cruft
.vscode
Expand Down
32 changes: 20 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,35 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
rev: v4.4.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 19.3b0
- repo: local
hooks:
# NOTE: we make `black` a local hook because if it's installed from
# PyPI (rather than from source) then it'll run twice as fast thanks to mypyc
- id: black
- repo: https://github.com/PyCQA/isort
rev: 5.9.3
name: black
description: "Black: The uncompromising Python code formatter"
entry: black
language: python
require_serial: true
types_or: [python, pyi]
additional_dependencies: [black==23.3.0]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/charliermarsh/ruff-pre-commit
# Ruff version.
rev: "v0.0.257"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.910 # Use the sha / tag you want to point at
hooks:
- id: mypy
args: [--no-strict-optional, --ignore-missing-imports]
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.1.1
hooks:
- id: nbqa-black
- id: nbqa-pyupgrade
args: [--py36-plus]
- id: nbqa-isort
Loading