Skip to content

Commit

Permalink
MAINT: fix version conflict (#48)
Browse files Browse the repository at this point in the history
* address seaborn 0.13 error
* various GHA updates
* require pandas >= 1.3
* address #38
  • Loading branch information
stefan-jansen authored May 14, 2024
1 parent 9f31abe commit a013587
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 14 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ name: PyPI
on:
workflow_dispatch:
inputs:
publish_to_pypi:
description: 'Publish to PyPI?'
target:
type: choice
description: 'Package Index'
required: true
type: string
default: 'false'
default: 'PYPI'
options: [ 'TESTPYPI', 'PYPI' ]

jobs:
dist:
Expand All @@ -23,8 +24,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: '0.9.7'

ref: 0.9.7

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
Expand Down Expand Up @@ -52,16 +52,16 @@ jobs:
path: dist

- name: publish to testpypi
if: ${{ github.event.inputs.target == 'TESTPYPI' }}
uses: pypa/gh-action-pypi-publish@release/v1
if: ${{ inputs.publish_to_pypi == 'false' }}
with:
user: __token__
password: ${{ secrets.TESTPYPI_TOKEN }}
repository_url: https://test.pypi.org/legacy/

- name: publish to pypi
if: ${{ github.event.inputs.target == 'PYPI' }}
uses: pypa/gh-action-pypi-publish@release/v1
if: ${{ inputs.publish_to_pypi == 'true' }}
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:

jobs:
build:
name: Unit Tests for ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ repos:
- id: trailing-whitespace
- id: check-added-large-files

- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.1
- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
hooks:
- id: flake8

Expand Down
4 changes: 1 addition & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ extend-exclude = '''
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py39-pandas{11,12},py{39,310}-pandas{13,14,15}, py{39,310, 311,312}-pandas{20,21,22}
envlist = py{39,310}-pandas{13,14,15}, py{39,310, 311,312}-pandas{20,21,22}
isolated_build = True
skip_missing_interpreters = True
minversion = 3.23.0
Expand All @@ -154,8 +154,6 @@ setenv =
changedir = tmp
extras = test
deps =
pandas11: pandas>=1.1.0,<1.2
pandas12: pandas>=1.2.0,<1.3
pandas13: pandas>=1.3.0,<1.4
pandas14: pandas>=1.4.0,<1.5
pandas15: pandas>=1.5.0,<1.6
Expand Down
2 changes: 1 addition & 1 deletion src/pyfolio/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ def cone(in_sample_returns (pd.Series),
ax.yaxis.set_major_formatter(FuncFormatter(y_axis_formatter))

if factor_returns is not None:
cum_factor_returns = ep.cum_returns(factor_returns[cum_rets.index], 1.0)
cum_factor_returns = ep.cum_returns(factor_returns.loc[cum_rets.index], 1.0)
cum_factor_returns.plot(
lw=2,
color="gray",
Expand Down

0 comments on commit a013587

Please sign in to comment.