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

Engine: Scripting support #383

Merged
merged 207 commits into from Jan 23, 2020
Merged

Engine: Scripting support #383

merged 207 commits into from Jan 23, 2020

Conversation

@xtda
Copy link
Member

xtda commented Nov 24, 2019

Description

This PR adds in scripting functionality into GCT

Current working features:

  • Execute scripts
  • Terminate scripts
  • Autoload scripts on bot startup
  • Current Exchange features supported:
  • Enabled Exchanges
  • Enabled currency pairs
  • Account information
  • Query Order
  • Submit Order
  • Cancel Order
  • Ticker
  • Orderbook

A README has been created to go over usage

PR is not completely finished yet but wanted to gauge early feedback as change count is getting high

Type of change

Please delete options that are not relevant and add an x in [] as item is complete.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

Automated tests
Manual testing

Test scripts have also been provided in ./testdata/gctscript/

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation and regenerated documentation via the documentation tool
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally and on Travis with my changes
  • Any dependent changes have been merged and published in downstream modules
xtda added 30 commits Oct 3, 2019
WIP
…nters being added
WIP
WIP
…s broken
…commands for list and stop of running scripts
…ructured gctcli commands into sub commands
xtda added 2 commits Jan 21, 2020
@xtda xtda added review me and removed reconstructing labels Jan 21, 2020
@xtda xtda requested review from shazbert and gloriousCode Jan 21, 2020
xtda added 5 commits Jan 21, 2020
…back to 1:30
Copy link
Collaborator

shazbert left a comment

Only issue is the discussed reading from disk multiple times via vm method read(). Other nits are inconsequential at this point. Epic work.

gctscript/modules/gct/gct_types.go Outdated Show resolved Hide resolved
gctscript/vm/vm_test.go Outdated Show resolved Hide resolved
gctscript/vm/vm_test.go Show resolved Hide resolved
Copy link
Collaborator

gloriousCode left a comment

Looking really good. Latest changes are all good. One potential issue and one thing for future GCT to deal with

gctscript/modules/wrapper_types.go Show resolved Hide resolved
gctscript/vm/gctscript.go Show resolved Hide resolved
xtda added 2 commits Jan 22, 2020
Copy link
Collaborator

thrasher- left a comment

No longer have any read file errors, have tested pretty much all functionality and love the idiot horse 😆

Just a few minor nits and some linter issues:

common\convert\convert.go:111:1: exported function BoolPtr should have comment or be unexported
engine\engine_types.go:102:2: comment on exported const MsgStatusOK should be of the form "MsgStatusOK ..."
exchanges\withdraw\withdraw_types.go:10:2: exported const ErrStrAmountMustBeGreaterThanZero should have comment (or a comment on this block) or be unexported
exchanges\withdraw\withdraw_types.go:17:2: exported var ErrRequestCannotBeNil should have comment or be unexported
logger\logger_types.go:11:2: exported const DefaultMaxFileSize should have comment (or a comment on this block) or be unexported
gctscript/README.md Outdated Show resolved Hide resolved
gctscript/vm/vm_test.go Show resolved Hide resolved
xtda added 2 commits Jan 22, 2020
Copy link
Collaborator

shazbert left a comment

⭐️ tACK

xtda added 4 commits Jan 22, 2020
Copy link
Collaborator

shazbert left a comment

Changes approved

Copy link
Collaborator

thrasher- left a comment

Thanks for addressing all the nits and great stuff 👍

@xtda xtda mentioned this pull request Jan 22, 2020
11 of 11 tasks complete
Copy link
Collaborator

gloriousCode left a comment

Thanks for making those changes! Tackerino 📜

@thrasher- thrasher- merged commit f6fd94e into thrasher-corp:master Jan 23, 2020
4 of 5 checks passed
4 of 5 checks passed
CodeLingo timed out
Details
Travis CI - Pull Request Build Passed
Details
codecov/patch 43.71% of diff hit (target 41.3%)
Details
codecov/project Absolute coverage decreased by -0.1% but relative coverage increased by +2.41% compared to 4c33a07
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.