Skip to content

Commit

Permalink
Support for Py312 (#59)
Browse files Browse the repository at this point in the history
* Bridge docstring update

* Updates to GH actions

* Dependency updates

* Support for py312
  • Loading branch information
venaturum authored Jun 25, 2024
1 parent 8767230 commit a12ec94
Show file tree
Hide file tree
Showing 11 changed files with 2,220 additions and 1,794 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ jobs:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.7', '3.8', '3.10', '3.11']
python-version: ['3.8', '3.10', '3.11', '3.12']
defaults:
run:
shell: bash

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
Expand All @@ -44,19 +44,19 @@ jobs:
run: poetry run flake8 ./piso
- name: Test with pytest
run: |
poetry run pytest ./tests --junitxml=junit/test-results-${{ matrix.python-version }}.xml --cov=piso --cov-report=xml
poetry run pytest ./tests --junitxml=junit/test-results-${{ matrix.platform }}-${{ matrix.python-version }}.xml --cov=piso --cov-report=xml
codecov
- name: Upload pytest test results
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: pytest-results-${{ matrix.python-version }}
path: junit/test-results-${{ matrix.python-version }}.xml
name: pytest-results-${{ matrix.platform }}-${{ matrix.python-version }}
path: junit/test-results-${{ matrix.platform }}-${{ matrix.python-version }}.xml
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
fail_ci_if_error: false


4 changes: 2 additions & 2 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
group: ${{ github.ref }}-pre-commit
cancel-in-progress: ${{github.event_name == 'pull_request'}}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/action@v3.0.0
3 changes: 3 additions & 0 deletions docs/release_notes/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
Release notes
========================

- support for Python 3.12 added
- support for Python 3.7 removed

ADD UNRELEASED CHANGES ABOVE THIS LINE

**v1.0.0 2023-07-05**
Expand Down
2 changes: 1 addition & 1 deletion piso/docstrings/accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,7 @@ def join_params(list_of_param_strings):
or equal to the threshold. Overlapping intervals will be merged, regardless of threshold value.
The intervals are contained in the object the accessor belongs to. They may be left-closed,
right-closed, both, or neither, and contain overlapping intervals.
or right-closed, and contain overlapping intervals.
Parameters
----------
Expand Down
4 changes: 2 additions & 2 deletions piso/docstrings/intervalarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -899,8 +899,8 @@ def join_params(list_of_param_strings):
Given a set of intervals, and a threshold, merges intervals which are separated by a gap less than
or equal to the threshold. Overlapping intervals will be merged, regardless of threshold value.
The intervals are contained in the object the accessor belongs to. They may be left-closed,
right-closed, both, or neither, and contain overlapping intervals.
The intervals are contained in the object the accessor belongs to. They may be left-closed or
right-closed, and contain overlapping intervals.
Parameters
----------
Expand Down
2 changes: 1 addition & 1 deletion piso/ndframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def _get_indexers(*dfs):


def _handle_overlapping_columns(frames, suffixes):
col_counts = pd.Series.value_counts(list(itertools.chain.from_iterable(frames)))
col_counts = pd.Series(list(itertools.chain.from_iterable(frames))).value_counts()
common_columns = col_counts[col_counts > 1].index
if len(common_columns) > 0:
if len(suffixes) != len(frames):
Expand Down
3,927 changes: 2,171 additions & 1,756 deletions poetry.lock

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Poetry pyproject.toml: https://python-poetry.org/docs/pyproject/

[build-system]
requires = ["poetry>=1.0"]
build-backend = "poetry.masonry.api"
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "piso"
Expand Down Expand Up @@ -32,30 +32,30 @@ keywords=[
classifiers=[
'Operating System :: OS Independent',
'Intended Audience :: Science/Research',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Topic :: Scientific/Engineering',
]


[tool.poetry.dependencies]
python = "^3.7"
python = "^3.8"
staircase = "^2.1.0"

[[tool.poetry.dependencies.pandas]]
python = ">=3.7,<3.10"
python = ">=3.8,<3.10"
version = "^1"

[[tool.poetry.dependencies.pandas]]
python = "^3.10"
version = ">=1.3.4,<3"

[[tool.poetry.dependencies.numpy]]
python = ">=3.7,<3.10"
version = "^1.15"
python = ">=3.8,<3.10"
version = "^1.17"

[[tool.poetry.dependencies.numpy]]
python = "^3.10"
Expand All @@ -64,7 +64,7 @@ version = "^1.21.2"

[tool.poetry.dev-dependencies]
ipykernel = "^6"
pytest = "^6"
pytest = "^8"
pytest-cov = "*"
sphinx = "*"
nbsphinx = ">=0.8.5"
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[flake8]
max-line-length = 88
ignore = E203, E231, E402, E501, F401, W503
ignore = E203, E231, E402, E501, F401, W503, W604
exclude = docs
Empty file added tests/__init__.py
Empty file.
36 changes: 22 additions & 14 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
[tox]
isolated_build=true
envlist =
py{37}-pandas{10,11}-numpy{115,116,117,118,119,120,121}
py{37}-pandas{12}-numpy{116,117,118,119,120,121}
py{37}-pandas{13}-numpy{117,118,119,120,121}
py{38}-pandas{10,11,12,13}-numpy{117,118,119,120,121,122,123}
py{38}-pandas{14}-numpy{118,119,120,121,122,123}
py{38}-pandas{15}-numpy{120,121,122,123}
py{39}-pandas{11,12,13,14}-numpy{119,120,121,122,123}
py{39}-pandas{15}-numpy{120,121,122,123}
py{310}-pandas{13,14,15}-numpy{121,122,123}

py{38}-pandas{11,12,13}-numpy{118,119,120,121,122,123,124}
py{38}-pandas{14}-numpy{118,119,120,121,122,123,124}
py{38}-pandas{15}-numpy{120,121,122,123,124}
py{39}-pandas{11,12,13}-numpy{120,121,122,123,124,125,126}
py{39}-pandas{14}-numpy{120,121,122,123,124,125,126}
py{39}-pandas{15}-numpy{120,121,122,123,124,125,126}
py{310}-pandas{13,14,15}-numpy{122,123,124,125,126}
py{310}-pandas{20}-numpy{122,123,124,125,126}
py{310}-pandas{21,22}-numpy{122,123,124,125,126}
py{311}-pandas{20}-numpy{124,125,126}
py{311}-pandas{21,22}-numpy{124,125,126}
py{312}-pandas{21,22}-numpy{126}
skipdist = true

[testenv]
deps =
staircase
pytest
pytest-cov
pandas10: pandas>=1.0,<1.1
Expand All @@ -22,15 +26,19 @@ deps =
pandas13: pandas>=1.3,<1.4
pandas14: pandas>=1.4,<1.5
pandas15: pandas>=1.5,<1.6
numpy115: numpy>=1.15,<1.16
numpy116: numpy>=1.16,<1.17
pandas20: pandas>=2.0,<2.1
pandas21: pandas>=2.1,<2.2
pandas22: pandas>=2.2,<2.3
numpy117: numpy>=1.17,<1.18
numpy118: numpy>=1.18,<1.19
numpy119: numpy>=1.19,<1.20
numpy120: numpy>=1.20,<1.21
numpy121: numpy>=1.21,<1.22
numpy122: numpy>=1.22,<1.23
numpy123: numpy>=1.23,<1.24
skip_install = false
numpy124: numpy>=1.24,<1.25
numpy125: numpy>=1.25,<1.26
numpy126: numpy>=1.26,<1.27
skip_install = true
commands =
pytest tests/
pytest tests/

0 comments on commit a12ec94

Please sign in to comment.