-
-
Notifications
You must be signed in to change notification settings - Fork 33
Conversation
… start with the same sequence of characters
Hey! Looking forward to seeing this updated! |
src/main.py
Outdated
@@ -430,5 +452,9 @@ def main(): | |||
traceback.print_exc() | |||
time.sleep(10) | |||
|
|||
def concat_names(investors): | |||
names = list(map(lambda i: "/u/" + i.name, investors)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a little note, MIB is Python3.X oriented, so I would strongly suggest on changing python2 lambda expressions to python3 list comprehension
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be something like:
names = ["/u/" + x.name for x in investors]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do. I'm a python noob so let me know if there is anything else I could do differently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just taking a quick look, everything looks fantastic! I will leave some comments if I have some. Thank you for your work!
all()) | ||
traders = concat_names( | ||
sess.query(Investor).\ | ||
filter(Investor.firm == firm.id).\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we need to join the tables here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already did a query to retrieve the firm data above, so it seems like doing the user queries without the join and just using querying by firm id would be a little faster. Or is there a better way of doing it that I'm missing?
Closing since all these changes are already in #286 |
This PR is a work-in-progress and is not ready to be merged
This is where I'll be implementing the basic firms functionality as outlined in this post.