Skip to content

Commit

Permalink
Run updated hooks.
Browse files Browse the repository at this point in the history
  • Loading branch information
hmgaudecker committed Aug 20, 2024
1 parent ecdf405 commit e946d88
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ repos:
hooks:
- id: yamllint
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.6
rev: v0.6.1
hooks:
# Run the linter.
- id: ruff
Expand Down
1 change: 1 addition & 0 deletions documents/task_documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import pytask
from pytask_latex import compilation_steps as cs

from template_project.config import BLD, DOCUMENTS, ROOT

documents = ["paper", "presentation"]
Expand Down
3 changes: 2 additions & 1 deletion tests/analysis/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
import numpy as np
import pandas as pd
import pytest

from template_project.analysis.model_template import fit_logit_model

DESIRED_PRECISION = 10e-2


@pytest.fixture()
@pytest.fixture
def data():
rng = np.random.default_rng(seed=0)
x = rng.normal(size=100_000)
Expand Down
5 changes: 3 additions & 2 deletions tests/analysis/test_predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@
import pandas as pd
import pytest
from pandas.testing import assert_frame_equal

from template_project.analysis.predict_template import predict_prob_by_age


@pytest.fixture()
@pytest.fixture
def data():
out = pd.DataFrame([1, 2, 3], columns=["age"])
out["education"] = ["high-school", "high-school", "university"]
out["income"] = ["high", "low", "low"]
return out


@pytest.fixture()
@pytest.fixture
def model():
class ModelClass:
@staticmethod
Expand Down
3 changes: 2 additions & 1 deletion tests/data_management/test_stats4schools_smoking.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import pandas as pd
import pytest
from pandas.testing import assert_series_equal

from template_project.data_management.stats4schools_smoking_template import (
_clean_current_smoker,
_clean_gender,
Expand All @@ -15,7 +16,7 @@ def assert_categorical_equal(left, right):
assert_series_equal(pd.Series(left), pd.Series(right))


@pytest.fixture()
@pytest.fixture
def data():
data = {
"highest_qualification": [
Expand Down
1 change: 1 addition & 0 deletions tests/test_template.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import pytask
from _pytask.outcomes import ExitCode

from template_project import config
from template_project.config import ROOT

Expand Down

0 comments on commit e946d88

Please sign in to comment.