forked from xeroc/stakemachine
-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/Codaone/DEXBot into easyc…
…onfig Conflicts: dexbot/basestrategy.py dexbot/bot.py dexbot/cli.py dexbot/ui.py setup.py
- Loading branch information
Showing
60 changed files
with
3,405 additions
and
1,711 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,5 +75,5 @@ deprecated | |
*.yml | ||
venv/ | ||
.idea/ | ||
dexbot/views/ui/*_ui.py | ||
dexbot/views/ui/**/*_ui.py | ||
dexbot/resources/*_rc.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
sudo: true | ||
matrix: | ||
include: | ||
- os: linux | ||
language: python | ||
python: '3.6' | ||
- os: osx | ||
language: generic | ||
before_install: | ||
- python --version | ||
- brew upgrade python | ||
install: | ||
- make install | ||
script: | ||
- echo "@TODO - Running tests..." | ||
- pyinstaller --distpath dist/$TRAVIS_OS_NAME gui.spec | ||
- pyinstaller --distpath dist/$TRAVIS_OS_NAME cli.spec | ||
before_deploy: | ||
- git config --local user.name "Travis" | ||
- git config --local user.email "[email protected]" | ||
- git tag "$(date +'%Y%m%d%H%M%S')-$(git log --format=%h -1)" | ||
- tar -czvf dist/DEXBot-$TRAVIS_OS_NAME.tar.gz dist/$TRAVIS_OS_NAME/* | ||
deploy: | ||
- provider: releases | ||
skip_cleanup: true | ||
api_key: | ||
secure: YHAPA2G3qu7at2hMu4AplXH/niI1ChlgldJVetaKO92iDQiyOk5VqFfhV1ec+nYdX8rtniwfD7YJr2nG2x1ATwKw4MyFcJEXqaOUmKWTeZ/Q3PnQQsa+2BnN4Rfz1aynpsKHDYS9gCU/YTqymujE8bdlxW1WtpYOqOSDkspGxZGZTiUKQ7/qhrjB3Dywm/KF9WEoba/X7tbhmSuU8sL45gBGY008TXZRWqAPM42qa/aBIrG/cIA865VlCUltPC6vzskcWI5q1UtYh6g2CiXJghcpFEO2rWWXmS1A+5nQp6ptJigjRgnhyFHmHb27lRM8aRGRDTeyJvlNuoyIvNj/FxhLXZvomgTyGyzTIl67WIXcxWMKx6KqqrqGyiooRMeFpDEYobZL/FY9whi3M+gUwsofAVQ6oL4a1L185egaXlMKGbM5GYB4OxVLsVtL2c0pJjvNIkCGGDzaqNpdo+vZflB4iCwvw548rWJsqsHnP1XMo28ZU86hibD7V0x+JW2BJEI0lMvOkRBslOhYBafIsbZakO4Zf4d+5b2dd8/xY/wTbuxwgDuBOmpqoByVYeCBah4bbnb8JS6eze+vUyxaI1XLAdQXbLQ788Agr2jdHGuy1wI8io9g5vtzS5oOyq8YFBM1tVKM2Mtw5nkSsTbPJsZg8m/kkre6qiXJl2gPQTE= | ||
file: dist/*.tar.gz | ||
file_glob: true | ||
on: | ||
tags: true | ||
notifications: | ||
email: false | ||
slack: | ||
secure: iQwBqvwq0HmEODoWI52pnNi2trfZ4ly5/fDPmkr6Ez8z9rm5XQ3CBLtpH7JpNdkyen5r+dVTczJDIOTBLpXwe/AzwFKLqZc/0pkXnxzNSENnm++/G6uqS0u5fMdYSoR4fJC1zjzEj2ly11OdS+wX3y9//hD13U96u3iO6T/7EXU2VYt82wekziJXzyfK4JeJMs1L5M2Oz7ZBwiHeAZ/3ZNjKE+9TX7S/mlmG+bNiQhv/wSin2AnsB1recgFjp17ZHq4cW+K77TDnRlPZ0bVsOhGYUtMlW9llidXZbunLj3qITIDl7dufowBG95PTHh+L2KDcPv7UCxlN02kXWuz3nL47UwD7BZcLMJ0RLYk4g+qNBrytgrmhH82gdmenzCQ4PgHI/U1/8hgiEyGlBZWUTXrso5EF3VBRUhCtu8dG/F+rdGHSfK1mZQyDPe6my9E888TvfcWWCpVNammAZicrGWU9nY3Rqn7DFodBL896iFPs1DJD5fTF1th6hHEyRSuKZC80irFZRoxccDPuDYVIfPExJH328tFeh75WOuzQt4QCBFiOsiFDlCYhnQ8tNw/MWntPQHwY8PkUlvpvelPCgfh73ihXtMD61/6Hq+lOijkGFhEzgpqmzL4mSUd/EQRJHLE9lAVvRGdrzlaIV6f4CirJkZSAgf4LuYDl2JMZ3kE= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
include *.md | ||
include dexbot/resources/img/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
version: 0.1.{build} | ||
|
||
image: Visual Studio 2015 | ||
|
||
environment: | ||
matrix: | ||
# Python 3.5.3 - 64-bit | ||
- PYTHON: "C:\\Python35-x64" | ||
|
||
#---------------------------------# | ||
# build # | ||
#---------------------------------# | ||
|
||
build: off | ||
|
||
configuration: Release | ||
|
||
install: | ||
- SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%;C:\MinGW\bin | ||
- copy c:\MinGW\bin\mingw32-make.exe c:\MinGW\bin\make.exe | ||
- copy c:\Python35-x64\python.exe c:\Python35-x64\python3.exe | ||
- python --version | ||
- make install | ||
|
||
after_test: | ||
- make package | ||
- '7z a DEXBot-win64.zip %APPVEYOR_BUILD_FOLDER%\dist\DEXBot-gui.exe %APPVEYOR_BUILD_FOLDER%\dist\DEXBot-cli.exe' | ||
|
||
# @TODO: Run tests.. | ||
test_script: | ||
- "echo tests..." | ||
|
||
artifacts: | ||
- path: DEXBot-win64.zip | ||
name: DEXBot-win64.zip | ||
|
||
#---------------------------------# | ||
# deployment # | ||
#---------------------------------# | ||
|
||
shallow_clone: false | ||
|
||
clone_depth: 1 | ||
|
||
deploy: | ||
- provider: GitHub | ||
artifact: DEXBot-win64.zip | ||
draft: false | ||
prerelease: false | ||
force_update: true | ||
auth_token: | ||
secure: 9qvwlVUHFBV4GwMz1Gu2HSnqU8Ex2nv5dsY4mVNCurrb+6ULIoHPgbvJPWTo3qV6 | ||
on: | ||
appveyor_repo_tag: true # deploy on tag push only | ||
|
||
#---------------------------------# | ||
# notifications # | ||
#---------------------------------# | ||
|
||
notifications: | ||
- provider: Slack | ||
auth_token: | ||
secure: G9OMj9l2s3+lX8cRiNXXhuQJpnnjcBc0cqP8gzkdKVWqGA8vBTOIPGxD/536VKpeBH/5dJFQWT+vmnGS+XciaCg4hh5s6hDpnvePq2+uEYE= | ||
channel: '#ci' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
|
||
from dexbot import cli | ||
|
||
cli.main() | ||
if __name__ == '__main__': | ||
cli.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# -*- mode: python -*- | ||
|
||
import os | ||
import sys | ||
block_cipher = None | ||
|
||
hiddenimports_strategies = [ | ||
'dexbot', | ||
'dexbot.strategies', | ||
'dexbot.strategies.echo', | ||
'dexbot.strategies.relative_orders', | ||
'dexbot.strategies.staggered_orders', | ||
'dexbot.strategies.storagedemo', | ||
'dexbot.strategies.walls', | ||
] | ||
|
||
hiddenimports_packaging = [ | ||
'packaging', 'packaging.version', 'packaging.specifiers', 'packaging.requirements' | ||
] | ||
|
||
a = Analysis(['dexbot/cli.py'], | ||
binaries=[], | ||
datas=[], | ||
hiddenimports=hiddenimports_packaging + hiddenimports_strategies, | ||
hookspath=['hooks'], | ||
runtime_hooks=['hooks/rthook-Crypto.py'], | ||
excludes=[], | ||
win_no_prefer_redirects=False, | ||
win_private_assemblies=False, | ||
cipher=block_cipher) | ||
|
||
pyz = PYZ(a.pure, a.zipped_data, | ||
cipher=block_cipher) | ||
|
||
exe = EXE(pyz, | ||
a.scripts, | ||
a.binaries, | ||
a.zipfiles, | ||
a.datas, | ||
name=os.path.join('dist', 'DEXBot-cli' + ('.exe' if sys.platform == 'win32' else '')), | ||
debug=True, | ||
strip=False, | ||
upx=True, | ||
runtime_tmpdir=None, | ||
console=True ) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import pathlib | ||
import os | ||
from appdirs import user_config_dir | ||
|
||
APP_NAME = "dexbot" | ||
VERSION = '0.2.3' | ||
AUTHOR = "codaone" | ||
__version__ = VERSION | ||
|
||
|
||
config_dir = user_config_dir(APP_NAME, appauthor=AUTHOR) | ||
config_file = os.path.join(config_dir, "config.yml") | ||
|
||
default_config = """ | ||
node: wss://bitshares.openledger.info/ws | ||
workers: {} | ||
""" | ||
|
||
if not os.path.isfile(config_file): | ||
pathlib.Path(config_dir).mkdir(parents=True, exist_ok=True) | ||
with open(config_file, 'w') as f: | ||
f.write(default_config) | ||
print("Created default config file at {}".format(config_file)) |
Oops, something went wrong.