alec-kr / F1PyStats

An open-source Python3 package that provides Formula 1 data to developers.
GNU General Public License v3.0
54 stars 19 forks source link

Added a function to get fastest lap based on the input year and race round #91

Closed malay5 closed 1 year ago

malay5 commented 2 years ago

Description

I have written a function to get the fastest lap for the particular year and particular round, which can be called like

fp.fastest_laps(year=2020,race_round=1)

I have also added a function, to convert the hh:mm.ss to seconds using _get_sec, as it might be needed for future enhancements.

Related Issue(s)

Fixes #76

malay5 commented 2 years ago

Please close this PR under hacktoberfest

malay5 commented 2 years ago

The code functions are fine, but the checks are failing. Can someone pls. help

youpong commented 2 years ago

The indentation of the following lines is seemed to be too deep. Try making them shallower.

youpong commented 2 years ago

L.430 seems to have worked. Just one more step.

youpong commented 2 years ago

L.434 should be indented the same as L.430.

malay5 commented 2 years ago

L.434 should be indented the same as L.430.

Resolved! Thanks a lot!

malay5 commented 2 years ago

Can you please add hacktober label to this PR?

malay5 commented 2 years ago

Can you please add hacktober label to this PR?

malay5 commented 2 years ago

Good function implementation.

However, you have not added any tests to your code. You should include tests when adding a new function/method to the repo.

Please add a test file called test_fastest_laps.py in /package_tests, which evaluates the results of the fastest_laps function.

You can have a look at other files within the /package_tests directory, to get an idea how the tests should be written.

I have added the package tests. Can you please add hacktober label to this PR

alec-kr commented 2 years ago

Can you please add hacktober label to this PR?

The label will be added once the PR is accepted.

alec-kr commented 2 years ago

@malay5 Are you making any progress on the issue?

alec-kr commented 1 year ago

Update: Since this PR's author has been inactive, the PR has been succeeded by #96.

96 is now merged to the main branch, so this PR will be closed.