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

RELEASE: v2.3 #146

Merged
merged 71 commits into from
Nov 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
3653089
moving to PEP517
stefan-jansen Nov 18, 2022
3a48bc1
from versioneer to setuptools_scm
stefan-jansen Nov 18, 2022
4ba3cd9
also remove html files generated by Cython
stefan-jansen Nov 18, 2022
931ee4f
package_data to pyproject.toml
stefan-jansen Nov 18, 2022
7fc1185
switch to setuptools_scm
stefan-jansen Nov 18, 2022
241dafd
removing obsolete setup.cfg
stefan-jansen Nov 18, 2022
a8aacff
update all actions
stefan-jansen Nov 18, 2022
114ddd7
talib installs from script
stefan-jansen Nov 18, 2022
ad723f1
flake8 config to .flake8
stefan-jansen Nov 18, 2022
fea31ef
remove TA-Lib constraint and change quick tests to 3.10
stefan-jansen Nov 18, 2022
87ae4b7
remove comment
stefan-jansen Nov 18, 2022
2565f16
remove tox requires
stefan-jansen Nov 18, 2022
ab1235e
tox.ini to pyproject.toml
stefan-jansen Nov 18, 2022
c6cefd0
tox.ini to pyproject.toml
stefan-jansen Nov 18, 2022
db5bad5
tox.ini to pyproject.toml
stefan-jansen Nov 18, 2022
584ba0e
quote python versions to address missing interpreter
stefan-jansen Nov 18, 2022
199b63f
add windows wheels and streamline workflow
stefan-jansen Nov 18, 2022
07137ef
fix upload step
stefan-jansen Nov 18, 2022
0f9a339
update deps
stefan-jansen Nov 18, 2022
1dddcc3
add missing windows talib build script
stefan-jansen Nov 18, 2022
5dd0fa1
run build scripts before all AND tests
stefan-jansen Nov 19, 2022
81cd59b
run correct build scripts
stefan-jansen Nov 19, 2022
0d0cd72
run python -m pip
stefan-jansen Nov 19, 2022
cca682f
fix windows wheels arch
stefan-jansen Nov 19, 2022
228fbf8
fix windows wheels arch
stefan-jansen Nov 19, 2022
b0cdfbb
try to fix tox cmd
stefan-jansen Nov 19, 2022
6e83c3c
fix python version issue
stefan-jansen Nov 19, 2022
f807354
fix python version issue
stefan-jansen Nov 19, 2022
07451ea
fix python version issue
stefan-jansen Nov 19, 2022
d8070fc
fix python version issue
stefan-jansen Nov 19, 2022
16c3f91
fix python version issue
stefan-jansen Nov 19, 2022
df03447
fix python version issue
stefan-jansen Nov 19, 2022
b9dad30
simplify tox ini
stefan-jansen Nov 19, 2022
893f12d
fix deps
stefan-jansen Nov 19, 2022
f9ef3a9
exclude pandas>=1.4 for py37
stefan-jansen Nov 19, 2022
3dc5d24
add GHA retry step
stefan-jansen Nov 19, 2022
a1c448e
GHA retry step extend timeout
stefan-jansen Nov 19, 2022
d34959c
update talib conda to 4.25
stefan-jansen Nov 19, 2022
0cf7e0d
add c compiler
stefan-jansen Nov 19, 2022
83c8ae2
add c++ compiler
stefan-jansen Nov 19, 2022
e342f7b
add requires to tox config to avoid missing cython on retry
stefan-jansen Nov 19, 2022
e4cd2e4
set prefix in build; move reqs to host
stefan-jansen Nov 19, 2022
cd1c425
removing ubuntu deps again
stefan-jansen Nov 19, 2022
c12bfd6
sudo for permissions
stefan-jansen Nov 19, 2022
c4a7b5a
adding back ubuntu deps and sudo tar
stefan-jansen Nov 19, 2022
848fc8b
more sudo - configure
stefan-jansen Nov 19, 2022
9c3bf7a
more sudo - configure
stefan-jansen Nov 19, 2022
5fae453
back to PREFIX
stefan-jansen Nov 19, 2022
9cea01d
no more sudo
stefan-jansen Nov 19, 2022
dcfaa92
rm ldconfig
stefan-jansen Nov 20, 2022
bcc2504
still need to upload windows py39
stefan-jansen Nov 20, 2022
a96842d
build.sh mac vs linux
stefan-jansen Nov 20, 2022
e9f4228
macos with prefix?
stefan-jansen Nov 20, 2022
d6cac2f
retry windows
stefan-jansen Nov 20, 2022
4241ba0
retry
stefan-jansen Nov 20, 2022
5667362
switch to mamba
stefan-jansen Nov 20, 2022
00836cd
switch to mamba
stefan-jansen Nov 20, 2022
25d2402
switch to mamba
stefan-jansen Nov 20, 2022
b34c50d
add pytest for wheels
stefan-jansen Nov 20, 2022
8b42ef0
reinstall library before retry
stefan-jansen Nov 20, 2022
1e29e0a
fix pytest path
stefan-jansen Nov 20, 2022
e00a19d
address random CI test failures
stefan-jansen Nov 21, 2022
0764be2
address random CI test failures
stefan-jansen Nov 21, 2022
607cf0e
address random CI test failures
stefan-jansen Nov 21, 2022
2b8dd6f
address random CI test failures
stefan-jansen Nov 21, 2022
a3bedc2
add pytest reruns to overcome intermittent failures on CI
stefan-jansen Nov 21, 2022
9179218
add pytest reruns to overcome intermittent failures on CI
stefan-jansen Nov 21, 2022
6321f7f
add pytest reruns to overcome intermittent failures on CI
stefan-jansen Nov 21, 2022
386d57c
skip two tests that randomly fail on CI
stefan-jansen Nov 21, 2022
3cd503a
Merge branch 'v2.3' of github.com:stefan-jansen/zipline-reloaded into…
stefan-jansen Nov 21, 2022
9630e85
skip macos Cpy37 arm64
stefan-jansen Nov 21, 2022
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
6 changes: 6 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[flake8]
exclude = setup.py, .git, __pycache__, docs, conda, tools
max-line-length = 88
max-complexity = 18
select = B,C,E,F,W,T4,B9
ignore = E203, E266, E501, W503, F403, F401, E231
6 changes: 0 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,3 @@ updates:
directory: "/"
schedule:
interval: "weekly"
ignore:
# Official actions have moving tags like v1
# that are used, so they don't need updates here
- dependency-name: "actions/checkout"
- dependency-name: "actions/upload-artifact"
- dependency-name: "actions/download-artifact"
84 changes: 37 additions & 47 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,17 @@ on:
description: 'Package Index'
required: true
default: 'TESTPYPI'
# release:
# types:
# - published

jobs:
build_linux:
name: Wheels for py${{ matrix.python }} on ${{ matrix.os }} using ${{ matrix.manylinux_image }}
build_wheels:
name: Wheels for py${{ matrix.python }} on ${{ matrix.os }} - upload to ${{github.event.inputs.target}}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
python: [ 37, 38, 39, '310']
manylinux_image: [ manylinux2010, manylinux2014 ]
os: [ ubuntu-latest , windows-latest, macos-latest ]
python: [ 37, 38, 39, '310' ]
arch: [ auto64 ]

steps:
- name: Checkout zipline
Expand All @@ -30,55 +27,48 @@ jobs:

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Set Xcode version
uses: maxim-lobanov/setup-xcode@v1
if: ${{ matrix.os == 'macos-latest' }}
with:
xcode-version: latest-stable

- name: Build and test wheels
- name: Wheels macOS / Linux
if: runner.os != 'Windows'
uses: pypa/[email protected]
env:
CIBW_BEFORE_ALL_LINUX: >
./tools/install_talib.sh
CIBW_BEFORE_TEST_MACOS: brew install ta-lib
CIBW_ARCHS_LINUX: ${{ matrix.arch }}
CIBW_ARCHS_MACOS: x86_64 arm64
CIBW_BUILD: "cp${{ matrix.python }}-*"
CIBW_BEFORE_TEST_LINUX: >
curl -L -o ta-lib-0.4.0-src.tar.gz http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz &&
tar xvfz ta-lib-0.4.0-src.tar.gz &&
cd ta-lib &&
./configure &&
make &&
make install &&
ldconfig &&
yum install -y libtiff-devel libjpeg-devel openjpeg2-devel zlib-devel \
freetype-devel lcms2-devel libwebp-devel tcl-devel tk-devel \
harfbuzz-devel fribidi-devel libraqm-devel libimagequant-devel libxcb-devel
CIBW_SKIP: "*-musllinux_*"
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=10.15

- name: Store artifacts
uses: actions/upload-artifact@v3
- name: Install MSVC amd64
uses: ilammy/msvc-dev-cmd@v1
with:
path: wheelhouse/*.whl
arch: amd64

build_macos:
name: Wheels for py${{ matrix.python }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ macos-latest ]
python: [ 37, 38, 39, '310']

steps:
- name: Checkout zipline
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Build wheels
- name: Wheels Windows
if: runner.os == 'Windows'
uses: pypa/[email protected]
env:
CIBW_BUILD: "cp${{ matrix.python }}-*"
CIBW_ENVIRONMENT: MACOSX_DEPLOYMENT_TARGET=10.14
CIBW_BEFORE_TEST_MACOS: >
brew install freetype pkg-config gcc openssl c-blosc hdf5 ta-lib
CIBW_BUILD: "cp${{ matrix.python }}-win_amd64"
CIBW_BEFORE_TEST_WINDOWS: >
call "c:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64 &&
call ./tools/install_talib.bat

- uses: actions/upload-artifact@v3
- name: Store artifacts
uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl


build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
Expand All @@ -102,10 +92,10 @@ jobs:
path: dist/*.tar.gz

upload_pypi:
needs: [ build_linux, build_macos, build_sdist ]
needs: [ build_wheels, build_sdist ]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
Expand All @@ -120,7 +110,7 @@ jobs:

- name: publish to pypi
uses: pypa/gh-action-pypi-publish@release/v1
if: ${{ github.event.inputs.target }} == 'PYPI' || (github.event_name == 'release' && github.event.action == 'published')
if: ${{ github.event.inputs.target }} == 'PYPI' && startsWith(github.ref, 'refs/tags'
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
55 changes: 15 additions & 40 deletions .github/workflows/ci_tests_full.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI Full Tests
name: CI Tests

on:
workflow_dispatch:
Expand All @@ -11,8 +11,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.7, 3.8, 3.9, '3.10']
os: [ ubuntu-latest, windows-latest, macos-latest ]
python-version: [ '3.7', '3.8', '3.9', '3.10' ]
exclude:
- os: windows-latest
python-version: 3.9
Expand All @@ -29,62 +29,37 @@ jobs:
- name: Install TA-Lib Linux
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
curl -L -o ta-lib-0.4.0-src.tar.gz http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz &&
tar xvfz ta-lib-0.4.0-src.tar.gz &&
cd ta-lib &&
./configure &&
sudo make &&
sudo make install &&
sudo ldconfig
sudo ./tools/install_talib.sh

- name: Install TA-Lib macOS
if: ${{ matrix.os == 'macos-latest' }}
run: |
brew install freetype pkg-config gcc openssl hdf5 ta-lib c-blosc
brew install ta-lib

- name: Developer Command Prompt for Microsoft Visual C++
uses: ilammy/msvc-dev-cmd@v1

- name: Install TA-Lib Windows
if: ${{ matrix.os == 'windows-latest' }}
run: |
powershell -Command "(New-Object Net.WebClient).DownloadFile('http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-msvc.zip', 'ta-lib-0.4.0-msvc.zip')"
powershell -Command "Add-Type -AssemblyName System.IO.Compression.FileSystem;[System.IO.Compression.ZipFile]::ExtractToDirectory('ta-lib-0.4.0-msvc.zip', 'C:\')"
pushd C:\ta-lib\c\
pushd make\cdd\win32\msvc
nmake
popd
pushd make\cdr\win32\msvc
nmake
popd
pushd make\cmd\win32\msvc
nmake
popd
pushd make\cmr\win32\msvc
nmake
popd
pushd make\csd\win32\msvc
nmake
popd
pushd make\csr\win32\msvc
nmake
popd
popd
del ta-lib-0.4.0-msvc.zip
./tools/install_talib.bat

- name: Install Zipline
run: |
python -VV
python -m pip install --upgrade pip setuptools wheel
pip install tox tox-gh-actions
pip install -e .[test]
pip uninstall -y ta-lib
python -m pip install --no-cache-dir git+https://github.com/mrjbq7/ta-lib.git
python -m pip install tox tox-gh-actions
python -m pip install .[test]

- name: Lint with flake8
run: |
flake8

- name: Unittests with tox & pytest
run: |
tox -e ci_full_tests
uses: nick-fields/retry@v2
with:
timeout_minutes: 90
max_attempts: 3
retry_on: error
new_command_on_retry: python -m pip install tox tox-gh-actions .[test]
command: tox
56 changes: 15 additions & 41 deletions .github/workflows/ci_tests_quick.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI Tests
name: CI Tests - Quick

on:
workflow_dispatch:
Expand All @@ -14,10 +14,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.8]
exclude:
- os: windows-latest
python-version: 3.9
python-version: ['3.10']

steps:
- name: Checkout Zipline
Expand All @@ -31,69 +28,46 @@ jobs:
- name: Install TA-Lib Linux
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
curl -L -o ta-lib-0.4.0-src.tar.gz http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz &&
tar xvfz ta-lib-0.4.0-src.tar.gz &&
cd ta-lib &&
./configure &&
sudo make &&
sudo make install &&
sudo ldconfig
sudo ./tools/install_talib.sh

- name: Install TA-Lib macOS
if: ${{ matrix.os == 'macos-latest' }}
run: |
brew install freetype pkg-config gcc openssl hdf5 ta-lib c-blosc
brew install ta-lib

- name: Developer Command Prompt for Microsoft Visual C++
uses: ilammy/msvc-dev-cmd@v1

- name: Install TA-Lib Windows
if: ${{ matrix.os == 'windows-latest' }}
run: |
powershell -Command "(New-Object Net.WebClient).DownloadFile('http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-msvc.zip', 'ta-lib-0.4.0-msvc.zip')"
powershell -Command "Add-Type -AssemblyName System.IO.Compression.FileSystem;[System.IO.Compression.ZipFile]::ExtractToDirectory('ta-lib-0.4.0-msvc.zip', 'C:\')"
pushd C:\ta-lib\c\
pushd make\cdd\win32\msvc
nmake
popd
pushd make\cdr\win32\msvc
nmake
popd
pushd make\cmd\win32\msvc
nmake
popd
pushd make\cmr\win32\msvc
nmake
popd
pushd make\csd\win32\msvc
nmake
popd
pushd make\csr\win32\msvc
nmake
popd
popd
del ta-lib-0.4.0-msvc.zip
./tools/install_talib.bat

- name: Install Zipline
run: |
python -VV
python -m pip install --upgrade pip setuptools wheel
pip install tox tox-gh-actions
pip install -e .[test]
python -m pip install tox tox-gh-actions
python -m pip install .[test]

- name: Lint with flake8
run: |
flake8

- name: Unittests with tox & pytest
run: |
tox -e py38-pandas15
uses: nick-fields/retry@v2
with:
timeout_minutes: 90
max_attempts: 3
retry_on: error
new_command_on_retry: python -m pip install tox tox-gh-actions .[test]
command: tox -e py310-pandas15

- name: Upload coverage data to Codecov
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
fail_ci_if_error: false
name: codecov-umbrella
verbose: true
Loading