diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 88cbf9ec..ca184268 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -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: @@ -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 @@ -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 }} diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 11004029..01f19f51 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -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 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 67c53bd6..3661da20 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 diff --git a/pyproject.toml b/pyproject.toml index f0420202..8fe4f003 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 @@ -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 diff --git a/src/pyfolio/plotting.py b/src/pyfolio/plotting.py index 361f84c9..8e3cc149 100644 --- a/src/pyfolio/plotting.py +++ b/src/pyfolio/plotting.py @@ -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",