Skip to content

Commit

Permalink
style: Sort imports
Browse files Browse the repository at this point in the history
  • Loading branch information
georgedouzas committed Sep 28, 2024
1 parent 9570012 commit a52d821
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 7 deletions.
1 change: 1 addition & 0 deletions docs/examples/modelling/plot_classifier_bettor.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from sklearn.model_selection import TimeSeriesSplit, cross_val_score
from sklearn.neighbors import KNeighborsClassifier
from sklearn.pipeline import make_pipeline

from sportsbet.datasets import SoccerDataLoader
from sportsbet.evaluation import ClassifierBettor, backtest

Expand Down
4 changes: 1 addition & 3 deletions src/sportsbet/datasets/_soccer/_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@

MODELLING_URL = 'https://github.com/georgedouzas/sports-betting/tree/data/data/soccer/modelling'
TRAINING_URL = 'https://raw.githubusercontent.com/georgedouzas/sports-betting/data/data/soccer/modelling/{league}_{division}_{year}.csv'
FIXTURES_URL = (
'https://raw.githubusercontent.com/georgedouzas/sports-betting/data/data/soccer/modelling/fixtures.csv'
)
FIXTURES_URL = 'https://raw.githubusercontent.com/georgedouzas/sports-betting/data/data/soccer/modelling/fixtures.csv'


class SoccerDataLoader(_BaseDataLoader):
Expand Down
1 change: 1 addition & 0 deletions tests/cli/test_bettor.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Test the bettor commands."""

import pytest

from sportsbet.cli import main


Expand Down
1 change: 1 addition & 0 deletions tests/cli/test_dataloader.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Test the dataloader commands."""

import pytest

from sportsbet.cli import main


Expand Down
1 change: 1 addition & 0 deletions tests/cli/test_main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Test the main commands."""

import pytest

from sportsbet.cli import main


Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def pandas_terminal_width() -> None: # noqa: PT004
pd.set_option('display.max_columns', 1000)


@pytest.fixture()
@pytest.fixture
def cli_config_path(tmp_path: Path) -> Path:
"""Create configuration file."""
with Path.open(tmp_path / 'config.py', 'wt') as config_file:
Expand Down
1 change: 1 addition & 0 deletions tests/datasets/test_dummy.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import pandas as pd
import pytest
from sklearn.model_selection import ParameterGrid

from sportsbet.datasets import DummySoccerDataLoader


Expand Down
3 changes: 2 additions & 1 deletion tests/evaluation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@

import numpy as np
import pandas as pd
from typing_extensions import Self

from sportsbet import Data
from sportsbet.datasets import DummySoccerDataLoader
from sportsbet.evaluation._base import _BaseBettor
from typing_extensions import Self

X_train, Y_train, O_train = DummySoccerDataLoader().extract_train_data(odds_type='williamhill')

Expand Down
2 changes: 1 addition & 1 deletion tests/evaluation/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import pandas as pd
import pytest
from sklearn.exceptions import NotFittedError
from sportsbet.evaluation._base import _BaseBettor

from sportsbet.evaluation._base import _BaseBettor
from tests.evaluation import O_train, TestBettor, X_train, Y_train


Expand Down
1 change: 1 addition & 0 deletions tests/evaluation/test_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from sklearn.dummy import DummyClassifier, DummyRegressor
from sklearn.exceptions import NotFittedError
from sklearn.utils.validation import check_is_fitted

from sportsbet.datasets import DummySoccerDataLoader
from sportsbet.evaluation import ClassifierBettor

Expand Down
2 changes: 1 addition & 1 deletion tests/evaluation/test_model_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import pytest
from sklearn.dummy import DummyClassifier
from sklearn.model_selection import KFold, TimeSeriesSplit
from sportsbet.evaluation import BettorGridSearchCV, ClassifierBettor, OddsComparisonBettor, backtest

from sportsbet.evaluation import BettorGridSearchCV, ClassifierBettor, OddsComparisonBettor, backtest
from tests.evaluation import O_train, TestBettor, X_train, Y_train


Expand Down
1 change: 1 addition & 0 deletions tests/evaluation/test_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import numpy as np
import pytest

from sportsbet.datasets import DummySoccerDataLoader
from sportsbet.evaluation import OddsComparisonBettor

Expand Down

0 comments on commit a52d821

Please sign in to comment.