Skip to content

Commit

Permalink
Merge branch 'main' of github.com:loicdiridollou/pandas-stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
loicdiridollou committed Aug 7, 2024
2 parents 370433f + a8d3aa2 commit 79bc675
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 25 deletions.
6 changes: 6 additions & 0 deletions .github/setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ inputs:
required: true
os:
required: true
numpy-version:
required: true

runs:
using: composite
Expand Down Expand Up @@ -33,3 +35,7 @@ runs:
- name: Install project dependencies
shell: bash
run: poetry install -vvv --no-root

- name: Set numpy version
shell: bash
run: pip install numpy"${{ inputs. numpy-version }}"
45 changes: 26 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Test'
name: "Test"

on:
push:
Expand All @@ -8,7 +8,7 @@ on:
workflow_dispatch:

env:
MPLBACKEND: 'Agg'
MPLBACKEND: "Agg"

jobs:
released:
Expand All @@ -19,34 +19,41 @@ jobs:
matrix:
# Don't use macos-latest because it is arm64
os: [ubuntu-latest, windows-latest, macos-13]
python-version: ['3.9', '3.10', '3.11', '3.12']
python-version: ["3.9", "3.10", "3.11", "3.12"]
include:
- numpy-version: "<2.0"
- numpy-version: ">= 2.0"
os: ubuntu-latest

name: OS ${{ matrix.os }} - Python ${{ matrix.python-version }} - Numpy ${{ matrix.numpy-version }}

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

- name: Install project dependencies
uses: ./.github/setup
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
- name: Install project dependencies
uses: ./.github/setup
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
numpy-version: ${{ matrix.numpy-version }}

- name: Run mypy on 'tests' (using the local stubs) and on the local stubs
run: poetry run poe mypy
- name: Run mypy on 'tests' (using the local stubs) and on the local stubs
run: poetry run poe mypy

- name: Run pyright on 'tests' (using the local stubs) and on the local stubs
run: poetry run poe pyright
- name: Run pyright on 'tests' (using the local stubs) and on the local stubs
run: poetry run poe pyright

- name: Run pytest
run: poetry run poe pytest
- name: Run pytest
run: poetry run poe pytest

- name: Install pandas-stubs and run tests on the installed stubs
run: poetry run poe test_dist
- name: Install pandas-stubs and run tests on the installed stubs
run: poetry run poe test_dist

precommit:
runs-on: ubuntu-latest
timeout-minutes: 10

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

- uses: pre-commit/[email protected]
- uses: pre-commit/[email protected]
2 changes: 1 addition & 1 deletion pandas-stubs/_version.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ version_json: str = ...

def get_versions(): ...

_stub_version: Literal["2.2.2.240805"]
_stub_version: Literal["2.2.2.240807"]
7 changes: 2 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pandas-stubs"
version = "2.2.2.240805"
version = "2.2.2.240807"
description = "Type annotations for pandas"
authors = ["The Pandas Development Team <[email protected]>"]
license = "BSD-3-Clause"
Expand Down Expand Up @@ -30,10 +30,7 @@ packages = [{ "include" = "pandas-stubs" }]
[tool.poetry.dependencies]
python = ">=3.9"
types-pytz = ">= 2022.1.1"
numpy = [
{ version = ">=1.23.5,<2.0.0", python = ">=3.9,<3.12" },
{ version = ">=2.0.0", python = ">=3.12,<3.13" },
]
numpy = ">= 1.23.5"

[tool.poetry.group.dev.dependencies]
mypy = "1.10.1"
Expand Down

0 comments on commit 79bc675

Please sign in to comment.