Skip to content

Commit 17ebab8

Browse files
committed
Merge remote-tracking branch 'origin/main' into codex/fix-task-generator-execution
# Conflicts: # src/_pytask/provisional.py # tests/test_mark.py # tests/test_provisional.py
2 parents f02f0dc + b3f5178 commit 17ebab8

69 files changed

Lines changed: 2188 additions & 915 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/main.yml‎

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ jobs:
2626
contents: read
2727

2828
steps:
29-
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
29+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3030
with:
3131
persist-credentials: false
32-
- uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
32+
- uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
3333
with:
3434
enable-cache: true
3535
- name: Install just
3636
uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4.0.0
3737
with:
38-
just-version: "1.43.1"
38+
just-version: "1.58.0"
3939
- name: Install graphviz
4040
run: |
4141
sudo apt-get update
@@ -56,33 +56,38 @@ jobs:
5656
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
5757

5858
steps:
59-
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
59+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
6060
with:
6161
persist-credentials: false
62-
- uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
62+
- uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
6363
with:
6464
enable-cache: true
6565
python-version: ${{ matrix.python-version }}
6666
- name: Install just
6767
uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4.0.0
6868
with:
69-
just-version: "1.43.1"
69+
just-version: "1.58.0"
7070

7171
- if: matrix.os == 'ubuntu-latest'
7272
run: |
7373
sudo apt-get update
7474
sudo apt-get install graphviz graphviz-dev
7575
7676
- name: Run tests, doctests, and notebook tests
77-
if: matrix.os != 'windows-latest' || matrix.python-version != '3.14'
77+
if: matrix.os != 'windows-latest'
7878
shell: bash -l {0}
7979
run: just test-cov
8080

81+
- name: Run tests on Windows
82+
if: matrix.os == 'windows-latest' && matrix.python-version != '3.14'
83+
shell: bash -l {0}
84+
run: just test-cov --snapshot-warn-unused
85+
8186
# pywin32 has no wheels for Python 3.14 yet, so skip notebook tests
8287
- name: Run tests without notebook tests (Windows + Python 3.14)
8388
if: matrix.os == 'windows-latest' && matrix.python-version == '3.14'
8489
shell: bash -l {0}
85-
run: uv run --group test pytest --cov=src --cov=tests --cov-report=xml -n auto
90+
run: uv run --group test pytest --cov=src --cov=tests --cov-report=xml -n auto --snapshot-warn-unused
8691

8792
- name: Upload test coverage reports to Codecov with GitHub Action
8893
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0

‎.github/workflows/publish-to-pypi.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ jobs:
1212
contents: read
1313

1414
steps:
15-
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
15+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
1616
with:
1717
persist-credentials: false
1818
- name: Install uv
19-
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
19+
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
2020
with:
2121
enable-cache: true
2222
python-version: "3.13"
@@ -47,7 +47,7 @@ jobs:
4747
name: python-package-distributions
4848
path: dist/
4949
- name: Install uv
50-
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
50+
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
5151
- name: Publish distribution 📦 to PyPI
5252
run: uv publish
5353

@@ -70,7 +70,7 @@ jobs:
7070
name: python-package-distributions
7171
path: dist/
7272
- name: Sign the dists with Sigstore
73-
uses: sigstore/gh-action-sigstore-python@5b79a39c381910c090341a2c9b0bf022c8b387e1 # v3.4.0
73+
uses: sigstore/gh-action-sigstore-python@790bc6befb9d733738f18d8f895854b453640ec9 # v3.5.0
7474
with:
7575
inputs: >-
7676
./dist/*.tar.gz

‎.github/workflows/update-plugin-list.yml‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ jobs:
1919

2020
steps:
2121
- name: Checkout
22-
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
22+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2323
with:
2424
fetch-depth: 0
2525
persist-credentials: false
2626

2727
- name: Install uv
28-
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
28+
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
2929
with:
3030
python-version: 3.12
3131

@@ -39,6 +39,5 @@ jobs:
3939
author: 'Tobias Raabe <tobiasraabe@users.noreply.github.com>'
4040
branch: update-plugin-list/patch
4141
delete-branch: true
42-
branch-suffix: short-commit-hash
4342
title: '[automated] Update plugin list'
4443
body: '[automated] Update plugin list'

‎.github/workflows/zizmor.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ jobs:
2222
security-events: write
2323

2424
steps:
25-
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
25+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2626
with:
2727
persist-credentials: false
2828

29-
- uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
29+
- uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
3030
with:
3131
enable-cache: true
3232
python-version: '3.13'
@@ -43,6 +43,6 @@ jobs:
4343
always() &&
4444
(github.event_name != 'pull_request' ||
4545
github.event.pull_request.head.repo.full_name == github.repository)
46-
uses: github/codeql-action/upload-sarif@54f647b7e1bb85c95cddabcd46b0c578ec92bc1a # v4
46+
uses: github/codeql-action/upload-sarif@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4
4747
with:
4848
sarif_file: zizmor.sarif

‎.pre-commit-config.yaml‎

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,13 @@ repos:
1717
args: [--branch, main]
1818
- id: trailing-whitespace
1919
exclude: (__snapshots__)
20-
- repo: https://github.com/pre-commit/pygrep-hooks
21-
rev: v1.10.0
22-
hooks:
23-
- id: python-check-blanket-noqa
24-
- id: python-check-mock-methods
25-
- id: python-no-log-warn
26-
- id: text-unicode-replacement-char
2720
- repo: https://github.com/astral-sh/ruff-pre-commit
28-
rev: v0.16.0
21+
rev: v0.16.5
2922
hooks:
3023
- id: ruff-format
3124
- id: ruff-check
3225
- repo: https://github.com/astral-sh/uv-pre-commit
33-
rev: 0.11.32
26+
rev: 0.12.7
3427
hooks:
3528
- id: uv-lock
3629
- repo: local

‎CHANGELOG.md‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,36 @@ releases are available on [PyPI](https://pypi.org/project/pytask) and
77

88
## Unreleased
99

10+
- [#977](https://github.com/pytask-dev/pytask/pull/977) allows marker expressions
11+
passed to `-m` to select tasks by marker keyword arguments.
12+
- [#976](https://github.com/pytask-dev/pytask/pull/976) makes invalid marker and
13+
keyword expressions raise the standard `SyntaxError` instead of a custom parser
14+
exception.
15+
- [#975](https://github.com/pytask-dev/pytask/pull/975) validates marker names in `-m`
16+
expressions when `--strict-markers` is enabled.
17+
- [#974](https://github.com/pytask-dev/pytask/pull/974) applies configured warning
18+
filters to warnings emitted by configuration hooks.
19+
- [#973](https://github.com/pytask-dev/pytask/pull/973) enables navigating chained
20+
exceptions in post-mortem PDB sessions on Python 3.13 and newer.
21+
- [#969](https://github.com/pytask-dev/pytask/pull/969) initializes readline before
22+
output capture so libedit-backed interactive prompts and debuggers remain responsive.
23+
- [#971](https://github.com/pytask-dev/pytask/pull/971) restores help text for
24+
PDB commands wrapped by pytask.
25+
- [#970](https://github.com/pytask-dev/pytask/pull/970) prevents tee-sys capture from
26+
replaying output that was already displayed when capture stops before its buffer is
27+
read.
28+
- [#972](https://github.com/pytask-dev/pytask/pull/972) uses
29+
`importlib.import_module` for dynamic imports of custom PDB classes and warning
30+
categories.
31+
- [#968](https://github.com/pytask-dev/pytask/pull/968) improves the performance of file
32+
descriptor capture for tasks that produce no output.
33+
- [#967](https://github.com/pytask-dev/pytask/pull/967) documents the pytest provenance
34+
of the adapted debugging, marker, and warning modules.
1035
- [#889](https://github.com/pytask-dev/pytask/pull/889) improves typing for tree
1136
operations by wrapping optree's pytree utilities with pytask-specific signatures
1237
and requiring optree 0.16.0 or newer.
38+
- [#932](https://github.com/pytask-dev/pytask/pull/932) validates unique task signatures
39+
during collection.
1340

1441
## 0.6.0 - 2026-05-01
1542

‎docs/source/how_to_guides/bp_complex_task_repetitions.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ specifications to analyze the datasets like in the following example. The task a
1717
are derived from the dimensions.
1818

1919
```py
20-
--8<-- "docs_src/how_to_guides/bp_complex_task_repetitions/example.py"
20+
--8 < --"docs_src/how_to_guides/bp_complex_task_repetitions/example.py"
2121
```
2222

2323
There is nothing wrong with using nested loops for simpler projects. But, often projects
@@ -47,7 +47,7 @@ to not be bothered with defining paths.
4747
[how-to guide](the_data_catalog.md).
4848

4949
```py
50-
--8<-- "docs_src/how_to_guides/bp_complex_task_repetitions/config.py"
50+
--8 < --"docs_src/how_to_guides/bp_complex_task_repetitions/config.py"
5151
```
5252

5353
There are some things to be said.
@@ -62,7 +62,7 @@ Next, we will use these newly defined data structures and see how our tasks chan
6262
we use them.
6363

6464
```py
65-
--8<-- "docs_src/how_to_guides/bp_complex_task_repetitions/example_improved.py"
65+
--8 < --"docs_src/how_to_guides/bp_complex_task_repetitions/example_improved.py"
6666
```
6767

6868
As you see, we lost a level of indentation and we moved all the generations of names and

‎docs/source/how_to_guides/bp_structure_of_task_files.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ are used to accomplish this and only this task.
8080
Here is an example of a task module which conforms to all advice.
8181

8282
```py
83-
--8<-- "docs_src/how_to_guides/bp_structure_of_task_files.py"
83+
--8 < --"docs_src/how_to_guides/bp_structure_of_task_files.py"
8484
```
8585

8686
!!! note

‎docs/source/how_to_guides/capture_warnings.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pytask captures warnings during the execution.
55
Here is an example with the most infamous warning in the world of scientific Python.
66

77
```py title="task_example.py"
8-
--8<-- "docs_src/how_to_guides/capturing_warnings_1.py"
8+
--8 < --"docs_src/how_to_guides/capturing_warnings_1.py"
99
```
1010

1111
Running pytask produces
@@ -53,7 +53,7 @@ to add warning filters to specific test items, allowing you to have finer contro
5353
which warnings should be captured at the test, class or even module level:
5454

5555
```py title="task_example.py"
56-
--8<-- "docs_src/how_to_guides/capturing_warnings_2.py"
56+
--8 < --"docs_src/how_to_guides/capturing_warnings_2.py"
5757
```
5858

5959
Filters applied using a mark take precedence over filters passed on the command line or

‎docs/source/how_to_guides/hashing_inputs_of_tasks.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ In the following example, the argument `text` will be parsed as a
1313
[`pytask.PythonNode`](../reference_guides/api/nodes_and_tasks.md#pytask.PythonNode).
1414

1515
```py
16-
--8<-- "docs_src/how_to_guides/hashing_inputs_of_tasks_example_1_py310.py"
16+
--8 < --"docs_src/how_to_guides/hashing_inputs_of_tasks_example_1_py310.py"
1717
```
1818

1919
By default, pytask does not detect changes in
@@ -27,7 +27,7 @@ when the input changed. For that, we need to use the
2727
`hash = True`.
2828

2929
```py
30-
--8<-- "docs_src/how_to_guides/hashing_inputs_of_tasks_example_2_py310.py"
30+
--8 < --"docs_src/how_to_guides/hashing_inputs_of_tasks_example_2_py310.py"
3131
```
3232

3333
When `hash=True`, pytask will call the builtin `hash` on the input that will call the
@@ -68,5 +68,5 @@ Then, create the hash function and pass it to the node. Make sure it returns eit
6868
integer or a string.
6969

7070
```py
71-
--8<-- "docs_src/how_to_guides/hashing_inputs_of_tasks_example_3_py310.py"
71+
--8 < --"docs_src/how_to_guides/hashing_inputs_of_tasks_example_3_py310.py"
7272
```

0 commit comments

Comments
 (0)