Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: Python 3.11, src layout, and other updates #25

Merged
merged 4 commits into from
Jan 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[flake8]
exclude =
.git,
.pytest_cache
conda,
_sources,
__pycache__,
docs/source/conf.py,
src/pyfolio/_version.py
max-line-length = 88
max-complexity = 18
select = B,C,E,F,W,T4,B9
ignore = E203, E266, E501, W503, F403, F401, E231
25 changes: 13 additions & 12 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ name: PyPI
on:
workflow_dispatch:
inputs:
target:
description: 'Package Index'
publish_to_pypi:
description: 'Publish to PyPI?'
required: true
default: 'TESTPYPI'
release:
types:
- published
type: boolean
default: 'false'

jobs:
dist:
Expand All @@ -18,7 +16,7 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
python-version: [ 3.8 ]
python-version: [ 3.10 ]

steps:
- name: Checkout pyfolio
Expand All @@ -45,21 +43,24 @@ jobs:
upload_pypi:
needs: [ dist ]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist

- name: publish to testpypi
uses: pypa/gh-action-pypi-publish@master
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
uses: pypa/gh-action-pypi-publish@master
if: ${{ github.event.inputs.target }} == 'PYPI' || (github.event_name == 'release' && github.event.action == 'published')
uses: pypa/gh-action-pypi-publish@release/v1
if: inputs.publish_to_pypi == 'true'
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-latest , windows-latest, macos-latest ]
python-version: [ 3.7, 3.8, 3.9 ]
python-version: [ 3.8, 3.9, '3.10', '3.11']
steps:
- name: Checkout pyfolio
uses: actions/checkout@v2
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,4 @@ target/
.ipynb_checkpoints/

.idea
src/pyfolio/_version.py
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ repos:
- id: check-merge-conflict
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-added-large-files

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

- repo: https://github.com/psf/black
rev: 20.8b1
rev: 22.3.0
hooks:
- id: black

Expand Down
Loading