Skip to content

Commit

Permalink
Added data validation file, changed some of the parameters in config.…
Browse files Browse the repository at this point in the history
…yaml
  • Loading branch information
CodingMaster121 committed Feb 9, 2025
1 parent 57cbd0f commit 352efec
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 22 deletions.
4 changes: 2 additions & 2 deletions falconscoutcore/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)

from data_validation.data_val_2024 import DataValidation2024
from data_validation.data_val_2025 import DataValidation2025

load_dotenv()
github_instance = Github(os.getenv("GITHUB_KEY"))
Expand Down Expand Up @@ -205,7 +205,7 @@ def run_dataval(success_col) -> None:
:param success_col: The column to write status messages for running the data validator in.
"""
data_validator = DataValidation2024("./data_validation/config.yaml")
data_validator = DataValidation2025("./data_validation/config.yaml")

with open(CONFIG["data_config"]["json_file"]) as scouting_data_file:
data_validator.validate_data(load(scouting_data_file))
Expand Down
4 changes: 3 additions & 1 deletion falconscoutcore/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@
"Alliance",
"DriverStation",
"TeamNumber",
"StartingPosition",
"AutoLeave",
"ScoringSide",
"AutoCoralL1",
"AutoCoralL2",
"AutoCoralL3",
"AutoCoralL4",
"AutoBarge",
"AutoProcessor",
"AutoCenterline",
"AutoLeave",
"AutoNotes",
"TeleopCoralL1",
"TeleopCoralL2",
Expand Down
45 changes: 26 additions & 19 deletions falconscoutcore/data_validation/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# core setup features
year: 2024
year: 2025
event_code: "mdowi"
run_with_tba: false
path_to_data: "data/2024cur_match_data.json"
Expand All @@ -15,24 +15,31 @@ driver_station": "DriverStation"
# optional parameters - if it is needed for a data check and is
# not listed, the check will not run

# Crescendo 2024: hyper-specific parameters
auto_speaker: "AutoSpeaker"
auto_amp: "AutoAmp"
auto_leave: "AutoLeave"
auto_centerline: "AutoCenterline"
teleop_speaker: "TeleopSpeaker"
teleop_amp: "TeleopAmp"
teleop_trap: "TeleopTrap"
teleop_passing: "TeleopPassing"
parked: "Parked"
climbed: "ClimbStatus"
harmonized: "Harmonized"
climb_speed: "ClimbSpeed"
disabled: "Disabled"
driver_rating: "DriverRating"
defense_time: "DefenseTime"
defense_skill: "DefenseSkill"
counter_defense_skill: "CounterDefenseSkill"
# Reefscape 2025: hyper-specific parameters
auto_starting_position: "StartingPosition",
auto_leave: "AutoLeave",
auto_scoring_side: "ScoringSide",
auto_coral_l1: "AutoCoralL1",
auto_coral_l2: "AutoCoralL2",
auto_coral_l3: "AutoCoralL3",
auto_coral_l4: "AutoCoralL4",
auto_barge: "AutoBarge",
auto_processor: "AutoProcessor",
auto_centerline: "AutoCenterline",
teleop_coral_l1: "TeleopCoralL1",
teleop_coral_l2: "TeleopCoralL2",
teleop_coral_l3: "TeleopCoralL3",
teleop_coral_l4: "TeleopCoralL4",
teleop_algae_barge: "TeleopAlgaeBarge",
teleop_algae_processor: "TeleopAlgaeProcessor",
endgame_parked: "Parked",
endgame_climb_status: "ClimbStatus",
endgame_climb_speed: "ClimbSpeed",
disabled: "Disabled",
stability_rating: "StabilityRating",
robot_style_type: "RobotStyleType",
driver_rating: "DriverRating",
intake_defense_rating: "IntakeDefenseRating",

# parameters for notes
auto_notes: "AutoNotes"
Expand Down
13 changes: 13 additions & 0 deletions falconscoutcore/data_validation/data_val_2025.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import json
from itertools import chain

from falconscoutcore.data_validation.base_data_val import BaseDataValidation
from falconscoutcore.data_validation.config.constants import ChargedUp
from falconscoutcore.data_validation.config.utils import (ErrorType, get_intersection_of_n_series)
from numpy import logical_or
from pandas import DataFrame, Series, concat, isna, notna


class DataValidation2025(BaseDataValidation):
def __init__(self, path_to_config: str = "config.yaml"):
super().__init__(path_to_config)

0 comments on commit 352efec

Please sign in to comment.