Skip to content

Commit

Permalink
Merge branch 'develop' into feat/short
Browse files Browse the repository at this point in the history
  • Loading branch information
xmatthias committed Jan 1, 2022
2 parents 6491727 + 45a02be commit ddfbe55
Show file tree
Hide file tree
Showing 75 changed files with 594 additions and 315 deletions.
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,17 @@ updates:
schedule:
interval: daily
open-pull-requests-limit: 10

- package-ecosystem: pip
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10
target-branch: develop

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
target-branch: develop
102 changes: 43 additions & 59 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: Freqtrade CI
on:
push:
branches:
- master
- stable
- develop
tags:
Expand All @@ -20,7 +19,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-18.04, ubuntu-20.04 ]
python-version: [3.7, 3.8, 3.9]
python-version: ["3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2
Expand All @@ -39,7 +38,7 @@ jobs:

- name: pip cache (linux)
uses: actions/cache@v2
if: startsWith(matrix.os, 'ubuntu')
if: runner.os == 'Linux'
with:
path: ~/.cache/pip
key: test-${{ matrix.os }}-${{ matrix.python-version }}-pip
Expand All @@ -50,8 +49,9 @@ jobs:
cd build_helpers && ./install_ta-lib.sh ${HOME}/dependencies/; cd ..
- name: Installation - *nix
if: runner.os == 'Linux'
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade pip wheel
export LD_LIBRARY_PATH=${HOME}/dependencies/lib:$LD_LIBRARY_PATH
export TA_LIBRARY_PATH=${HOME}/dependencies/lib
export TA_INCLUDE_PATH=${HOME}/dependencies/include
Expand All @@ -69,7 +69,7 @@ jobs:
if: matrix.python-version == '3.9'

- name: Coveralls
if: (startsWith(matrix.os, 'ubuntu-20') && matrix.python-version == '3.8')
if: (runner.os == 'Linux' && matrix.python-version == '3.8')
env:
# Coveralls token. Not used as secret due to github not providing secrets to forked repositories
COVERALLS_REPO_TOKEN: 6D1m0xupS3FgutfuGao8keFf9Hc0FpIXu
Expand Down Expand Up @@ -101,23 +101,20 @@ jobs:
run: |
mypy freqtrade scripts
- name: Slack Notification
uses: lazy-actions/[email protected]
- name: Discord notification
uses: rjstone/discord-webhook-notify@v1
if: failure() && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false)
with:
type: ${{ job.status }}
job_name: '*Freqtrade CI ${{ matrix.os }}*'
mention: 'here'
mention_if: 'failure'
channel: '#notifications'
url: ${{ secrets.SLACK_WEBHOOK }}
severity: error
details: Freqtrade CI failed on ${{ matrix.os }}
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}

build_macos:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-latest ]
python-version: [3.7, 3.8, 3.9]
python-version: ["3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2
Expand All @@ -136,7 +133,7 @@ jobs:

- name: pip cache (macOS)
uses: actions/cache@v2
if: startsWith(matrix.os, 'macOS')
if: runner.os == 'macOS'
with:
path: ~/Library/Caches/pip
key: test-${{ matrix.os }}-${{ matrix.python-version }}-pip
Expand All @@ -147,10 +144,11 @@ jobs:
cd build_helpers && ./install_ta-lib.sh ${HOME}/dependencies/; cd ..
- name: Installation - macOS
if: runner.os == 'macOS'
run: |
brew update
brew install hdf5 c-blosc
python -m pip install --upgrade pip
python -m pip install --upgrade pip wheel
export LD_LIBRARY_PATH=${HOME}/dependencies/lib:$LD_LIBRARY_PATH
export TA_LIBRARY_PATH=${HOME}/dependencies/lib
export TA_INCLUDE_PATH=${HOME}/dependencies/include
Expand All @@ -162,7 +160,7 @@ jobs:
pytest --random-order --cov=freqtrade --cov-config=.coveragerc
- name: Coveralls
if: (startsWith(matrix.os, 'ubuntu-20') && matrix.python-version == '3.8')
if: (runner.os == 'Linux' && matrix.python-version == '3.8')
env:
# Coveralls token. Not used as secret due to github not providing secrets to forked repositories
COVERALLS_REPO_TOKEN: 6D1m0xupS3FgutfuGao8keFf9Hc0FpIXu
Expand Down Expand Up @@ -194,25 +192,21 @@ jobs:
run: |
mypy freqtrade scripts
- name: Slack Notification
uses: lazy-actions/[email protected]
- name: Discord notification
uses: rjstone/discord-webhook-notify@v1
if: failure() && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false)
with:
type: ${{ job.status }}
job_name: '*Freqtrade CI ${{ matrix.os }}*'
mention: 'here'
mention_if: 'failure'
channel: '#notifications'
url: ${{ secrets.SLACK_WEBHOOK }}

severity: error
details: Test Succeeded!
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}

build_windows:

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ windows-latest ]
python-version: [3.7, 3.8]
python-version: ["3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2
Expand All @@ -224,7 +218,6 @@ jobs:

- name: Pip cache (Windows)
uses: actions/cache@preview
if: startsWith(runner.os, 'Windows')
with:
path: ~\AppData\Local\pip\Cache
key: ${{ matrix.os }}-${{ matrix.python-version }}-pip
Expand Down Expand Up @@ -257,16 +250,13 @@ jobs:
run: |
mypy freqtrade scripts
- name: Slack Notification
uses: lazy-actions/[email protected]
- name: Discord notification
uses: rjstone/discord-webhook-notify@v1
if: failure() && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false)
with:
type: ${{ job.status }}
job_name: '*Freqtrade CI windows*'
mention: 'here'
mention_if: 'failure'
channel: '#notifications'
url: ${{ secrets.SLACK_WEBHOOK }}
severity: error
details: Test Failed
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}

docs_check:
runs-on: ubuntu-20.04
Expand All @@ -288,14 +278,13 @@ jobs:
pip install mkdocs
mkdocs build
- name: Slack Notification
uses: lazy-actions/[email protected]
- name: Discord notification
uses: rjstone/discord-webhook-notify@v1
if: failure() && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false)
with:
type: ${{ job.status }}
job_name: '*Freqtrade Docs*'
channel: '#notifications'
url: ${{ secrets.SLACK_WEBHOOK }}
severity: error
details: Freqtrade doc test failed!
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}

cleanup-prior-runs:
runs-on: ubuntu-20.04
Expand All @@ -306,7 +295,7 @@ jobs:
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

# Notify on slack only once - when CI completes (and after deploy) in case it's successfull
# Notify only once - when CI completes (and after deploy) in case it's successfull
notify-complete:
needs: [ build_linux, build_macos, build_windows, docs_check ]
runs-on: ubuntu-20.04
Expand All @@ -320,14 +309,13 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Slack Notification
uses: lazy-actions/[email protected]
- name: Discord notification
uses: rjstone/discord-webhook-notify@v1
if: always() && steps.check.outputs.has-permission && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false)
with:
type: ${{ job.status }}
job_name: '*Freqtrade CI*'
channel: '#notifications'
url: ${{ secrets.SLACK_WEBHOOK }}
severity: info
details: Test Completed!
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}

deploy:
needs: [ build_linux, build_macos, build_windows, docs_check ]
Expand Down Expand Up @@ -385,7 +373,7 @@ jobs:
- name: Set up Docker Buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
uses: crazy-max/ghaction-docker-buildx@v3.3.1
with:
buildx-version: latest
qemu-version: latest
Expand All @@ -400,17 +388,13 @@ jobs:
run: |
build_helpers/publish_docker_multi.sh
- name: Slack Notification
uses: lazy-actions/[email protected]
- name: Discord notification
uses: rjstone/discord-webhook-notify@v1
if: always() && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false)
with:
type: ${{ job.status }}
job_name: '*Freqtrade CI Deploy*'
mention: 'here'
mention_if: 'failure'
channel: '#notifications'
url: ${{ secrets.SLACK_WEBHOOK }}
severity: info
details: Deploy Succeeded!
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}


deploy_arm:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker_update_readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v2.1.0
uses: peter-evans/dockerhub-description@v2.4.3
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
Expand Down
55 changes: 0 additions & 55 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9.9-slim-bullseye as base
FROM python:3.10.0-slim-bullseye as base

# Setup env
ENV LANG C.UTF-8
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ To run this bot we recommend you a cloud instance with a minimum of:

### Software requirements

- [Python 3.7.x](http://docs.python-guide.org/en/latest/starting/installation/)
- [Python >= 3.7](http://docs.python-guide.org/en/latest/starting/installation/)
- [pip](https://pip.pypa.io/en/stable/installing/)
- [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
- [TA-Lib](https://mrjbq7.github.io/ta-lib/install.html)
Expand Down
Binary file not shown.
Binary file removed build_helpers/TA_Lib-0.4.21-cp38-cp38-win_amd64.whl
Binary file not shown.
Binary file removed build_helpers/TA_Lib-0.4.21-cp39-cp39-win_amd64.whl
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
12 changes: 7 additions & 5 deletions build_helpers/install_windows.ps1
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
# Downloads don't work automatically, since the URL is regenerated via javascript.
# Downloaded from https://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib

python -m pip install --upgrade pip
python -m pip install --upgrade pip wheel

$pyv = python -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')"

if ($pyv -eq '3.7') {
pip install build_helpers\TA_Lib-0.4.21-cp37-cp37m-win_amd64.whl
pip install build_helpers\TA_Lib-0.4.22-cp37-cp37m-win_amd64.whl
}
if ($pyv -eq '3.8') {
pip install build_helpers\TA_Lib-0.4.21-cp38-cp38-win_amd64.whl
pip install build_helpers\TA_Lib-0.4.22-cp38-cp38-win_amd64.whl
}
if ($pyv -eq '3.9') {
pip install build_helpers\TA_Lib-0.4.21-cp39-cp39-win_amd64.whl
pip install build_helpers\TA_Lib-0.4.22-cp39-cp39-win_amd64.whl
}
if ($pyv -eq '3.10') {
pip install build_helpers\TA_Lib-0.4.22-cp310-cp310-win_amd64.whl
}

pip install -r requirements-dev.txt
pip install -e .
2 changes: 1 addition & 1 deletion docs/advanced-hyperopt.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ A sample of this can be found below, which is identical to the Default Hyperopt

``` python
from datetime import datetime
from typing import Dict
from typing import Any, Dict

from pandas import DataFrame

Expand Down
3 changes: 3 additions & 0 deletions docs/advanced-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,15 @@ Log messages are send to `syslog` with the `user` facility. So you can see them
On many systems `syslog` (`rsyslog`) fetches data from `journald` (and vice versa), so both `--logfile syslog` or `--logfile journald` can be used and the messages be viewed with both `journalctl` and a syslog viewer utility. You can combine this in any way which suites you better.

For `rsyslog` the messages from the bot can be redirected into a separate dedicated log file. To achieve this, add

```
if $programname startswith "freqtrade" then -/var/log/freqtrade.log
```
to one of the rsyslog configuration files, for example at the end of the `/etc/rsyslog.d/50-default.conf`.
For `syslog` (`rsyslog`), the reduction mode can be switched on. This will reduce the number of repeating messages. For instance, multiple bot Heartbeat messages will be reduced to a single message when nothing else happens with the bot. To achieve this, set in `/etc/rsyslog.conf`:
```
# Filter duplicated messages
$RepeatedMsgReduction on
Expand Down
Loading

0 comments on commit ddfbe55

Please sign in to comment.