# Path: socceraction/atomic/spadl/schema.py
# class AtomicSPADLSchema(pa.SchemaModel):
#     """Definition of an Atomic-SPADL dataframe."""
# 
#     game_id: Series[Any] = pa.Field()
#     original_event_id: Series[Any] = pa.Field(nullable=True)
#     action_id: Series[int] = pa.Field()
#     period_id: Series[int] = pa.Field(ge=1, le=5)
#     time_seconds: Series[float] = pa.Field(ge=0)
#     team_id: Series[Any] = pa.Field()
#     player_id: Series[Any] = pa.Field()
#     x: Series[float] = pa.Field(ge=0, le=spadlconfig.field_length)
#     y: Series[float] = pa.Field(ge=0, le=spadlconfig.field_width)
#     dx: Series[float] = pa.Field(ge=-spadlconfig.field_length, le=spadlconfig.field_length)
#     dy: Series[float] = pa.Field(ge=-spadlconfig.field_width, le=spadlconfig.field_width)
#     bodypart_id: Series[int] = pa.Field(isin=spadlconfig.bodyparts_df().bodypart_id)
#     bodypart_name: Optional[Series[str]] = pa.Field(isin=spadlconfig.bodyparts_df().bodypart_name)
#     type_id: Series[int] = pa.Field(isin=spadlconfig.actiontypes_df().type_id)
#     type_name: Optional[Series[str]] = pa.Field(isin=spadlconfig.actiontypes_df().type_name)
# 
#     class Config:  # noqa: D106
#         strict = True
#         coerce = True
# 
# Path: socceraction/spadl/schema.py
# class SPADLSchema(pa.SchemaModel):
#     """Definition of a SPADL dataframe."""
# 
#     game_id: Series[Any] = pa.Field()
#     original_event_id: Series[Any] = pa.Field(nullable=True)
#     action_id: Series[int] = pa.Field()
#     period_id: Series[int] = pa.Field(ge=1, le=5)
#     time_seconds: Series[float] = pa.Field(ge=0)
#     team_id: Series[Any] = pa.Field()
#     player_id: Series[Any] = pa.Field()
#     start_x: Series[float] = pa.Field(ge=0, le=spadlconfig.field_length)
#     start_y: Series[float] = pa.Field(ge=0, le=spadlconfig.field_width)
#     end_x: Series[float] = pa.Field(ge=0, le=spadlconfig.field_length)
#     end_y: Series[float] = pa.Field(ge=0, le=spadlconfig.field_width)
#     bodypart_id: Series[int] = pa.Field(isin=spadlconfig.bodyparts_df().bodypart_id)
#     bodypart_name: Optional[Series[str]] = pa.Field(isin=spadlconfig.bodyparts_df().bodypart_name)
#     type_id: Series[int] = pa.Field(isin=spadlconfig.actiontypes_df().type_id)
#     type_name: Optional[Series[str]] = pa.Field(isin=spadlconfig.actiontypes_df().type_name)
#     result_id: Series[int] = pa.Field(isin=spadlconfig.results_df().result_id)
#     result_name: Optional[Series[str]] = pa.Field(isin=spadlconfig.results_df().result_name)
# 
#     class Config:  # noqa: D106
#         strict = True
#         coerce = True


import os
import pandas as pd
import pytest
from _pytest.config import Config
from pandera.typing import DataFrame
from socceraction.atomic.spadl import AtomicSPADLSchema
from socceraction.spadl import SPADLSchema
"""Configuration for pytest."""




def pytest_configure(config: Config) -> None:
    """Pytest configuration hook."""
    config.addinivalue_line("markers", "e2e: mark as end-to-end test.")


@pytest.fixture(scope='session')
def spadl_actions() -> DataFrame[SPADLSchema]:
    json_file = os.path.join(os.path.dirname(__file__), 'datasets', 'spadl', 'spadl.json')
    return pd.read_json(json_file, orient='records')


@pytest.fixture(scope='session')

# Path: socceraction/atomic/spadl/schema.py
# class AtomicSPADLSchema(pa.SchemaModel):
#     """Definition of an Atomic-SPADL dataframe."""
# 
#     game_id: Series[Any] = pa.Field()
#     original_event_id: Series[Any] = pa.Field(nullable=True)
#     action_id: Series[int] = pa.Field()
#     period_id: Series[int] = pa.Field(ge=1, le=5)
#     time_seconds: Series[float] = pa.Field(ge=0)
#     team_id: Series[Any] = pa.Field()
#     player_id: Series[Any] = pa.Field()
#     x: Series[float] = pa.Field(ge=0, le=spadlconfig.field_length)
#     y: Series[float] = pa.Field(ge=0, le=spadlconfig.field_width)
#     dx: Series[float] = pa.Field(ge=-spadlconfig.field_length, le=spadlconfig.field_length)
#     dy: Series[float] = pa.Field(ge=-spadlconfig.field_width, le=spadlconfig.field_width)
#     bodypart_id: Series[int] = pa.Field(isin=spadlconfig.bodyparts_df().bodypart_id)
#     bodypart_name: Optional[Series[str]] = pa.Field(isin=spadlconfig.bodyparts_df().bodypart_name)
#     type_id: Series[int] = pa.Field(isin=spadlconfig.actiontypes_df().type_id)
#     type_name: Optional[Series[str]] = pa.Field(isin=spadlconfig.actiontypes_df().type_name)
# 
#     class Config:  # noqa: D106
#         strict = True
#         coerce = True
# 
# Path: socceraction/spadl/schema.py
# class SPADLSchema(pa.SchemaModel):
#     """Definition of a SPADL dataframe."""
# 
#     game_id: Series[Any] = pa.Field()
#     original_event_id: Series[Any] = pa.Field(nullable=True)
#     action_id: Series[int] = pa.Field()
#     period_id: Series[int] = pa.Field(ge=1, le=5)
#     time_seconds: Series[float] = pa.Field(ge=0)
#     team_id: Series[Any] = pa.Field()
#     player_id: Series[Any] = pa.Field()
#     start_x: Series[float] = pa.Field(ge=0, le=spadlconfig.field_length)
#     start_y: Series[float] = pa.Field(ge=0, le=spadlconfig.field_width)
#     end_x: Series[float] = pa.Field(ge=0, le=spadlconfig.field_length)
#     end_y: Series[float] = pa.Field(ge=0, le=spadlconfig.field_width)
#     bodypart_id: Series[int] = pa.Field(isin=spadlconfig.bodyparts_df().bodypart_id)
#     bodypart_name: Optional[Series[str]] = pa.Field(isin=spadlconfig.bodyparts_df().bodypart_name)
#     type_id: Series[int] = pa.Field(isin=spadlconfig.actiontypes_df().type_id)
#     type_name: Optional[Series[str]] = pa.Field(isin=spadlconfig.actiontypes_df().type_name)
#     result_id: Series[int] = pa.Field(isin=spadlconfig.results_df().result_id)
#     result_name: Optional[Series[str]] = pa.Field(isin=spadlconfig.results_df().result_name)
# 
#     class Config:  # noqa: D106
#         strict = True
#         coerce = True


# Path: tests/conftest.py
import os
import pandas as pd
import pytest
from _pytest.config import Config
from pandera.typing import DataFrame
from socceraction.atomic.spadl import AtomicSPADLSchema
from socceraction.spadl import SPADLSchema

"""Configuration for pytest."""




def pytest_configure(config: Config) -> None:
    """Pytest configuration hook."""
    config.addinivalue_line("markers", "e2e: mark as end-to-end test.")


@pytest.fixture(scope='session')
def spadl_actions() -> DataFrame[SPADLSchema]:
    json_file = os.path.join(os.path.dirname(__file__), 'datasets', 'spadl', 'spadl.json')
    return pd.read_json(json_file, orient='records')


@pytest.fixture(scope='session')

def atomic_spadl_actions() -> DataFrame[AtomicSPADLSchema]: