Skip to content
This repository has been archived by the owner on Oct 14, 2019. It is now read-only.

WIP: Firms #271

Closed
wants to merge 14 commits into from
Closed

WIP: Firms #271

wants to merge 14 commits into from

Conversation

mappum
Copy link
Contributor

@mappum mappum commented Nov 20, 2018

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.

@thecsw thecsw added the enhancement New feature or request label Nov 20, 2018
@thecsw
Copy link
Owner

thecsw commented Nov 20, 2018

Hey! Looking forward to seeing this updated!

@thecsw thecsw self-requested a review November 21, 2018 18:57
@thecsw thecsw added this to the Season 2 milestone Nov 25, 2018
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))
Copy link
Owner

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

Copy link
Owner

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]

Copy link
Contributor Author

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.

Copy link
Owner

@thecsw thecsw Nov 27, 2018

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).\
Copy link
Owner

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?

Copy link
Contributor Author

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?

@ghost ghost assigned mappum Dec 26, 2018
@ghost ghost added the in progress label Dec 26, 2018
@mappum mappum mentioned this pull request Dec 27, 2018
@mappum
Copy link
Contributor Author

mappum commented Jan 13, 2019

Closing since all these changes are already in #286

@mappum mappum closed this Jan 13, 2019
@ghost ghost removed the in progress label Jan 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants