Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#159)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate
* Manual update
* Run updated hooks.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Hans-Martin von Gaudecker <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and hmgaudecker authored Aug 20, 2024
1 parent d9990e2 commit 2ac1ecf
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .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.3
rev: v0.6.1
hooks:
# Run the linter.
- id: ruff
Expand Down Expand Up @@ -75,7 +75,7 @@ repos:

# R specific hooks: https://github.com/lorenzwalthert/precommit
- repo: https://github.com/lorenzwalthert/precommit
rev: v0.4.2
rev: v0.4.3
hooks:
- id: style-files
args: [--style_pkg=styler, --style_fun=tidyverse_style]
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 2ac1ecf

Please sign in to comment.