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

#158 - [trader] Rename get_trader to trade #160

Conversation

trizin
Copy link
Contributor

@trizin trizin commented Sep 8, 2023

Fixes #158

Changes proposed in this PR:

  • Rename get_trader to trade

@trizin trizin marked this pull request as ready for review September 8, 2023 14:48
@trizin trizin requested a review from trentmc September 8, 2023 14:49
self.prev_traded_epochs_per_feed[addr].append(epoch)
self.save_previous_epochs()


def get_trader(feed: Feed, prediction: Tuple[float, float]):
def trade(feed: Feed, prediction: Tuple[float, float]):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still need to address docstring issues the I mentioned in the github issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a description

@@ -124,12 +124,12 @@ def _process_block_at_feed(self, addr: str, timestamp: int, tries: int = 0):

print(f"Got {prediction}.")

self._get_trader(feed, prediction)
self._trade(feed, prediction)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"trade() is gonna be hard to distinguish in some places. Now that I understand the intent a bit better, I recommend calling it "do_trade()".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@trizin trizin requested a review from trentmc September 8, 2023 15:49
@trizin trizin merged commit 131fdd9 into main Sep 8, 2023
5 checks passed
@trizin trizin deleted the issue158-trader-traderpytraderagentget_trader-name-documentation-is-confusing branch September 8, 2023 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[trader] trader.py::TraderAgent.get_trader() name & documentation is confusing
2 participants