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 #76

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-latex 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=100']
Expand All @@ -26,7 +26,7 @@ repos:
- id: python-use-type-annotations
- id: text-unicode-replacement-char
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.1
rev: v0.11.2
hooks:
- id: ruff
- id: ruff-format
Expand All @@ -35,7 +35,7 @@ repos:
hooks:
- id: refurb
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.17
rev: 0.7.22
hooks:
- id: mdformat
additional_dependencies: [
Expand All @@ -44,7 +44,7 @@ repos:
]
args: [--wrap, "88"]
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.4.1
hooks:
- id: codespell
args: [-L als, -L falsy]
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,6 @@ def invoke(self, *args, **kwargs):
return super().invoke(*args, **kwargs)


@pytest.fixture()
@pytest.fixture
def runner():
return CustomCliRunner()
3 changes: 2 additions & 1 deletion tests/test_collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
from contextlib import ExitStack as does_not_raise # noqa: N813

import pytest

from pytask_latex.collect import latex


@pytest.mark.unit()
@pytest.mark.unit
@pytest.mark.parametrize(
("kwargs", "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)
assert "latex" in session.config["markers"]
40 changes: 20 additions & 20 deletions tests/test_execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
from pytask import Task
from pytask import build
from pytask import cli
from pytask_latex.execute import pytask_execute_task_setup

from pytask_latex.execute import pytask_execute_task_setup
from tests.conftest import TEST_RESOURCES
from tests.conftest import needs_latexmk
from tests.conftest import skip_on_github_actions_with_win


@pytest.mark.unit()
@pytest.mark.unit
def test_pytask_execute_task_setup(monkeypatch):
"""Make sure that the task setup raises errors."""
# Act like latexmk is installed since we do not test this.
Expand All @@ -33,7 +33,7 @@ def test_pytask_execute_task_setup(monkeypatch):

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_compile_latex_document(runner, tmp_path):
"""Test simple compilation."""
task_source = """
Expand All @@ -59,7 +59,7 @@ def task_compile_document():

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_compile_latex_document_w_relative(runner, tmp_path):
"""Test simple compilation."""
task_source = f"""
Expand Down Expand Up @@ -91,7 +91,7 @@ def task_compile_document():

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_compile_latex_document_to_different_name(runner, tmp_path):
"""Compile a LaTeX document where source and output name differ."""
task_source = """
Expand All @@ -118,7 +118,7 @@ def task_compile_document():

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_compile_w_bibliography(runner, tmp_path):
"""Compile a LaTeX document with bibliography."""
task_source = """
Expand Down Expand Up @@ -158,7 +158,7 @@ def task_compile_document():

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_raise_error_if_latexmk_is_not_found(tmp_path, monkeypatch):
task_source = """
from pytask import mark
Expand Down Expand Up @@ -192,7 +192,7 @@ def task_compile_document():

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_compile_latex_document_w_xelatex(runner, tmp_path):
task_source = """
from pytask import mark
Expand Down Expand Up @@ -227,7 +227,7 @@ def task_compile_document():

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_compile_latex_document_w_two_dependencies(runner, tmp_path):
task_source = """
from pytask import mark
Expand Down Expand Up @@ -255,7 +255,7 @@ def task_compile_document(path: Path = Path("in.txt")):

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_fail_because_script_is_not_latex(tmp_path):
task_source = """
from pytask import mark
Expand Down Expand Up @@ -283,7 +283,7 @@ def task_compile_document(path: Path = Path("in.txt")):

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_compile_document_to_out_if_document_has_relative_resources(tmp_path):
"""Test that motivates the ``"--cd"`` flag.

Expand Down Expand Up @@ -326,7 +326,7 @@ def task_compile_document(path: Path = Path("resources/content.tex")):

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_compile_document_w_wrong_flag(tmp_path):
"""Test that wrong flags raise errors."""
tmp_path.joinpath("sub").mkdir(parents=True)
Expand Down Expand Up @@ -361,7 +361,7 @@ def task_compile_document():


@needs_latexmk
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_compile_document_w_image(runner, tmp_path):
task_source = f"""
from pytask import Product
Expand Down Expand Up @@ -397,7 +397,7 @@ def task_compile_document():

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_compile_latex_document_w_multiple_marks(runner, tmp_path):
"""Test simple compilation."""
task_source = """
Expand Down Expand Up @@ -425,7 +425,7 @@ def task_compile_document():

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_compile_latex_document_with_wrong_extension(runner, tmp_path):
"""Test simple compilation."""
task_source = """
Expand All @@ -452,7 +452,7 @@ def task_compile_document():

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_compile_w_bibliography_and_keep_bbl(runner, tmp_path):
"""Compile a LaTeX document with bibliography."""
task_source = """
Expand Down Expand Up @@ -496,7 +496,7 @@ def task_compile_document(

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
@pytest.mark.parametrize(
("step", "message"),
[
Expand Down Expand Up @@ -536,7 +536,7 @@ def task_compile_document():

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_compile_latex_document_with_task_decorator(runner, tmp_path):
"""Test simple compilation."""
task_source = """
Expand All @@ -563,7 +563,7 @@ def compile_document():

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_use_task_without_path(tmp_path):
task_source = """
import pytask
Expand Down Expand Up @@ -591,7 +591,7 @@ def test_use_task_without_path(tmp_path):

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_collect_latex_document_with_product_from_another_task(runner, tmp_path):
"""Test simple compilation."""
task_source = """
Expand Down
2 changes: 1 addition & 1 deletion tests/test_latex_dependency_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
@pytest.mark.parametrize("infer_dependencies", ["true", "false"])
def test_infer_dependencies_from_task(tmp_path, infer_dependencies):
task_source = """
Expand Down
4 changes: 2 additions & 2 deletions tests/test_parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
@xfail_on_remote
@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_parallel_parametrization_over_source_files_w_loop(runner, tmp_path):
source = """
from pytask import mark, task
Expand Down Expand Up @@ -68,7 +68,7 @@ def task_compile_latex_document():
@xfail_on_remote
@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_parallel_parametrization_over_source_file_w_loop(runner, tmp_path):
source = """
from pytask import mark, task
Expand Down
4 changes: 2 additions & 2 deletions tests/test_parametrize.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_parametrized_compilation_of_latex_documents_w_loop(tmp_path):
source = """
from pytask import mark, task
Expand Down Expand Up @@ -48,7 +48,7 @@ def task_compile_latex_document():

@needs_latexmk
@skip_on_github_actions_with_win
@pytest.mark.end_to_end()
@pytest.mark.end_to_end
def test_parametrizing_latex_options_w_loop(tmp_path):
source = """
from pytask import mark, task
Expand Down
Loading