From 9bb8c1eab6b22e2005bb976282b7c558105a18b5 Mon Sep 17 00:00:00 2001 From: Kernc Date: Wed, 28 Oct 2020 02:49:46 +0100 Subject: [PATCH 01/19] MNT: Migrate Travis CI to GitHub Actions Travis has constant backlog and its build sometimes fails to fire. Long live GH Actions! :/ --- .github/deploy-gh-pages.sh | 4 +-- .github/workflows/ci.yml | 71 ++++++++++++++++++++++++++++++++++++++ .travis.yml | 49 -------------------------- 3 files changed, 73 insertions(+), 51 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/deploy-gh-pages.sh b/.github/deploy-gh-pages.sh index bc7d3536..dc95e931 100644 --- a/.github/deploy-gh-pages.sh +++ b/.github/deploy-gh-pages.sh @@ -20,7 +20,7 @@ sitemap() { head=$(git rev-parse HEAD) -git clone -b gh-pages "https://kernc:$GH_PASSWORD@github.com/$TRAVIS_REPO_SLUG.git" gh-pages +git clone -b gh-pages "https://kernc:$GH_PASSWORD@github.com/$GITHUB_REPOSITORY.git" gh-pages mkdir -p gh-pages/doc cp -R doc/build/* gh-pages/doc/ cd gh-pages @@ -30,5 +30,5 @@ if git diff --staged --quiet; then echo "$0: No changes to commit." exit 0 fi -git commit -a -m "CI: Update docs for $TRAVIS_TAG ($head)" +git commit -a -m "CI: Update docs for ${GITHUB_REF#refs/tags/} ($head)" git push diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..7d14088a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,71 @@ +name: CI +on: + push: { branches: [master], tags: ['[0-9]+.[0-9]+.*'] } + pull_request: { branches: [master] } + schedule: [ cron: '2 2 * * 6' ] # Every Saturday, 02:02 + +jobs: + build: + name: Build + runs-on: ubuntu-18.04 + + strategy: + matrix: + python-version: [3.6, 3.7, 3.9] + include: + - python-version: 3.8 + do_coverage: true + - python-version: 3.8 + do_docs: true + + steps: + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - uses: actions/cache@v2 + name: Set up caches + with: + path: ~/.cache/pip + key: ${{ runner.os }}-py${{ matrix.python-version }} + + - name: Checkout repo + uses: actions/checkout@v2 + + - name: Install dependencies + run: | + pip install -U pip setuptools + pip install -U --pre .[test] + + - name: Install lint dependencies + if: matrix.do_coverage + run: pip install -U flake8 coverage mypy + + - name: Install docs dependencies + if: matrix.do_docs + run: pip install .[doc,test] + + - name: Test w/ Coverage, Lint + if: matrix.do_coverage + env: { BOKEH_BROWSER: none } + run: | + flake8 + mypy backtesting + time catchsegv coverage run -m backtesting.test + bash <(curl -s https://codecov.io/bash) + + - name: Test + if: ! matrix.do_coverage && ! matrix.do_test + env: { BOKEH_BROWSER: none } + run: time catchsegv python -m backtesting.test + + - name: Test docs + if: matrix.do_docs + run: time catchsegv doc/build.sh + + - name: Deploy docs + if: matrix.do_docs && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') + env: + GH_PASSWORD: ${{ secrets.GITHUB_TOKEN }} + run: .github/deploy-gh-pages.sh diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1ea4b97e..00000000 --- a/.travis.yml +++ /dev/null @@ -1,49 +0,0 @@ -os: linux -language: python -dist: bionic -cache: - pip: true -branches: - only: - - master - # Tags - - /^(\d+\.)+\d+(\.\S+)?$/ - -jobs: - fast_finish: true - include: - - python: '3.5' - - python: '3.7' - before_install: - - pip uninstall -y numpy # Avoid https://travis-ci.org/github/kernc/backtesting.py/jobs/704292730 - - - python: '3.8' - name: 'Lint, Test w/ Coverage' - before_script: - - pip install flake8 coverage mypy - script: - - flake8 - - mypy backtesting - - BOKEH_BROWSER=none catchsegv coverage run -m backtesting.test - after_success: - - bash <(curl -s https://codecov.io/bash) - - - python: '3.8' - name: 'Docs' - stage: deploy - install: - - pip install -e .[doc,test] - script: - - doc/build.sh - after_success: - - if [ "$TRAVIS_BRANCH" = "$TRAVIS_TAG" ]; then bash .github/deploy-gh-pages.sh; fi - -before_install: - - set -e - -install: - - pip install -U pip setuptools - - pip install -U --pre .[test] - -script: - - BOKEH_BROWSER=none time catchsegv python -m backtesting.test From a831cbfab8802240157e19d37e5ff5e5ba01c7b7 Mon Sep 17 00:00:00 2001 From: Kernc Date: Wed, 28 Oct 2020 03:14:21 +0100 Subject: [PATCH 02/19] Copy deploying tags docs into a separate workflow --- .github/workflows/ci.yml | 8 +------ .github/workflows/deploy-docs.yml | 37 +++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/deploy-docs.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d14088a..f16ad34c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ name: CI on: - push: { branches: [master], tags: ['[0-9]+.[0-9]+.*'] } + push: { branches: [master] } pull_request: { branches: [master] } schedule: [ cron: '2 2 * * 6' ] # Every Saturday, 02:02 @@ -63,9 +63,3 @@ jobs: - name: Test docs if: matrix.do_docs run: time catchsegv doc/build.sh - - - name: Deploy docs - if: matrix.do_docs && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') - env: - GH_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - run: .github/deploy-gh-pages.sh diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml new file mode 100644 index 00000000..a8a1cc5f --- /dev/null +++ b/.github/workflows/deploy-docs.yml @@ -0,0 +1,37 @@ +name: Deploy docs +on: + push: + tags: ['[0-9]+.[0-9]+.*'] + +jobs: + deploy: + name: Deploy + runs-on: ubuntu-latest + + steps: + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - uses: actions/cache@v2 + name: Set up caches + with: + path: ~/.cache/pip + key: ${{ runner.os }} + + - name: Checkout repo + uses: actions/checkout@v2 + + - name: Install dependencies + run: | + pip install -U pip setuptools + pip install -U .[doc,test] + + - name: Build docs + run: time catchsegv doc/build.sh + + - name: Deploy docs + env: + GH_PASSWORD: ${{ secrets.GITHUB_TOKEN }} + run: .github/deploy-gh-pages.sh From 6d73a9b5291fd1dceb7a804ef76a565e0f962e29 Mon Sep 17 00:00:00 2001 From: Kernc Date: Wed, 28 Oct 2020 03:32:08 +0100 Subject: [PATCH 03/19] fix yml: https://github.com/kernc/backtesting.py/actions/runs/332715564 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f16ad34c..6bbc56cd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,7 +56,7 @@ jobs: bash <(curl -s https://codecov.io/bash) - name: Test - if: ! matrix.do_coverage && ! matrix.do_test + if: '! matrix.do_coverage && ! matrix.do_test' env: { BOKEH_BROWSER: none } run: time catchsegv python -m backtesting.test From 183621bbbfcd03aa1bb09992a047a7b596569cca Mon Sep 17 00:00:00 2001 From: Kernc Date: Wed, 28 Oct 2020 03:38:45 +0100 Subject: [PATCH 04/19] fix docs build with -e --- .github/workflows/ci.yml | 2 +- backtesting/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6bbc56cd..e0bf25cc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: - name: Install docs dependencies if: matrix.do_docs - run: pip install .[doc,test] + run: pip install -e .[doc,test] # -e provides _version.py for pdoc - name: Test w/ Coverage, Lint if: matrix.do_coverage diff --git a/backtesting/__init__.py b/backtesting/__init__.py index 7d7ac1ba..7a0c8072 100644 --- a/backtesting/__init__.py +++ b/backtesting/__init__.py @@ -48,7 +48,7 @@ try: from ._version import version as __version__ # noqa: F401 except ImportError: - pass # Package not installed + __version__ = '?.?.?' # Package not installed from .backtesting import Backtest, Strategy # noqa: F401 from . import lib # noqa: F401 From 710c869cf726833c806ed740c43c79d9fcf03a6a Mon Sep 17 00:00:00 2001 From: Kernc Date: Wed, 28 Oct 2020 03:40:42 +0100 Subject: [PATCH 05/19] pip install wheel --- .github/workflows/ci.yml | 2 +- .github/workflows/deploy-docs.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e0bf25cc..5de17005 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: - name: Install dependencies run: | - pip install -U pip setuptools + pip install -U pip setuptools wheel pip install -U --pre .[test] - name: Install lint dependencies diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index a8a1cc5f..a8ca9bcb 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -25,7 +25,7 @@ jobs: - name: Install dependencies run: | - pip install -U pip setuptools + pip install -U pip setuptools wheel pip install -U .[doc,test] - name: Build docs From aefe38365623a3b96e6fe17baf2e84ffec99acee Mon Sep 17 00:00:00 2001 From: Kernc Date: Wed, 28 Oct 2020 03:50:08 +0100 Subject: [PATCH 06/19] it's late --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5de17005..4c48bfdb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,7 +56,7 @@ jobs: bash <(curl -s https://codecov.io/bash) - name: Test - if: '! matrix.do_coverage && ! matrix.do_test' + if: '! matrix.do_coverage && ! matrix.do_docs' env: { BOKEH_BROWSER: none } run: time catchsegv python -m backtesting.test From da43ba15de55fc865ee8fd53f9e498af6ef9c4d6 Mon Sep 17 00:00:00 2001 From: Kernc Date: Wed, 28 Oct 2020 03:52:47 +0100 Subject: [PATCH 07/19] Make test type a parameter, becasuse it's shown in the UI --- .github/workflows/ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4c48bfdb..b98ee00c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,9 +14,9 @@ jobs: python-version: [3.6, 3.7, 3.9] include: - python-version: 3.8 - do_coverage: true + test-type: lint - python-version: 3.8 - do_docs: true + test-type: docs steps: - name: Set up Python ${{ matrix.python-version }} @@ -39,15 +39,15 @@ jobs: pip install -U --pre .[test] - name: Install lint dependencies - if: matrix.do_coverage + if: matrix.test-type == 'lint' run: pip install -U flake8 coverage mypy - name: Install docs dependencies - if: matrix.do_docs + if: matrix.test-type == 'docs' run: pip install -e .[doc,test] # -e provides _version.py for pdoc - name: Test w/ Coverage, Lint - if: matrix.do_coverage + if: matrix.test-type == 'lint' env: { BOKEH_BROWSER: none } run: | flake8 @@ -56,10 +56,10 @@ jobs: bash <(curl -s https://codecov.io/bash) - name: Test - if: '! matrix.do_coverage && ! matrix.do_docs' + if: '! matrix.test-type' env: { BOKEH_BROWSER: none } run: time catchsegv python -m backtesting.test - name: Test docs - if: matrix.do_docs + if: matrix.test-type == 'docs' run: time catchsegv doc/build.sh From 60e5428fb872f2f74ef069b04ecd40e85834498f Mon Sep 17 00:00:00 2001 From: Kernc Date: Wed, 28 Oct 2020 03:54:47 +0100 Subject: [PATCH 08/19] Remove Py3.9 testing: It's new and weird https://github.com/kernc/backtesting.py/runs/1318477083 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b98ee00c..011faf27 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: - python-version: [3.6, 3.7, 3.9] + python-version: [3.6, 3.7] include: - python-version: 3.8 test-type: lint From e567ce7dbdd17afec979d2298188e7de8c54273b Mon Sep 17 00:00:00 2001 From: Kernc Date: Wed, 28 Oct 2020 04:20:55 +0100 Subject: [PATCH 09/19] Fetch tags for correct __version__ --- .github/workflows/ci.yml | 3 +++ .github/workflows/deploy-docs.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 011faf27..5667b0e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,6 +32,9 @@ jobs: - name: Checkout repo uses: actions/checkout@v2 + with: + fetch-depth: 3 + - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* - name: Install dependencies run: | diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index a8ca9bcb..8a2bff2e 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -22,6 +22,9 @@ jobs: - name: Checkout repo uses: actions/checkout@v2 + with: + fetch-depth: 3 + - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* - name: Install dependencies run: | From a5371179b326959010109a3b1fd9e7229d8e9cbe Mon Sep 17 00:00:00 2001 From: Kernc Date: Thu, 29 Oct 2020 23:26:47 +0100 Subject: [PATCH 10/19] test deploy-docs workflow ... --- .github/deploy-gh-pages.sh | 5 ++++- .github/workflows/deploy-docs.yml | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/deploy-gh-pages.sh b/.github/deploy-gh-pages.sh index dc95e931..cb6bddbe 100644 --- a/.github/deploy-gh-pages.sh +++ b/.github/deploy-gh-pages.sh @@ -31,4 +31,7 @@ if git diff --staged --quiet; then exit 0 fi git commit -a -m "CI: Update docs for ${GITHUB_REF#refs/tags/} ($head)" -git push + + + +git push --dry-run diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 8a2bff2e..1e06c644 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -2,6 +2,7 @@ name: Deploy docs on: push: tags: ['[0-9]+.[0-9]+.*'] + pull_request: { branches: [master] } jobs: deploy: From 618f22a455fe36c86d1ec5d360d264c27734df8b Mon Sep 17 00:00:00 2001 From: Kernc Date: Thu, 29 Oct 2020 23:37:22 +0100 Subject: [PATCH 11/19] mark .github/deploy-gh-pages.sh executable --- .github/deploy-gh-pages.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 .github/deploy-gh-pages.sh diff --git a/.github/deploy-gh-pages.sh b/.github/deploy-gh-pages.sh old mode 100644 new mode 100755 From 951eb1bfbc61959d6f798d439920b3fd55355328 Mon Sep 17 00:00:00 2001 From: Kernc Date: Fri, 30 Oct 2020 00:13:18 +0100 Subject: [PATCH 12/19] give 'fetch tags' step a name --- .github/workflows/ci.yml | 3 ++- .github/workflows/deploy-docs.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5667b0e3..a1fef5cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,8 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 3 - - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* + - name: Fetch tags + run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* - name: Install dependencies run: | diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 1e06c644..1bc3dd10 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -25,7 +25,8 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 3 - - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* + - name: Fetch tags + run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* - name: Install dependencies run: | From 356143f4127ea4835c55362c8c82f042e0da093b Mon Sep 17 00:00:00 2001 From: Kernc Date: Fri, 30 Oct 2020 00:49:18 +0100 Subject: [PATCH 13/19] goddamn debug --- .github/deploy-gh-pages.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/deploy-gh-pages.sh b/.github/deploy-gh-pages.sh index cb6bddbe..c6e1b4a9 100755 --- a/.github/deploy-gh-pages.sh +++ b/.github/deploy-gh-pages.sh @@ -1,6 +1,8 @@ #!/bin/bash set -eu +set -x + if [ ! -d doc/build ]; then echo 'Error: invalid directory. Deploy from repo root.' exit 1 From 85a09aa56c1394721248c8994b0a161a08fc8364 Mon Sep 17 00:00:00 2001 From: Kernc Date: Fri, 30 Oct 2020 00:12:36 +0100 Subject: [PATCH 14/19] set github-actions git credentials --- .github/deploy-gh-pages.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/deploy-gh-pages.sh b/.github/deploy-gh-pages.sh index c6e1b4a9..246e0e28 100755 --- a/.github/deploy-gh-pages.sh +++ b/.github/deploy-gh-pages.sh @@ -32,6 +32,12 @@ if git diff --staged --quiet; then echo "$0: No changes to commit." exit 0 fi + +if ! git config user.name; then + git config user.name 'github-actions' + git config user.email '41898282+github-actions[bot]@users.noreply.github.com' +fi + git commit -a -m "CI: Update docs for ${GITHUB_REF#refs/tags/} ($head)" From 95f39713c17efed398934cc21aabc5cfebb98b72 Mon Sep 17 00:00:00 2001 From: Kernc Date: Fri, 30 Oct 2020 01:18:17 +0100 Subject: [PATCH 15/19] undo 'test deploy-docs workflow' --- .github/deploy-gh-pages.sh | 7 +------ .github/workflows/deploy-docs.yml | 1 - 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/deploy-gh-pages.sh b/.github/deploy-gh-pages.sh index 246e0e28..87b4b10a 100755 --- a/.github/deploy-gh-pages.sh +++ b/.github/deploy-gh-pages.sh @@ -1,8 +1,6 @@ #!/bin/bash set -eu -set -x - if [ ! -d doc/build ]; then echo 'Error: invalid directory. Deploy from repo root.' exit 1 @@ -39,7 +37,4 @@ if ! git config user.name; then fi git commit -a -m "CI: Update docs for ${GITHUB_REF#refs/tags/} ($head)" - - - -git push --dry-run +git push diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 1bc3dd10..7925fb16 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -2,7 +2,6 @@ name: Deploy docs on: push: tags: ['[0-9]+.[0-9]+.*'] - pull_request: { branches: [master] } jobs: deploy: From 728ade8844263108895304b7ea3cb1912ba0824d Mon Sep 17 00:00:00 2001 From: Kernc Date: Fri, 30 Oct 2020 01:27:50 +0100 Subject: [PATCH 16/19] DOC: Update 'Build: Passing' link in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b791af4e..36387e22 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Backtesting.py ============== -[![Build Status](https://img.shields.io/travis/kernc/backtesting.py.svg?style=for-the-badge)](https://travis-ci.org/kernc/backtesting.py) +[![Build Status](https://img.shields.io/github/workflow/status/kernc/backtesting.py/ci/master?style=for-the-badge)](https://github.com/kernc/backtesting.py/actions) [![Code Coverage](https://img.shields.io/codecov/c/gh/kernc/backtesting.py.svg?style=for-the-badge)](https://codecov.io/gh/kernc/backtesting.py) [![Backtesting on PyPI](https://img.shields.io/pypi/v/backtesting.svg?color=blue&style=for-the-badge)](https://pypi.org/project/backtesting) From 30d71dfc702635d122f69bccb3e809e96fe420fd Mon Sep 17 00:00:00 2001 From: Kernc Date: Fri, 30 Oct 2020 01:40:29 +0100 Subject: [PATCH 17/19] MNT: Bump minimal Python to 3.6+ in setup.py --- setup.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index d2f277db..d0636a83 100644 --- a/setup.py +++ b/setup.py @@ -1,8 +1,8 @@ import os import sys -if sys.version_info < (3, 4): - sys.exit('ERROR: Backtesting.py requires Python 3.4+') +if sys.version_info < (3, 6): + sys.exit('ERROR: Backtesting.py requires Python 3.6+') if __name__ == '__main__': @@ -31,7 +31,6 @@ 'write_to': os.path.join('backtesting', '_version.py'), }, install_requires=[ - 'typing ; python_version < "3.5"', 'numpy', 'pandas >= 0.25.0, != 0.25.0', 'bokeh >= 1.4.0', @@ -54,7 +53,7 @@ ], }, test_suite="backtesting.test", - python_requires='>=3.4', + python_requires='>=3.6', author='Zach Lûster', classifiers=[ 'Intended Audience :: Financial and Insurance Industry', From 6b14a0c95fe5722089e5639253be23d1eee8c8cf Mon Sep 17 00:00:00 2001 From: Kernc Date: Fri, 30 Oct 2020 01:41:17 +0100 Subject: [PATCH 18/19] DOC: Bump mentions to Python 3.6+ --- doc/examples/Quick Start User Guide.ipynb | 2 +- doc/examples/Quick Start User Guide.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/examples/Quick Start User Guide.ipynb b/doc/examples/Quick Start User Guide.ipynb index 97470644..8516be34 100644 --- a/doc/examples/Quick Start User Guide.ipynb +++ b/doc/examples/Quick Start User Guide.ipynb @@ -9,7 +9,7 @@ "\n", "This tutorial shows some of the features of *backtesting.py*, a Python framework for [backtesting](https://www.investopedia.com/terms/b/backtesting.asp) trading strategies.\n", "\n", - "_Backtesting.py_ is a small and lightweight, blazing fast backtesting framework that uses state-of-the-art Python structures and procedures (Python 3.5+, Pandas, NumPy, Bokeh). It has a very small and simple API that is easy to remember and quickly shape towards meaningful results. The library _doesn't_ really support stock picking or trading strategies that rely on arbitrage or multi-asset portfolio rebalancing; instead, it works with an individual tradeable asset at a time and is best suited for optimizing position entrance and exit signal strategies, decisions upon values of technical indicators, and it's also a versatile interactive trade visualization and statistics tool.\n", + "_Backtesting.py_ is a small and lightweight, blazing fast backtesting framework that uses state-of-the-art Python structures and procedures (Python 3.6+, Pandas, NumPy, Bokeh). It has a very small and simple API that is easy to remember and quickly shape towards meaningful results. The library _doesn't_ really support stock picking or trading strategies that rely on arbitrage or multi-asset portfolio rebalancing; instead, it works with an individual tradeable asset at a time and is best suited for optimizing position entrance and exit signal strategies, decisions upon values of technical indicators, and it's also a versatile interactive trade visualization and statistics tool.\n", "\n", "\n", "## Data\n", diff --git a/doc/examples/Quick Start User Guide.py b/doc/examples/Quick Start User Guide.py index 1a5963fa..b2a015cc 100644 --- a/doc/examples/Quick Start User Guide.py +++ b/doc/examples/Quick Start User Guide.py @@ -18,7 +18,7 @@ # # This tutorial shows some of the features of *backtesting.py*, a Python framework for [backtesting](https://www.investopedia.com/terms/b/backtesting.asp) trading strategies. # -# _Backtesting.py_ is a small and lightweight, blazing fast backtesting framework that uses state-of-the-art Python structures and procedures (Python 3.5+, Pandas, NumPy, Bokeh). It has a very small and simple API that is easy to remember and quickly shape towards meaningful results. The library _doesn't_ really support stock picking or trading strategies that rely on arbitrage or multi-asset portfolio rebalancing; instead, it works with an individual tradeable asset at a time and is best suited for optimizing position entrance and exit signal strategies, decisions upon values of technical indicators, and it's also a versatile interactive trade visualization and statistics tool. +# _Backtesting.py_ is a small and lightweight, blazing fast backtesting framework that uses state-of-the-art Python structures and procedures (Python 3.6+, Pandas, NumPy, Bokeh). It has a very small and simple API that is easy to remember and quickly shape towards meaningful results. The library _doesn't_ really support stock picking or trading strategies that rely on arbitrage or multi-asset portfolio rebalancing; instead, it works with an individual tradeable asset at a time and is best suited for optimizing position entrance and exit signal strategies, decisions upon values of technical indicators, and it's also a versatile interactive trade visualization and statistics tool. # # # ## Data From f7809cb7c4aa5155eb55a48a61d4f7d28d4bcad1 Mon Sep 17 00:00:00 2001 From: Kernc Date: Fri, 30 Oct 2020 01:43:23 +0100 Subject: [PATCH 19/19] move lint deps to setup.py [dev] group --- .github/workflows/ci.yml | 2 +- setup.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a1fef5cb..53dacbd5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: - name: Install lint dependencies if: matrix.test-type == 'lint' - run: pip install -U flake8 coverage mypy + run: pip install -U .[dev] - name: Install docs dependencies if: matrix.test-type == 'docs' diff --git a/setup.py b/setup.py index d0636a83..32f2f879 100644 --- a/setup.py +++ b/setup.py @@ -50,6 +50,8 @@ ], 'dev': [ 'flake8', + 'coverage', + 'mypy', ], }, test_suite="backtesting.test",