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

add broadcast to log message #333

Merged
merged 1 commit into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 4 additions & 1 deletion lumibot/strategies/strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def risk_free_rate(self):

# =======Helper methods=======================

def log_message(self, message, color=None):
def log_message(self, message, color=None, broadcast=False):
Copy link
Contributor

Choose a reason for hiding this comment

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

category Bug Risk priority 7

The new 'broadcast' parameter in the 'log_message' function is not used anywhere in the function. This could lead to confusion for other developers who might expect this parameter to affect the function's behavior. If the parameter is not needed, consider removing it to avoid confusion. If it is needed, make sure to implement its functionality within the function.

Copy link
Contributor

Choose a reason for hiding this comment

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

category Formatting Improvements priority 5

The 'broadcast' parameter is not documented in the function's docstring. It's important to keep the documentation up to date with the code to ensure that other developers can understand the purpose and usage of each parameter.

"""Logs an info message prefixed with the strategy name.

Uses python logging to log the message at the `info` level.
Expand All @@ -332,6 +332,9 @@ def log_message(self, message, color=None):
color : str
Color of the message. Eg. `"red"` or `"green"`.

broadcast : bool
If True, the message will be broadcasted to any connected message services.

Returns
-------
message : str
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="lumibot",
version="2.9.7",
version="2.9.8",
Copy link
Contributor

Choose a reason for hiding this comment

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

category Formatting Improvements priority 6

The version number has been updated in the setup.py file, but there is no information in the pull request description about what changes have been made that warrant this version update. It's important to provide this information so that other developers can understand what changes have been made and why the version number has been updated.

author="Robert Grzesik",
author_email="[email protected]",
description="Backtesting and Trading Library, Made by Lumiwealth",
Expand Down