Skip to content

Commit adf9376

Browse files
committed
Merge branch 'main' into add-datacatalog-name
2 parents 0fb00d0 + 541cfc6 commit adf9376

23 files changed

+54
-4137
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
run: tox -e test -- -m "unit or (not integration and not end_to_end)" --cov=src --cov=tests --cov-report=xml -n auto
6363

6464
- name: Upload unit test coverage reports to Codecov with GitHub Action
65-
uses: codecov/codecov-action@v4
65+
uses: codecov/codecov-action@v5
6666
with:
6767
flags: unit
6868

@@ -71,7 +71,7 @@ jobs:
7171
run: tox -e test -- -m integration --cov=src --cov=tests --cov-report=xml -n auto
7272

7373
- name: Upload integration test coverage reports to Codecov with GitHub Action
74-
uses: codecov/codecov-action@v4
74+
uses: codecov/codecov-action@v5
7575
with:
7676
flags: integration
7777

@@ -80,6 +80,6 @@ jobs:
8080
run: tox -e test -- -m end_to_end --cov=src --cov=tests --cov-report=xml -n auto
8181

8282
- name: Upload end_to_end test coverage reports to Codecov with GitHub Action
83-
uses: codecov/codecov-action@v4
83+
uses: codecov/codecov-action@v5
8484
with:
8585
flags: end_to_end

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ tests/test_jupyter/*.txt
2727
.ruff_cache
2828
.venv
2929
docs/jupyter_execute
30+
uv.lock

.pre-commit-config.yaml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,8 @@ repos:
2424
- id: python-check-mock-methods
2525
- id: python-no-log-warn
2626
- id: text-unicode-replacement-char
27-
- repo: https://github.com/aio-libs/sort-all
28-
rev: v1.2.0
29-
hooks:
30-
- id: sort-all
3127
- repo: https://github.com/astral-sh/ruff-pre-commit
32-
rev: v0.7.1
28+
rev: v0.8.4
3329
hooks:
3430
- id: ruff-format
3531
- id: ruff
@@ -38,32 +34,32 @@ repos:
3834
hooks:
3935
- id: refurb
4036
- repo: https://github.com/executablebooks/mdformat
41-
rev: 0.7.18
37+
rev: 0.7.21
4238
hooks:
4339
- id: mdformat
4440
additional_dependencies: [
4541
mdformat-gfm,
46-
mdformat-black,
47-
mdformat-pyproject,
42+
mdformat-ruff,
43+
mdformat-pyproject>=0.0.2,
4844
]
4945
files: (README\.md)
5046
- repo: https://github.com/executablebooks/mdformat
51-
rev: 0.7.18
47+
rev: 0.7.21
5248
hooks:
5349
- id: mdformat
5450
additional_dependencies: [
5551
mdformat-myst,
56-
mdformat-black,
57-
mdformat-pyproject,
52+
mdformat-ruff,
53+
mdformat-pyproject>=0.0.2,
5854
]
5955
files: (docs/.)
6056
- repo: https://github.com/kynan/nbstripout
61-
rev: 0.7.1
57+
rev: 0.8.1
6258
hooks:
6359
- id: nbstripout
6460
exclude: (docs)
6561
- repo: https://github.com/crate-ci/typos
66-
rev: v1.26.8
62+
rev: v1.28.4
6763
hooks:
6864
- id: typos
6965
exclude: (\.ipynb)

docs/source/changes.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@ chronological order. Releases follow [semantic versioning](https://semver.org/)
55
releases are available on [PyPI](https://pypi.org/project/pytask) and
66
[Anaconda.org](https://anaconda.org/conda-forge/pytask).
77

8-
## 0.5.2 - 2024-09-15
8+
## 0.5.2 - 2024-12-19
99

1010
- {pull}`633` adds support for Python 3.13 and drops support for 3.8.
1111
- {pull}`640` stops the live display when an exception happened during the execution.
1212
- {pull}`646` adds a `.gitignore` to the `.pytask/` folder to exclude it from version
1313
control.
14+
- {pull}`656` fixes the return type of the hash function for {class}`PythonNode`s.
15+
Thanks to {user}`axtimhaus` for reporting the issue.
16+
- {pull}`657` documents `pipefunc`, another tool for executing graphs consisting out of
17+
functions.
1418

1519
## 0.5.1 - 2024-07-20
1620

docs/source/explanations/comparison_to_other_tools.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,3 +126,8 @@ General
126126
## [zenml](https://github.com/zenml-io/zenml)
127127

128128
## [flyte](https://github.com/flyteorg/flyte)
129+
130+
## [pipefunc](https://github.com/pipefunc/pipefunc)
131+
132+
A tool for executing graphs made out of functions. More focused on computational
133+
compared to workflow graphs.

docs/source/how_to_guides/hashing_inputs_of_tasks.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ the `__hash__()` method of the object.
4444
Some objects like {class}`tuple` and {class}`typing.NamedTuple` are hashable and return
4545
correct hashes by default.
4646

47-
```python
47+
```pycon
4848
>>> hash((1, 2))
4949
-3550055125485641917
5050
```
@@ -54,7 +54,7 @@ from interpreter session to interpreter session for security reasons (see
5454
{meth}`object.__hash__` for more information). pytask will hash them using the
5555
{mod}`hashlib` module to create a stable hash.
5656

57-
```python
57+
```pycon
5858
>>> from pytask import PythonNode
5959
>>> node = PythonNode(value="Hello, World!", hash=True)
6060
>>> node.state()
@@ -72,7 +72,8 @@ $ pip install deepdiff
7272
$ conda install deepdiff
7373
```
7474

75-
Then, create the hash function and pass it to the node.
75+
Then, create the hash function and pass it to the node. Make sure it returns either an
76+
integer or a string.
7677

7778
`````{tab-set}
7879

docs/source/how_to_guides/provisional_nodes_and_task_generators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,6 @@ content to a `.txt` file.
8989
```
9090

9191
```{important}
92-
The generated tasks need to be decoratored with {func}`@task <pytask.task>` to be
92+
The generated tasks need to be decorated with {func}`@task <pytask.task>` to be
9393
collected.
9494
```

docs/source/how_to_guides/the_data_catalog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ for model_name in MODEL_NAMES:
122122

123123
@task
124124
def fit_model(
125-
path: Path = Path("...", data_name)
125+
path: Path = Path("...", data_name),
126126
) -> Annotated[
127127
Any, nested_data_catalogs[model_name][data_name]["fitted_model"]
128128
]:

docs/source/how_to_guides/writing_custom_nodes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,9 @@ databases. [^kedro]
142142

143143
## References
144144

145-
[^structural-subtyping]: Structural subtyping is similar to ABCs an approach in Python to enforce interfaces, but
146-
it can be considered more pythonic since it is closer to duck typing. Hynek Schlawack
147-
wrote a comprehensive
145+
[^structural-subtyping]: Structural subtyping is similar to ABCs an approach in Python to enforce interfaces,
146+
but it can be considered more pythonic since it is closer to duck typing. Hynek
147+
Schlawack wrote a comprehensive
148148
[guide on subclassing](https://hynek.me/articles/python-subclassing-redux/) that
149149
features protocols under "Type 2". Glyph wrote an introduction to protocols called
150150
[I want a new duck](https://glyph.twistedmatrix.com/2020/07/new-duck.html).

docs/source/tutorials/defining_dependencies_products.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,7 @@ Applied to the tasks from before, we could have written `task_plot_data` as
257257

258258
```python
259259
@task(after=task_create_random_data)
260-
def task_plot_data(...):
261-
...
260+
def task_plot_data(): ...
262261
```
263262

264263
You can also pass a list of task functions.
@@ -268,8 +267,7 @@ tasks. Here, we can pass the function name or a significant part of the function
268267

269268
```python
270269
@task(after="random_data")
271-
def task_plot_data(...):
272-
...
270+
def task_plot_data(): ...
273271
```
274272

275273
You will learn more about expressions in {doc}`selecting_tasks`.

0 commit comments

Comments
 (0)