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

Making Apollo F1 Literate! #247

Closed
wants to merge 4 commits into from
Closed

Making Apollo F1 Literate! #247

wants to merge 4 commits into from

Conversation

aaj2005
Copy link
Contributor

@aaj2005 aaj2005 commented Apr 8, 2024

No description provided.

Copy link
Member

Choose a reason for hiding this comment

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

I think you might have some merge conflict tags left over in this file?

Copy link
Contributor

@ericthelemur ericthelemur left a comment

Choose a reason for hiding this comment

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

Functionality seems good, though please add a few comments at least


def get_meeting(self, country=None, year=None):
if country is None or year is None:
request = get_request(
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you replace these requests with non-blocking async requests? iirc there is a function to async fetch json in utils

},
)

if request.json()[0] is None:
Copy link
Contributor

Choose a reason for hiding this comment

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

Check is request and/or request.json() is fine first

Comment on lines +96 to +102
standings = [""] * len(drivers)
counter = 1
for position in stats:
if standings[position["position"] - 1] == "":
standings[position["position"] - 1] = position["driver_number"]
elif counter == len(drivers):
break
Copy link
Contributor

Choose a reason for hiding this comment

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

Unless the data you get back is very cursed, this feels like it could easily be a list comprehension over stats (sorted by position first)

@@ -27,6 +27,7 @@
if secret_key is None:
raise Exception("Set a secret key in config.yaml")


Copy link
Contributor

Choose a reason for hiding this comment

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

Why add a new line here?

@@ -15,6 +15,7 @@ def __init__(self, preferred):
# Default delimiter order
delimiters = ["\n", ";", ",", " "]


Copy link
Contributor

Choose a reason for hiding this comment

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

Why add a new line here?

<<<<<<< HEAD
Copy link
Contributor

Choose a reason for hiding this comment

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

Merge tags here as anna pointed out, can you remove .gitignore and the migration and splitutils from this pr?

@aaj2005
Copy link
Contributor Author

aaj2005 commented Apr 16, 2024

API has too many issues and data is too cursed

@aaj2005 aaj2005 closed this Apr 16, 2024
@Mole1424 Mole1424 deleted the f1 branch June 4, 2024 13:41
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.

3 participants