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

wauw #26

Open
wants to merge 2,187 commits into
base: master
Choose a base branch
from
Open

wauw #26

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2187 commits
Select commit Hold shift + click to select a range
4bbeadb
Merge remote-tracking branch 'vvk/442-virtual-orders-state' into pr-4…
joelvai Aug 20, 2019
4708afa
Change dexbot version number to 0.15.3
joelvai Aug 20, 2019
8839255
Add initial table structure as alembic migration
bitphage Aug 20, 2019
687d83d
Fix test
bitphage Aug 20, 2019
d62192a
Fix running migrations on windows
bitphage Aug 20, 2019
15c9d7f
Package migrations as data files
bitphage Aug 20, 2019
d34d5d5
Change dexbot version number to 0.15.4
joelvai Aug 20, 2019
1386d02
Fix migrations tests
bitphage Aug 20, 2019
e120c49
Add forgotten table field
bitphage Aug 20, 2019
5684600
Don't try to delete empty queryset
bitphage Aug 20, 2019
cdabb62
Revert "Fix migrations tests"
bitphage Aug 21, 2019
3f95476
Fix migrations applying for existing installations
bitphage Aug 21, 2019
a60a142
Fix migrations access when packaged into egg
bitphage Aug 21, 2019
1d0f181
Add __init__.py to migrations
bitphage Aug 21, 2019
5d692fb
Change dexbot version number to 0.15.5
joelvai Aug 21, 2019
c85bb1a
Fix required-participation value
bitphage Aug 21, 2019
5281d7d
Limit num_retries in tests
bitphage Aug 21, 2019
bd95694
Mark some tests as mandatory
bitphage Aug 21, 2019
c21ef82
Enable mandatory tests run in travis
bitphage Aug 21, 2019
98aed71
Uninstall deve requirements after running tests
bitphage Aug 21, 2019
2d6de2d
Remove unneded escaping
bitphage Aug 21, 2019
b70308d
Call pip uniinstall with -y
bitphage Aug 21, 2019
423e995
[#664] Add ping into image, as it's required for node checks
g3d Aug 22, 2019
64d4a01
Set clear rules on dynamic CP conditions
bitphage Aug 23, 2019
8214ef9
Adjust expiration override in case of cp_from_last_trade
bitphage Aug 23, 2019
b317e83
Detect SO -> RO transition and purge orders
bitphage Aug 23, 2019
d6eeeea
Preserve bootstrap state when CP from last trade
bitphage Aug 28, 2019
99b3ae3
Improve last trade search
bitphage Aug 28, 2019
8965ff7
Fix return type in get_martket_xxx_price
bitphage Aug 28, 2019
170f6e4
Add more logging for center price
bitphage Aug 28, 2019
e46a91f
Fix typo
bitphage Aug 28, 2019
1d9153c
Add check for zero spread
bitphage Sep 3, 2019
d918217
RO tests
bitProfessor Sep 6, 2019
0d2d094
Don't disable worker in case of 0 balance
bitphage Sep 6, 2019
ac3fe64
Fix wrong rel in pytest.approx()
bitphage Aug 1, 2019
7ca0361
Simplify increase logic for least order
bitphage Aug 6, 2019
8ed0d06
Accept small inaccuracy for full-sized closer order
bitphage Aug 6, 2019
8f93ce6
Fix SO tests
bitphage Aug 6, 2019
9eea0f4
Remove soft limit from place_closer_order()
bitphage Aug 20, 2019
ef4039b
Fix insufficient balance error
bitphage Sep 6, 2019
ef54680
Update README.md
PermieBTS Sep 7, 2019
f1bb6a1
Update README.md
PermieBTS Sep 7, 2019
04d3bd1
Merge remote-tracking branch 'vvk/travis-mandatory-tests' into pr-663…
joelvai Sep 27, 2019
ddf22f4
Change dexbot version number to 0.15.6
joelvai Sep 27, 2019
0217a7e
Merge remote-tracking branch 'vvk/668-670-koth-fixes' into pr-683-merge
joelvai Sep 27, 2019
ed6aadc
Change dexbot version number to 0.15.7
joelvai Sep 27, 2019
9b9e735
Merge remote-tracking branch 'g3d/hotfix/664-ping-in-docker-container…
joelvai Sep 27, 2019
cafe8d9
Change dexbot version number to 0.15.8
joelvai Sep 27, 2019
9e678e8
Merge remote-tracking branch 'thehapax/596-properties' into pr-623-merge
joelvai Sep 27, 2019
d16b325
Revert shared_bitshares_instance() back
joelvai Sep 27, 2019
90bc13b
Change dexbot version number to 0.15.9
joelvai Sep 27, 2019
f54dd02
Merge remote-tracking branch 'vvk/651-SO-wrong-rel-in-approx' into pr…
joelvai Sep 27, 2019
0a4970b
Change dexbot version number to 0.15.10
joelvai Sep 27, 2019
1b73074
Recalculate price for virtual orders
bitphage Sep 10, 2019
1bb954e
Merge remote-tracking branch 'upstream/devel' into single-account-mul…
bitphage Sep 28, 2019
3dd056e
Update docstring
bitphage Sep 28, 2019
92a1f5f
Add SO test for single account multiple workers
bitphage Sep 29, 2019
cb6d25b
fixed duplicate name test_correct_asset_names
bitProfessor Sep 30, 2019
a065546
Merge remote-tracking branch 'upstream/devel' into ro-tests
bitphage Sep 30, 2019
0ee4002
Merge branch 'ro-refactor' into ro-tests
bitphage Sep 30, 2019
ad51f05
Refactor RO tests
bitphage Oct 5, 2019
4da6f7b
Avoid codacy warnings
bitphage Oct 5, 2019
f0839ce
Change dexbot version number to 0.16.0
joelvai Oct 18, 2019
f9122aa
Merge remote-tracking branch 'vvk/single-account-multiple-workers' in…
joelvai Oct 18, 2019
176cd6d
Change dexbot version number to 0.17.0
joelvai Oct 18, 2019
0aca7ad
Add python version print before Linux build
joelvai Oct 23, 2019
9164b37
Update MacOS to use Python 3.7
joelvai Oct 23, 2019
3766863
Change dexbot version number to 0.17.1
joelvai Oct 25, 2019
32dbafb
Fix race condition in SO
bitphage Nov 19, 2019
12c2e7d
Fix getting last own trade price in RO
bitphage Nov 20, 2019
311e5c5
fix requirements so compatible with graphene and uptick
thehapax Nov 21, 2019
4f6d1df
Change dexbot version number to 0.17.2
joelvai Nov 21, 2019
e277501
Merge remote-tracking branch 'vvk/fix-RO-last-trade-price' into pr-69…
joelvai Nov 21, 2019
0758a12
Change dexbot version number to 0.17.3
joelvai Nov 21, 2019
2f21fb0
Merge remote-tracking branch 'vvk/fix-SO-race-condition' into pr-697-…
joelvai Nov 21, 2019
043e902
Change dexbot version number to 0.17.4
joelvai Nov 21, 2019
39ba35a
Merge remote-tracking branch 'vvk/642-multiple-orders-same-price' int…
joelvai Nov 21, 2019
ced9965
Change dexbot version number to 0.17.5
joelvai Nov 21, 2019
b8cf07e
add cancel all market orders option to cli. change host_ip from 8.8.8…
thehapax Nov 21, 2019
74fda05
fix pep8
thehapax Nov 21, 2019
05b8d8e
fix codacy syntax error
thehapax Nov 21, 2019
4940b20
Fix cancel dust order
bitphage Nov 27, 2019
0ad4bf6
make lower/upper bound more clear
froooze Dec 4, 2019
5357da4
Add log message
bitphage Dec 10, 2019
5563e1b
Fix using last own trade price as center price
bitphage Dec 10, 2019
11c0b58
add reset nodelist to default, sort if option given
thehapax Dec 12, 2019
c31ae24
amend usage message
thehapax Dec 12, 2019
8cfb4a4
move comments
thehapax Dec 14, 2019
0b05c9d
fix method name reset_nodes to be different in cli
thehapax Dec 14, 2019
65bfe62
Update config.py
dls-cipher Dec 14, 2019
828aa8d
Change dexbot version number to 0.17.6
joelvai Dec 18, 2019
b5d9b80
Merge remote-tracking branch 'vvk/708-fix-get-own-last-trade' into pr…
joelvai Dec 18, 2019
4b93b5f
Change dexbot version number to 0.17.7
joelvai Dec 18, 2019
81081ee
Merge remote-tracking branch 'vvk/fix-SO-dust-order-cancel' into pr-7…
joelvai Dec 18, 2019
a2ec28b
Change dexbot version number to 0.17.8
joelvai Dec 18, 2019
ff921e4
Change host_ip back to 8.8.8.8
joelvai Mar 11, 2020
55eda88
Merge remote-tracking branch 'origin/nodelist-reset' into pr-710-merge
joelvai Mar 11, 2020
c16ef2b
Change dexbot version number to 0.18.0
joelvai Mar 11, 2020
6e03518
Merge remote-tracking branch 'thehapax/cancel-bulk-orders' into pr-70…
joelvai Mar 11, 2020
8825d70
Change dexbot version number to 0.18.1
joelvai Mar 11, 2020
05be3df
Remove brew update
joelvai Mar 11, 2020
b7eb833
Merge pull request #706 from froooze/patch-2
bitphage Mar 11, 2020
082d9fa
Add pre-commit hooks
bitphage Jan 4, 2020
391a701
Add note on installing pre-commit hooks
bitphage Mar 12, 2020
4dbb9f4
Reformat code with black & isort
bitphage Mar 12, 2020
26200a6
Make timeout to be optional
bitphage Mar 12, 2020
de00f7d
Adjust docstring to fix rendering
bitphage Jan 6, 2020
fbcb69e
Remove reference to non-existent docs
bitphage Jan 6, 2020
7221b03
Remove statemachine mentiones from docs
bitphage Jan 6, 2020
1711d23
Fix price inversion for virtual sell orders
bitphage Jan 27, 2020
1c9ea71
Add workaround for test_maintain_strategy_one_sided
bitphage Jan 27, 2020
a2a7e18
Update bitshares libraries
bitphage Mar 14, 2020
58cc48d
Add switch to disable fallback logic in SO
bitphage Jan 28, 2020
6d57aa5
Fix operational depth when fallback logic is off
bitphage Feb 3, 2020
31908d0
Close spread before replacing virtual orders with real
bitphage Jan 28, 2020
00c9636
Add workaround to fix some tests
bitphage Jan 28, 2020
ab9608e
Remove calculation of asset thresholds
bitphage Jan 28, 2020
eb95805
Append orderid when reconstructing order data
bitphage Jan 30, 2020
b4290cc
Fix proper order reconstruction
bitphage Feb 1, 2020
3447bdf
Implement Stop Loss in SO strategy
bitphage Jan 29, 2020
2c58315
Remove redundant code
bitphage Mar 15, 2020
fb2ce30
Add cli command to drop worker data
bitphage Feb 4, 2020
e2429f2
Add small sleep when dropping state from cli
bitphage Feb 9, 2020
34de8f5
Add preventive check for node sync
bitphage Mar 5, 2020
65a9467
Add check_last_run decorator
bitphage Jan 31, 2020
e5b4a1c
Define self.last_check in StrategyBase
bitphage Mar 16, 2020
81e7c53
Switch to use check_last_run in RO
bitphage Mar 16, 2020
ed2ef04
Use check_last_run in SO
bitphage Mar 16, 2020
a32cdf4
Use check_last_run in KOTH
bitphage Mar 16, 2020
ca4d624
Switch node on tapos_block_summary exception
bitphage Mar 16, 2020
98ee918
Fix error() in strategy template
bitphage Mar 18, 2020
00a920f
Adjust inaccuracy for full-sized closer order
bitphage Mar 18, 2020
86ed9d4
Cleanup txbuffer if worker got disabled
bitphage Mar 18, 2020
b6779c3
Wrap trx execution via retry_action()
bitphage Mar 19, 2020
264bc40
Change dexbot version number to 0.19.0
joelvai Mar 20, 2020
4fd5fbb
Merge remote-tracking branch 'vvk/686-gui-fail-sorted-nodelist' into …
joelvai Mar 20, 2020
b4de2b5
Change dexbot version number to 0.19.1
joelvai Mar 20, 2020
3e80f6e
Merge pull request #719 from bitfag/tip-fix-docs
joelvai Mar 20, 2020
94fcbdc
Merge remote-tracking branch 'vvk/fix-so-price-inversion' into pr-720…
joelvai Mar 20, 2020
b1c8208
Change dexbot version number to 0.19.2
joelvai Mar 20, 2020
1c48ee4
Merge remote-tracking branch 'vvk/fix-test_maintain_strategy_one_side…
joelvai Mar 20, 2020
2d0d3e3
Change dexbot version number to 0.19.3
joelvai Mar 20, 2020
6f8b6db
Merge remote-tracking branch 'vvk/692-libs-update' into pr-722-merge
joelvai Mar 20, 2020
5b2a933
Change dexbot version number to 0.20.0
joelvai Mar 20, 2020
ab42992
Merge remote-tracking branch 'vvk/tip-disable-fallback-so' into pr-72…
joelvai Mar 20, 2020
743cd10
Change dexbot version number to 0.21.0
joelvai Mar 20, 2020
c27c3e9
Merge remote-tracking branch 'vvk/tip-so-tests-workaround' into pr-72…
joelvai Mar 20, 2020
7ae807c
Change dexbot version number to 0.21.1
joelvai Mar 20, 2020
cb1a020
Merge remote-tracking branch 'vvk/554-so-asset-threshold' into pr-726…
joelvai Mar 20, 2020
0af48d4
Change dexbot version number to 0.21.2
joelvai Mar 20, 2020
d9403f2
Merge remote-tracking branch 'vvk/fix-order-reconstruction' into pr-7…
joelvai Mar 20, 2020
21e1c54
Change dexbot version number to 0.20.3
joelvai Mar 20, 2020
fb9cb3c
Merge remote-tracking branch 'vvk/tip-check-node-sync' into pr-728-merge
joelvai Mar 20, 2020
3ff6303
Change dexbot version number to 0.20.4
joelvai Mar 20, 2020
4d62f0c
Merge remote-tracking branch 'vvk/tip-cli-drop-worker-data' into pr-7…
joelvai Mar 20, 2020
a7614c6
Change dexbot version number to 0.21.6
joelvai Mar 20, 2020
d7c793a
Merge remote-tracking branch 'vvk/tip-so-stop-loss' into pr-730-merge
joelvai Mar 20, 2020
e6466f6
Change dexbot version number to 0.22.0
joelvai Mar 20, 2020
9579ff7
Merge remote-tracking branch 'vvk/680-ref_block_prefix' into pr-732-m…
joelvai Mar 20, 2020
e150b4e
Change dexbot version number to 0.22.1
joelvai Mar 20, 2020
6ce8a00
Merge remote-tracking branch 'vvk/473-strategy-template' into pr-744-…
joelvai Mar 20, 2020
e7aa51e
Change dexbot version number to 0.22.2
joelvai Mar 20, 2020
3ceaf35
Merge remote-tracking branch 'vvk/739-fix-so-test' into pr-745-merge
joelvai Mar 20, 2020
62876e8
Change dexbot version number to 0.22.3
joelvai Mar 20, 2020
843ada0
Merge remote-tracking branch 'vvk/505-txbuffer-reset' into pr-746-merge
joelvai Mar 20, 2020
9e96ada
Change dexbot version number to 0.22.4
joelvai Mar 20, 2020
bc7ac19
Merge remote-tracking branch 'upstream/devel' into tip-check_last_run…
bitphage Mar 20, 2020
d059ce7
Merge remote-tracking branch 'vvk/748-so-broadcast-retry-action' into…
joelvai Mar 20, 2020
e8a2863
Change dexbot version number to 0.22.5
joelvai Mar 20, 2020
8341f79
Merge remote-tracking branch 'vvk/tip-check_last_run-decorator' into …
joelvai Mar 20, 2020
d1a1282
Change dexbot version number to 0.23.0
joelvai Mar 20, 2020
4214894
Require config instance in ConfigValidator
bitphage Mar 27, 2020
04c232c
Fix ConfigValidator init in WorkerController
bitphage Mar 27, 2020
78bab4a
Adjust 0 balance message in "both" mode
bitphage Mar 27, 2020
03c9b30
Add bitasset fixtures from python-bitshares
bitphage Mar 29, 2020
a10b8da
Move default account name to fixture
bitphage Mar 29, 2020
8bff94c
Add support for margin call orders in KOTH
bitphage Mar 29, 2020
d551e08
Merge remote-tracking branch 'vvk/todo/677-koth-margin-calls' into pr…
joelvai Mar 31, 2020
a0dabe9
Change dexbot version number to 0.24.0
joelvai Mar 31, 2020
1532769
Merge branch 'devel' into pr-754-merge
joelvai Mar 31, 2020
5ccf509
Change dexbot version number to 0.24.1
joelvai Mar 31, 2020
3f10fbc
Merge remote-tracking branch 'vvk/done/715-koth-trade-0-balance' into…
joelvai Mar 31, 2020
bf5048e
Change dexbot version number to 0.24.2
joelvai Mar 31, 2020
a300ff4
Add initial test for BitsharesOrderEngine
bitphage Apr 5, 2020
a9e5780
Refactor __init__ of StrategyBase and BitsharesOrderEngine
bitphage Apr 5, 2020
ded7e44
Mark primitives __init__ tests as mandatory
bitphage Apr 5, 2020
2bced96
Add test for invert= in place_market_sell_order()
bitphage Apr 5, 2020
776c4d7
Add more pre-commit hooks
bitphage Apr 6, 2020
94b9d1b
Apply autoflake
bitphage Apr 6, 2020
63bc799
Run docformatter on all files
bitphage Apr 6, 2020
1e2042c
Run isort on all files
bitphage Apr 6, 2020
9648b7e
Fix some mypy errors
bitphage Apr 6, 2020
82a7c85
Mark all storage tests as mandatory
bitphage Apr 7, 2020
8a7af19
Refactor DatabaseWorker singleton
bitphage Apr 7, 2020
aeea44d
Fix SO tests failed due to min_check_interval
bitphage Apr 9, 2020
9a06852
Add debug on asset issue
bitphage Apr 9, 2020
404d2a5
Remove spread check from test_maintain_strategy_one_sided
bitphage Apr 9, 2020
97fc987
Add test to repruduce #601
bitphage Apr 9, 2020
6591060
Update limiting logic in SO
bitphage Apr 9, 2020
88d79b7
Disallow 0-profit spread/increment
bitphage Apr 10, 2020
50d5ce1
Use only one market to run SO tests
bitphage Apr 10, 2020
e5b6cf4
Add workarounds for some SO tests
bitphage Apr 10, 2020
f391226
Use separate assets for account_1_sat
bitphage Apr 10, 2020
596ed39
Remove unused logger
bitphage Apr 10, 2020
4f99f1d
Set formatter for dexbot.per_worker in SO tests
bitphage Apr 10, 2020
55e8e01
Use separate worker to simulate foreign trader
bitphage Apr 10, 2020
197a4c2
Fix clean exit from cli
bitphage Apr 13, 2020
f030bf7
Change dexbot version number to 0.25.0
joelvai May 7, 2020
2a07d15
Merge remote-tracking branch 'vvk/done/pre-commit-additions' into pr-…
joelvai May 7, 2020
10f2e45
Change dexbot version number to 0.26.0
joelvai May 7, 2020
45ea01e
Merge remote-tracking branch 'vvk/wip/667-storage-db-path' into pr-76…
joelvai May 7, 2020
492a7be
Change dexbot version number to 0.27.0
joelvai May 7, 2020
97e1999
Merge remote-tracking branch 'vvk/done/so-imbalanced-several-orders-f…
joelvai May 7, 2020
5f18185
Change dexbot version number to 0.27.1
joelvai May 7, 2020
2f9046d
Merge remote-tracking branch 'vvk/done/594-cli-exit' into pr-763-merge
joelvai May 7, 2020
f8684d3
Change dexbot version number to 0.28.0
joelvai May 7, 2020
79b96b9
Remove balances() from StrategyBase
bitphage Apr 7, 2020
6079ed9
Fix methods order
bitphage Apr 7, 2020
4f0184b
Move call outside for cycle
bitphage Apr 7, 2020
df5830d
Add generic method to get operation balance
bitphage Apr 7, 2020
43f7885
Fix flake8 errors
bitphage Apr 7, 2020
dca68e8
Respect operational percent settings in RO
bitphage Apr 7, 2020
aeba259
Fix flake8 errors
bitphage Apr 7, 2020
2c748d0
Respect operational percent settings in KOTH
bitphage Apr 7, 2020
0d9761e
Set semantic-versioned deps in requirements-dev.txt
bitphage May 10, 2020
e15e5e9
Remove all indirect requirements
bitphage May 10, 2020
070069a
Move pyinstaller dep to requirements-dev.txt
bitphage May 10, 2020
beb2b9e
Set main requirements to semantically-versioned
bitphage May 10, 2020
fdf0959
Read requirements.txt inside setup.py
bitphage May 10, 2020
9e45b4f
Bump bitshares dependency
bitphage May 10, 2020
d1744d9
Restore websocket-client dependency
bitphage May 10, 2020
5ffbc2c
Install devel requirements before running pyinstaller
bitphage May 10, 2020
80d56f7
Remove websocket-client dependency
bitphage May 10, 2020
6778c36
Stick to pyqt<5.14
bitphage May 10, 2020
4fa5f44
Bump pytest dependency
bitphage May 10, 2020
487223b
Fix compatibility with pyinstaller 3.6
bitphage May 10, 2020
6a6f23f
Fix travis build
bitphage May 10, 2020
9b52cfb
Fix insufficient balance error
bitphage May 10, 2020
d13a917
Handle null trx['operation_results'] in SO
bitphage May 10, 2020
c240fde
Apply docformatter fix
bitphage May 10, 2020
b6ebec0
Remove deprecated configurations from .travis.yml
joelvai May 19, 2020
a5e4be6
Change dexbot version number to 0.28.1
joelvai May 19, 2020
c50fcdd
Merge remote-tracking branch 'vvk/done/767-semantic-deps' into pr-768…
joelvai May 19, 2020
4307f97
Change dexbot version number to 0.29.0
joelvai May 19, 2020
7a88762
Merge remote-tracking branch 'vvk/done/765-so-insufficient-balance' i…
joelvai May 19, 2020
e88844b
Change dexbot version number to 0.29.1
joelvai May 19, 2020
6197f98
Merge remote-tracking branch 'vvk/done/764-so-none-type' into pr-771-…
joelvai May 19, 2020
0fd298d
Change dexbot version number to 0.29.2
joelvai May 19, 2020
e58fa3f
Change dexbot version number to 1.0.0
joelvai May 19, 2020
44588f0
Change .travis.yml
joelvai May 23, 2020
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
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Bug report
about: Create a report to help us improve

---

## Expected Behavior


## Actual Behavior


## Steps to Reproduce the Problem

1.
2.
3.

## Specifications

- Version:
- OS:
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
name: Feature request
about: Suggest an idea for this project

---
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ var/
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
!app.spec

# Installer logs
pip-log.txt
Expand All @@ -52,6 +53,9 @@ coverage.xml
docs/_build/
docs/html

# Autogenerated reference
docs/reference

# PyBuilder
target/

Expand All @@ -72,3 +76,21 @@ deprecated
*.sqlite
*.yaml
*.yml
venv/
.idea/
dexbot/views/ui/**/*_ui.py
dexbot/resources/*_rc.py
archive
*~

# Dockerfile linter
!.hadolint.yaml

# Keep readthedocs config
!.readthedocs.yml

# Bandit config
!bandit.yml

# pre-commit hooks
!.pre-commit-config.yaml
2 changes: 2 additions & 0 deletions .hadolint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ignored:
- DL3008
5 changes: 5 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[settings]
line_length = 120
multi_line_output = 3
include_trailing_comma = True
known_third_party = Crypto,PyQt5,alembic,appdirs,bitshares,bitsharesapi,bitsharesbase,ccxt,click,docker,events,grapheneapi,graphenecommon,pytest,pywaves,requests,ruamel,setuptools,sqlalchemy,uptick,websocket
67 changes: 67 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Read up on pre-commit
# https://ljvmiranda921.github.io/notebook/2018/06/21/precommits-using-black-and-flake8/

repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
hooks:
- id: trailing-whitespace
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-json
- id: check-yaml
- id: end-of-file-fixer
- id: no-commit-to-branch
- id: debug-statements
- id: check-merge-conflict

- repo: https://github.com/ambv/black
rev: 19.10b0
hooks:
- id: black
language_version: python3

- repo: https://github.com/myint/docformatter
rev: v1.3.1
hooks:
- id: docformatter
args: [-i, --wrap-summaries=120, --wrap-descriptions=120, --pre-summary-newline]

- repo: https://github.com/humitos/mirrors-autoflake
rev: v1.1
hooks:
- id: autoflake
args: ['--in-place', '--remove-all-unused-imports', '--remove-unused-variable']

- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.9
hooks:
- id: flake8
additional_dependencies: [
'pep8-naming',
'flake8-comprehensions',
'flake8-bugbear',
'flake8-mutable',
'flake8-pytest-style',
'flake8-variables-names',
'flake8-class-attributes-order',
'dlint',
]

- repo: https://github.com/asottile/seed-isort-config
rev: v2.1.0
hooks:
- id: seed-isort-config

- repo: https://github.com/timothycrosley/isort
rev: 4.3.21
hooks:
- id: isort

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.770
hooks:
- id: mypy
args: [--ignore-missing-imports, --disallow-incomplete-defs]
exclude: 'tests'
5 changes: 5 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: 2
python:
version: 3.6
install:
- requirements: docs/requirements.txt
7 changes: 7 additions & 0 deletions .remarkrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"plugins": [
"remark-preset-lint-recommended",
["remark-lint-list-item-indent", "space"],
["remark-lint-fenced-code-flag", false]
]
}
51 changes: 51 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
sudo: true
services:
- docker
matrix:
include:
- os: linux
language: python
python: '3.6'
before_install:
- python3 --version
- os: osx
language: generic
python: '3.7'
before_install:
- python3 --version
before_install:
# Make sure docker image can be built
- docker build -t dexbot/dexbot .
- docker pull bitshares/bitshares-core:testnet
install:
- pip install --upgrade setuptools
- make install
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then python3 -m pip install -r requirements-dev.txt ; fi
before_script:
# PEP8 linting
- make pep-test
- echo "Running mandatory tests..."
# Travis on mac doesn't support docker
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then pytest -m mandatory tests/ &&
python3 -m pip uninstall -y -r requirements-dev.txt; fi
script:
- pip install pyinstaller
- pyinstaller --distpath dist/$TRAVIS_OS_NAME gui.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-gui-$TRAVIS_OS_NAME-$TRAVIS_TAG.tar.gz dist/$TRAVIS_OS_NAME/DEXBot-gui
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=
52 changes: 52 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Download base image Ubuntu 18.04
FROM ubuntu:18.04

# Variable arguments to populate labels
ARG USER=dexbot

# Set ENV variables
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
ENV HOME_PATH /home/$USER
ENV SRC_PATH $HOME_PATH/source
ENV PATH $HOME_PATH/.local/bin:$PATH
ENV LOCAL_DATA $HOME_PATH/.local/share
ENV CONFIG_DATA $HOME_PATH/.config

RUN set -xe ;\
apt-get update ;\
# Prepare dependencies
apt-get install -y --no-install-recommends iputils-ping gcc make libssl-dev python3-pip python3-dev python3-setuptools \
python3-async whiptail git ;\
apt-get clean ;\
rm -rf /var/lib/apt/lists/*

RUN set -xe ;\
# Create user and change workdir
groupadd -r $USER ;\
useradd -m -g $USER $USER ;\
# Configure permissions (directories must be created with proper owner before VOLUME directive)
mkdir -p $SRC_PATH $LOCAL_DATA $CONFIG_DATA ;\
chown -R $USER:$USER $HOME_PATH

# Drop priveleges
USER $USER

WORKDIR $SRC_PATH

# Install dependencies in separate stage to speed up further builds
COPY requirements.txt $SRC_PATH/
RUN python3 -m pip install --user -r requirements.txt

# Copy project files
COPY dexbot $SRC_PATH/dexbot/
COPY *.py *.cfg Makefile README.md $SRC_PATH/

# Build the project
RUN set -xe ;\
python3 setup.py build ;\
python3 setup.py install --user

WORKDIR $HOME_PATH

VOLUME ["$LOCAL_DATA", "$CONFIG_DATA"]
4 changes: 3 additions & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
The MIT License (MIT)

Copyright (c) 2017 ChainSquad GmbH
Copyright for portions of project DEXBot are held by ChainSquad GmbH 2017
as part of project stakemachine. All other copyright for project DEXBot
are held by Codaone Oy 2018.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
include *.md
include dexbot/resources/img/*
37 changes: 30 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
.PHONY: clean-pyc clean-build docs

clean: clean-build clean-pyc
clean: clean-build clean-pyc clean-ui

clean-ui:
find dexbot/views/ui/*.py ! -name '__init__.py' -type f -exec rm -f {} +

clean-build:
rm -fr build/
Expand All @@ -11,28 +14,48 @@ clean-build:
clean-pyc:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +

pip:
python3 -m pip install -r requirements.txt

pip-dev:
python3 -m pip install -r requirements-dev.txt

pip-user:
python3 -m pip install --user -r requirements.txt

lint:
flake8 stakemachine/
flake8 dexbot/ tests/

build:
pep-test:
python3 -m pip install flake8==3.7.7
flake8 dexbot/ tests/
python3 -m pip uninstall -y flake8 pyflakes pycodestyle mccabe

build: pip
python3 setup.py build

build-user: pip-user
python3 setup.py build

install: build
python3 setup.py install

install-user: build
install-user: build-user
python3 setup.py install --user

git:
git push --all
git push --tags

check:
check: pip
python3 setup.py check

dist:
package: build pip-dev
pyinstaller gui.spec
pyinstaller cli.spec

dist: build
python3 setup.py sdist upload -r pypi
python3 setup.py bdist_wheel upload

Expand Down
Loading