-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDevNotes.txt
More file actions
39 lines (35 loc) · 3.34 KB
/
DevNotes.txt
File metadata and controls
39 lines (35 loc) · 3.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
- 2017 race_list_basic.json has been largely, if not entirely, overwritten with 2018 data.
- In this year (at least) race IDs were sequential within each series respectively.
- First Cup (seriesID = 1) race of 2017 has race ID 4576.
- First Xfinity (seriesID = 2) race of 2017 has race ID 4617.
- First truck (seriesID = 3) race of 2017 has race ID 4650.
- Investigate how stage results were tracked (if at all) prior to 2020.
- Determine race for which the pit_box key was introduced for record keeping purposes.
- Add overloaded constructors for Result, Caution, Leader, Stage, PitStop, PitStops classes (and any others that are similar) so programmers can retrieve specific data of this type using season (year), seriesID, and round (like Race and/or Feed constructors.)
Functions:
- Within Race class:
- nextRace(sameSeries = True)
- prevRace(sameSeries = True)
- findDriver(str name)
- stageResults
- Just as a way to fetch results slightly more directly
- pitstops.filter(**kwargs)
- Allows users to filter list of pitstops from a race by any of the attributes housed within a PitStop object (i.e. by driver name, stop type, etc.).
PitStops.filter() takes a variable number of keyword arguments (one for each of the available attributes in PitStop) used to filter the list of PitStop objects based on the provided criteria.
- Initial version will allow direct matching for following attributes:
- Vehicle number, driver name, vehicle manufacturer, pit-in flag status, pit-out flag status, pit stop type.
Full race retrieval (2017 - 2025 Coke Zero Sugar 400)
Prior to refactoring Race object: 206.619s.
After refactoring Race object with .get: 185.909s, 177.838s.
- Testing results: [175.85101175308228, 118.87170433998108, 117.80800318717957, 118.16249132156372, 118.42328810691833, 117.07364130020142, 118.55185389518738, 123.31035804748535, 116.97611117362976, 117.4377269744873]
- NOTE: sudden drop after first is due to @cache on parseWeekendFeedURL() function.
After refactoring Feed object with .get + adding @cache decorator to parseLivePitDataURL() function:
- Testing results: [200.99301862716675, 64.95275855064392, 63.84943151473999, 62.8440260887146, 64.35030174255371, 66.4552252292633, 64.61206412315369, 74.80370903015137, 71.16882252693176, 63.68824577331543]
(NOTE: Cook Out Southern 500 race page now existent and included in iteration.)
After refactoring Results object with .get:
- Testing results: [172.2442111968994, 59.44237923622131, 58.97147727012634, 59.26832938194275, 61.106019258499146, 59.88838171958923, 59.217323303222656, 59.75578570365906, 68.04013752937317, 59.47891449928284]
After refactoring PitStop and PitStops with .get:
- Testing results: [175.93561148643494, 62.348288774490356, 60.81791925430298, 61.74087738990784, 60.95474672317505, 59.04414129257202, 59.23519778251648, 59.43310809135437, 59.12920045852661, 59.71314859390259]
- NOTE: Implementing sentinel values for each of the pit stop attributes simultaneously eliminated need to manually check for missing keys.
After implementing Event class and refactoring buildList function and implementing universal sentinel.
- Testing results: [184.48848676681519, 60.84104943275452, 60.683162212371826, 60.645922899246216, 61.044455766677856, 60.184781312942505, 60.54761862754822, 60.25888109207153, 60.23845076560974, 60.22330975532532]