Skip to content

Commit a410e9b

Browse files
committed
fix
1 parent f6f6a21 commit a410e9b

1 file changed

Lines changed: 11 additions & 15 deletions

File tree

docs/source/how_to_guides/reconciling_lockfile_state.md

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,14 @@ Use [`pytask lock`](../reference_guides/commands.md#pytask-lock) when the curren
44
in the project are already correct and only the recorded state in `pytask.lock` needs to
55
catch up.
66

7-
This is an advanced workflow. Most of the time,
8-
[`pytask build`](../reference_guides/commands.md#pytask-build) is the right command.
9-
Reach for `pytask lock` when you want to change the lockfile without executing tasks.
10-
11-
!!! warning
12-
13-
`pytask lock` is a sharp tool. It updates recorded state without proving that the files
14-
were produced by the current task definitions.
15-
167
## When is this useful?
178

189
Typical situations are:
1910

2011
- You reformatted or reorganized a task file and do not want to rerun an expensive task.
2112
- You renamed or moved a task and want to accept the current outputs for the new task.
22-
- You produced outputs manually or elsewhere and now want to register them in the
23-
lockfile.
13+
- You produced outputs outside of pytask and now want to register the task along the
14+
outputs in the lockfile.
2415
- You deleted or renamed tasks and want to remove their stale lockfile entries.
2516

2617
## Preview changes first
@@ -72,14 +63,19 @@ instead of accepting incomplete state.
7263
## Reset recorded state
7364

7465
Use [`pytask lock reset`](../reference_guides/commands.md#pytask-lock-reset) to remove
75-
recorded state for selected tasks.
66+
recorded state for selected tasks. The following command removes the recorded state for
67+
all tasks.
7668

7769
```console
78-
$ pytask lock reset -k train
70+
$ pytask lock reset
7971
```
8072

81-
Unlike `accept`, `reset` works on the exact selected tasks. It does not automatically
82-
include ancestors.
73+
Unlike `accept`, `reset` with a selector works on the exact selected tasks. It does not
74+
automatically include ancestors.
75+
76+
```console
77+
$ pytask lock reset -k train
78+
```
8379

8480
On the next build, `pytask` determines again whether these tasks require execution. This
8581
is useful when state was accepted too broadly or when you want a specific task to be

0 commit comments

Comments
 (0)