Skip to content

Commit

Permalink
v0.9.7 (#47)
Browse files Browse the repository at this point in the history
* fix GHA workflows
* address seaborn 0.13 error
  • Loading branch information
stefan-jansen authored May 14, 2024
1 parent c577c5a commit 9f31abe
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 11 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
publish_to_pypi:
description: 'Publish to PyPI?'
required: true
type: boolean
default: false
type: string
default: 'false'

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


- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
Expand Down Expand Up @@ -51,15 +53,15 @@ jobs:

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

- name: publish to pypi
uses: pypa/gh-action-pypi-publish@release/v1
if: ${{ inputs.publish_to_pypi == true }}
if: ${{ inputs.publish_to_pypi == 'true' }}
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
19 changes: 14 additions & 5 deletions .github/workflows/test_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,17 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install wheel
run: |
pip install -U pip wheel
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple pyfolio-reloaded[test]
pytest tests
- name: Checkout pyfolio
uses: actions/checkout@v4

- name: Unittests with tox & pytest
uses: nick-fields/retry@v3
with:
timeout_minutes: 90
max_attempts: 3
retry_on: error
new_command_on_retry: |
python -m pip install -U pip wheel tox tox-gh-actions
python -m pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple pyfolio-reloaded[test]
tox
command: tox -p auto -q
2 changes: 1 addition & 1 deletion src/pyfolio/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -1377,7 +1377,7 @@ def plot_return_quantiles(returns, live_start_date=None, ax=None, **kwargs):
is_weekly = ep.aggregate_returns(is_returns, "weekly")
is_monthly = ep.aggregate_returns(is_returns, "monthly")
sns.boxplot(
data=[is_returns, is_weekly, is_monthly],
data=[is_returns.values, is_weekly.values, is_monthly.values],
palette=["#4c72B0", "#55A868", "#CCB974"],
ax=ax,
**kwargs,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_tears.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class PositionsTestCase(TestCase):
@parameterized.expand(
[
({},),
# ({"slippage": 1},),
({"slippage": 1},),
({"live_start_date": test_returns.index[-20]},),
({"round_trips": True},),
({"hide_positions": True},),
Expand Down

0 comments on commit 9f31abe

Please sign in to comment.