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

Improve support for Sprint Shootout format #363

Merged
merged 2 commits into from
May 8, 2023

Conversation

mdsakalu
Copy link
Contributor

@mdsakalu mdsakalu commented May 5, 2023

  • Defined session tuples for "race-like" (saw this nomenclature in the docs in a few spots) and "quali-like" sessions which cleans up places where those groupings of sessions are used.
  • Updated docs to add Sprint Shootout where appropriate.
  • Added _calculate_quali_like_session_results method to calculate quali and sprint shootout results from laps.
  • Used _calculate_quali_like_session_results to calculate sprint shootout results since Ergast doesn't support that format yet.
  • Added some logic to support sprint_shootout event format when loading the schedule. Ergast doesn't support it yet, so for now assuming any sprint race for 2023 should use sprint_shootout format.
  • Added/updated some tests with sprint shootout scenarios.

fastf1/core.py Show resolved Hide resolved
fastf1/core.py Outdated Show resolved Hide resolved
fastf1/core.py Show resolved Hide resolved
fastf1/core.py Show resolved Hide resolved
fastf1/core.py Show resolved Hide resolved
@theOehrly
Copy link
Owner

Hi, thank you for this contribution. This is very well implemented, tested and documented already. I only have some minor notes that you should address, please.

The remaining CI failure is currently expected and unrelated. You can ignore that.

Handle cancelled quali sessions
Add soft_exceptions decorator
Also make session groupings variables private
@mdsakalu
Copy link
Contributor Author

mdsakalu commented May 8, 2023

Everything should be fixed now

@mdsakalu mdsakalu requested a review from theOehrly May 8, 2023 01:49
Copy link
Owner

@theOehrly theOehrly left a comment

Choose a reason for hiding this comment

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

Everything looks good now

@theOehrly
Copy link
Owner

I'll merge this as it is. The remaining CI failures are caused by some general problems with the test runs that I'm currently fixing. So they are unrelated.

Thank you very much for your work on this PR!

@theOehrly theOehrly merged commit 90fc63f into theOehrly:master May 8, 2023
5 of 7 checks passed
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.

None yet

2 participants