Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #39

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/enhancement.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ______________________________________________________________________
#### Is your feature request related to a problem?

Provide a description of what the problem is, e.g. "I wish I could use pytask-stata to
do \[...\]".
do [...]".

#### Describe the solution you'd like

Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-added-large-files
args: [--maxkb=25]
Expand All @@ -25,7 +25,7 @@ repos:
- id: python-use-type-annotations
- id: text-unicode-replacement-char
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.4
rev: v0.11.0
hooks:
- id: ruff
- id: ruff-format
Expand All @@ -34,15 +34,15 @@ repos:
hooks:
- id: refurb
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.17
rev: 0.7.22
hooks:
- id: mdformat
additional_dependencies:
- mdformat-gfm
- mdformat-black
args: [--wrap, "88"]
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.4.1
hooks:
- id: codespell
- repo: meta
Expand Down
3 changes: 2 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import pytest
from click.testing import CliRunner
from pytask import storage

from pytask_stata.config import STATA_COMMANDS

needs_stata = pytest.mark.skipif(
Expand Down Expand Up @@ -78,6 +79,6 @@ def invoke(self, *args, **kwargs):
return super().invoke(*args, **kwargs)


@pytest.fixture()
@pytest.fixture
def runner():
return CustomCliRunner()
5 changes: 3 additions & 2 deletions tests/test_collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@

import pytest
from pytask import Mark

from pytask_stata.collect import _parse_stata_mark
from pytask_stata.collect import stata


@pytest.mark.unit()
@pytest.mark.unit
@pytest.mark.parametrize(
("args", "kwargs", "expectation", "expected"),
[
Expand All @@ -32,7 +33,7 @@ def test_stata(args, kwargs, expectation, expected):
assert options == expected


@pytest.mark.unit()
@pytest.mark.unit
@pytest.mark.parametrize(
("mark", "expectation", "expected"),
[
Expand Down
2 changes: 1 addition & 1 deletion tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from pytask import build


@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_marker_is_configured(tmp_path):
session = build(paths=tmp_path)

Expand Down
18 changes: 9 additions & 9 deletions tests/test_execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
from pytask import Task
from pytask import build
from pytask import cli

from pytask_stata.config import STATA_COMMANDS
from pytask_stata.execute import pytask_execute_task_setup

from tests.conftest import needs_stata


@pytest.mark.unit()
@pytest.mark.unit
@pytest.mark.parametrize(
("stata", "expectation"),
[(executable, does_not_raise()) for executable in STATA_COMMANDS]
Expand All @@ -42,7 +42,7 @@ def test_pytask_execute_task_setup_raise_error(stata, platform, expectation):


@needs_stata
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_run_do_file(runner, tmp_path):
task_source = """
import pytask
Expand Down Expand Up @@ -72,7 +72,7 @@ def task_run_do_file():


@needs_stata
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_run_do_file_w_task_decorator(runner, tmp_path):
task_source = """
import pytask
Expand Down Expand Up @@ -102,7 +102,7 @@ def run_do_file():
assert tmp_path.joinpath("script.log").exists()


@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_raise_error_if_stata_is_not_found(tmp_path, monkeypatch):
task_source = """
from pytask import mark, task
Expand All @@ -128,7 +128,7 @@ def task_run_do_file():


@needs_stata
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_run_do_file_w_wrong_cmd_option(runner, tmp_path):
"""Apparently, Stata simply discards wrong cmd options."""
task_source = """
Expand All @@ -154,7 +154,7 @@ def task_run_do_file():


@needs_stata
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_run_do_file_by_passing_path(runner, tmp_path):
"""Replicates example under "Command Line Arguments" in Readme."""
task_source = """
Expand All @@ -180,7 +180,7 @@ def task_run_do_file():


@needs_stata
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_run_do_file_fails_with_multiple_marks(runner, tmp_path):
task_source = """
import pytask
Expand All @@ -201,7 +201,7 @@ def task_run_do_file():


@needs_stata
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_with_task_without_path(runner, tmp_path):
task_source = """
import pytask
Expand Down
2 changes: 1 addition & 1 deletion tests/test_normal_execution_w_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from pytask import cli


@pytest.mark.end_to_end()
@pytest.mark.end_to_end
@pytest.mark.parametrize(
"dependencies",
[(), ("in.txt",), ("in_1.txt", "in_2.txt")],
Expand Down
4 changes: 2 additions & 2 deletions tests/test_parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@


@needs_stata
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_parallel_parametrization_over_source_files_w_loop(runner, tmp_path):
source = """
import pytask
Expand Down Expand Up @@ -56,7 +56,7 @@ def task_execute_do_file():


@needs_stata
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_parallel_parametrization_over_source_file_w_loop(runner, tmp_path):
source = """
import pytask
Expand Down
4 changes: 2 additions & 2 deletions tests/test_parametrize.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


@needs_stata
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_parametrized_execution_of_do_file_w_loop(runner, tmp_path):
source = """
import pytask
Expand Down Expand Up @@ -41,7 +41,7 @@ def task_execute_do_file():


@needs_stata
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_parametrize_command_line_options_w_loop(runner, tmp_path):
task_source = """
import pytask
Expand Down
Loading