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

exchanges: Add dynamic function checking to determine exchange functionality #1619

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

Conversation

shazbert
Copy link
Collaborator

@shazbert shazbert commented Aug 18, 2024

PR Description

  • Adds AutomaticPreFlightCheck function to determine functionality support between protocols and asset types.
  • This is a POC for eligibility testing. This is backwards compatible and constricted to gateio for initial documentation output.
  • This attempts to standardise what is available across exchange implementations between functionality for a quicker decision on what endpoints to use and dynamically scale up and down depending on actual support. Specifically started with trading endpoints to keep things simple.

Type of change

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How has this been tested

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration and
also consider improving test coverage whilst working on a certain feature or package.

  • go test ./... -race
  • golangci-lint run
  • Test X

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 Github Actions with my changes
  • Any dependent changes have been merged and published in downstream modules

@shazbert shazbert added help wanted low priority This enhancement or update will be implemented at a later date. labels Aug 18, 2024
@shazbert shazbert requested a review from a team August 18, 2024 04:37
@shazbert shazbert self-assigned this Aug 18, 2024
Copy link

codecov bot commented Aug 18, 2024

Codecov Report

Attention: Patch coverage is 46.61017% with 63 lines in your changes missing coverage. Please review.

Project coverage is 36.39%. Comparing base (225429b) to head (40a5397).

Files Patch % Lines
cmd/documentation/documentation.go 0.00% 42 Missing ⚠️
exchanges/preflight.go 83.87% 3 Missing and 7 partials ⚠️
exchanges/protocol/features.go 0.00% 8 Missing ⚠️
engine/engine.go 50.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1619      +/-   ##
==========================================
+ Coverage   36.36%   36.39%   +0.03%     
==========================================
  Files         422      424       +2     
  Lines      183105   183221     +116     
==========================================
+ Hits        66588    66692     +104     
- Misses     108475   108481       +6     
- Partials     8042     8048       +6     
Files Coverage Δ
engine/engine.go 39.71% <50.00%> (+<0.01%) ⬆️
exchanges/protocol/features.go 0.00% <0.00%> (ø)
exchanges/preflight.go 83.87% <83.87%> (ø)
cmd/documentation/documentation.go 0.00% <0.00%> (ø)

... and 16 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted low priority This enhancement or update will be implemented at a later date.
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

1 participant