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 Jul 5, 2023
2 parents 3bf3a75 + 21f6b73 commit d24cd13
Show file tree
Hide file tree
Showing 21 changed files with 2,538 additions and 1,345 deletions.
27 changes: 22 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,35 @@ jobs:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.6, 3.7, 3.8, 3.9]

python-version: ['3.7', '3.8', '3.10', '3.11']
defaults:
run:
shell: bash

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Upgrade pip
run: |
python -m pip install --upgrade pip
python -m pip install poetry codecov
- name: Install codecov
run: |
python -m pip install codecov
- name: Install poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y
echo "/Users/runner/.local/bin" >> $GITHUB_PATH
- name: Update PATH
if: ${{ matrix.platform != 'windows-latest' }}
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Update Path for Windows
if: ${{ matrix.platform == 'windows-latest' }}
run: echo "$APPDATA\Python\Scripts" >> $GITHUB_PATH
- name: Install dependencies
run: |
poetry install
- name: Lint with flake8
run: poetry run flake8 ./piso
Expand All @@ -37,7 +54,7 @@ jobs:
# 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@v1
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
Expand Down
6 changes: 3 additions & 3 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@v2
- uses: actions/setup-python@v2
- uses: pre-commit/action@v2.0.0
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/action@v3.0.0
139 changes: 139 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
junit.xml

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# VS Code
.vscode

#temp ignores
READMEold.md
*.ipynb
docs - copy/
.idea
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
repos:
- repo: https://github.com/pycqa/isort
rev: 5.10.1
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]
name: isort
- repo: https://github.com/psf/black
rev: 22.3.0
rev: 22.10.0
hooks:
- id: black
exclude: ^piso/test_data*
- repo: https://gitlab.com/pycqa/flake8
rev: 4.0.1
- repo: https://github.com/pycqa/flake8
rev: 5.0.4
hooks:
- id: flake8
11 changes: 11 additions & 0 deletions docs/general_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ipykernel
sphinx
nbsphinx
sphinx-panels
staircase >= 2.1
pandas
numpy
Pygments
pydata-sphinx-theme
toml
numpydoc
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.0.0 2023-07-05**

- Compatibility with pandas 2
- Better handling of empty intervals in set operations (#GH56)


**v0.9.0 2022-05-04**

- Extended :func:`piso.adjacency_matrix` and :meth:`ArrayAccessor.adjacency_matrix() <piso.accessor.ArrayAccessor.adjacency_matrix>` to take multiple interval array parameters
Expand Down
2 changes: 1 addition & 1 deletion docs/user_guide/case_studies/football_staircase.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Analysis of scores in a football match (using staircase)
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
plt.style.use('seaborn')
plt.style.use('seaborn-v0_8')
This example demonstrates how :mod:`staircase` can be used to mirror the functionality
and analysis presented in the :ref:`corresponding example with piso <user_guide.football_example>`.
Expand Down
2 changes: 1 addition & 1 deletion docs/user_guide/case_studies/tax.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Estimating tax payable
:suppress:
import matplotlib.pyplot as plt
plt.style.use('seaborn')
plt.style.use('seaborn-v0_8')
In this example we are given the following scenario:

Expand Down
Loading

0 comments on commit d24cd13

Please sign in to comment.