Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
staircase-dev committed Jun 25, 2024
2 parents a9d1cf5 + b7a859d commit fa1086b
Show file tree
Hide file tree
Showing 16 changed files with 2,316 additions and 1,808 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/[email protected]
3 changes: 2 additions & 1 deletion docs/general_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ipykernel
sphinx
sphinx >= 5
nbsphinx
sphinx-panels
staircase >= 2.1
Expand All @@ -9,3 +9,4 @@ Pygments
pydata-sphinx-theme
toml
numpydoc
matplotlib >= 3.7
6 changes: 6 additions & 0 deletions docs/release_notes/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ Release notes
========================


**v1.1.0 2024-06-25**

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


**v1.0.0 2023-07-05**

- Compatibility with pandas 2
Expand Down
97 changes: 86 additions & 11 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,86 @@
ipykernel
sphinx
nbsphinx
sphinx-panels
staircase >= 2.1
pandas
numpy
Pygments
pydata-sphinx-theme
toml
numpydoc
accessible-pygments==0.0.5
alabaster==0.7.16
appnope==0.1.4
asttokens==2.4.1
attrs==23.2.0
Babel==2.15.0
beautifulsoup4==4.12.3
bleach==6.1.0
certifi==2024.6.2
charset-normalizer==3.3.2
comm==0.2.2
contourpy==1.2.1
cycler==0.12.1
debugpy==1.8.1
decorator==5.1.1
defusedxml==0.7.1
docutils==0.21.2
executing==2.0.1
fastjsonschema==2.20.0
fonttools==4.53.0
idna==3.7
imagesize==1.4.1
ipykernel==6.29.4
ipython==8.25.0
jedi==0.19.1
Jinja2==3.1.4
jsonschema==4.22.0
jsonschema-specifications==2023.12.1
jupyter_client==8.6.2
jupyter_core==5.7.2
jupyterlab_pygments==0.3.0
kiwisolver==1.4.5
MarkupSafe==2.1.5
matplotlib==3.9.0
matplotlib-inline==0.1.7
mistune==3.0.2
nbclient==0.10.0
nbconvert==7.16.4
nbformat==5.10.4
nbsphinx==0.9.4
nest-asyncio==1.6.0
numpy==1.26.4
numpydoc==1.7.0
packaging==24.1
pandas==2.2.2
pandocfilters==1.5.1
parso==0.8.4
pexpect==4.9.0
pillow==10.3.0
platformdirs==4.2.2
prompt_toolkit==3.0.47
psutil==6.0.0
ptyprocess==0.7.0
pure-eval==0.2.2
pydata-sphinx-theme==0.15.3
Pygments==2.18.0
pyparsing==3.1.2
python-dateutil==2.9.0.post0
pytz==2024.1
pyzmq==26.0.3
referencing==0.35.1
requests==2.32.3
rpds-py==0.18.1
six==1.16.0
snowballstemmer==2.2.0
soupsieve==2.5
Sphinx==7.3.7
sphinx-panels==0.4.1
sphinxcontrib-applehelp==1.0.8
sphinxcontrib-devhelp==1.0.6
sphinxcontrib-htmlhelp==2.0.5
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.7
sphinxcontrib-serializinghtml==1.1.10
stack-data==0.6.3
staircase==2.6.0
tabulate==0.9.0
tinycss2==1.3.0
toml==0.10.2
tornado==6.4.1
traitlets==5.14.3
typing_extensions==4.12.2
tzdata==2024.1
urllib3==2.2.2
wcwidth==0.2.13
webencodings==0.5.1
1 change: 1 addition & 0 deletions docs/user_guide/case_studies/calendar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ and where the values are instances of :class:`pandas.arrays.IntervalArray` and h
df["end"],
closed="left",
),
include_groups=False,
)
)
meetings
Expand Down
3 changes: 2 additions & 1 deletion docs/user_guide/case_studies/football.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ Using this dataframe we will now provide answers for miscellaneous questions. I
.. ipython:: python
CvsL.groupby("half").apply(
lambda df: df.query("score_liverpool - score_chelsea == 1").index.length.sum()
lambda df: df.query("score_liverpool - score_chelsea == 1").index.length.sum(),
include_groups=False,
)
**What was the score at the 80 minute mark?**
Expand Down
1 change: 1 addition & 0 deletions docs/user_guide/case_studies/maintenance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ where the values are instances of :class:`pandas.arrays.IntervalArray`.
df["end"],
closed="left",
),
include_groups=False,
)
)
maintenance
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
Loading

0 comments on commit fa1086b

Please sign in to comment.