Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into dark-mode-index
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasraabe committed Aug 18, 2024
2 parents 42b379f + 55cbec9 commit 0186b9d
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 20 deletions.
7 changes: 3 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,10 @@ repos:
hooks:
- id: nbstripout
exclude: (docs)
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
- repo: https://github.com/crate-ci/typos
rev: v1.23.6
hooks:
- id: codespell
additional_dependencies: [tomli]
- id: typos
exclude: (\.ipynb)
- repo: meta
hooks:
Expand Down
3 changes: 3 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[default.extend-words]
ines = "ines"
thes = "thes" # profiling-tasks.md
8 changes: 3 additions & 5 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,12 @@
}

intersphinx_mapping = {
"click": ("https://click.palletsprojects.com/en/8.0.x/", None),
"deepdiff": ("https://zepworks.com/deepdiff/current/", None),
"click": ("https://click.palletsprojects.com/en/8.0.x", None),
"deepdiff": ("https://zepworks.com/deepdiff/current", None),
"networkx": ("https://networkx.org/documentation/stable", None),
"nx": ("https://networkx.org/documentation/stable", None),
"pandas": ("https://pandas.pydata.org/docs", None),
"pd": ("https://pandas.pydata.org/docs", None),
"pluggy": ("https://pluggy.readthedocs.io/en/latest", None),
"pygraphviz": ("https://pygraphviz.github.io/documentation/stable/", None),
"pygraphviz": ("https://pygraphviz.github.io/documentation/stable", None),
"python": ("https://docs.python.org/3.10", None),
}

Expand Down
4 changes: 2 additions & 2 deletions docs/source/how_to_guides/bp_structure_of_task_files.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ The body of the task function should contain two things:
The rest of the module is made of {term}`private functions <private function>` with a
leading underscore which are used to accomplish this and only this task.

Here is an example of a task module which conforms to all advices.
Here is an example of a task module which conforms to all advice.

```{literalinclude} ../../../docs_src/how_to_guides/bp_structure_of_task_files.py
```

```{seealso}
The structure of the task module is greatly inspired by John Ousterhout's "A Philosopy
The structure of the task module is greatly inspired by John Ousterhout's "A Philosophy
of Software Design" in which he coins the name "deep modules". In short, deep modules
have simple interfaces which are defined by one or a few {term}`public functions <public
function>` (or classes) which provide the functionality. The complexity is hidden inside
Expand Down
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,6 @@ disable_error_code = ["import-not-found"]
module = ["_pytask.hookspecs"]
disable_error_code = ["empty-body"]

[tool.codespell]
skip = "*.js,*/termynal.css"

[tool.refurb]
python_version = "3.8"

Expand Down
2 changes: 1 addition & 1 deletion src/_pytask/capture.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ def start(self) -> None:
def done(self) -> None:
"""Stop capturing.
Stop capturing, restore streams, return original capture file, seeked to
Stop capturing, restore streams, return original capture file, sought to
position zero.
"""
Expand Down
8 changes: 5 additions & 3 deletions src/_pytask/clean.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def _find_all_unknown_paths(
return list(
itertools.chain.from_iterable(
[
_find_all_unkown_paths_per_recursive_node(node, include_directories)
_find_all_unknown_paths_per_recursive_node(node, include_directories)
for node in recursive_nodes
]
)
Expand Down Expand Up @@ -305,7 +305,7 @@ def __repr__(self) -> str:
return f"<Node at {self.path} is {'unknown' if self.is_unknown else 'known'}>"


def _find_all_unkown_paths_per_recursive_node(
def _find_all_unknown_paths_per_recursive_node(
node: _RecursivePathNode, include_directories: bool
) -> Generator[Path, None, None]:
"""Return unknown paths per recursive file node.
Expand All @@ -318,4 +318,6 @@ def _find_all_unkown_paths_per_recursive_node(
yield node.path
else:
for n in node.sub_nodes:
yield from _find_all_unkown_paths_per_recursive_node(n, include_directories)
yield from _find_all_unknown_paths_per_recursive_node(
n, include_directories
)
4 changes: 2 additions & 2 deletions tests/test_skipping.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def test_pytask_execute_task_setup(marker_name, force, expectation):


@pytest.mark.end_to_end()
def test_skip_has_precendence_over_ancestor_failed(runner, tmp_path):
def test_skip_has_precedence_over_ancestor_failed(runner, tmp_path):
source = """
from pathlib import Path
Expand All @@ -278,7 +278,7 @@ def task_example_2(path=Path("file.txt")): ...


@pytest.mark.end_to_end()
def test_skipif_has_precendence_over_ancestor_failed(runner, tmp_path):
def test_skipif_has_precedence_over_ancestor_failed(runner, tmp_path):
source = """
from pathlib import Path
import pytask
Expand Down

0 comments on commit 0186b9d

Please sign in to comment.