ticket-docket 1.3.0__tar.gz → 1.8.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/.gitignore +1 -0
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/PKG-INFO +42 -4
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/README.md +40 -3
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/pyproject.toml +2 -0
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/src/docket/__init__.py +1 -1
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/src/docket/cli/__init__.py +36 -10
- ticket_docket-1.8.0/src/docket/cli/commands.py +585 -0
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/src/docket/cli/grammar.py +152 -41
- ticket_docket-1.8.0/src/docket/cli/output.py +351 -0
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/src/docket/core/atomic.py +3 -2
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/src/docket/core/config.py +74 -24
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/src/docket/core/deploy.py +50 -21
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/src/docket/core/fields.py +47 -35
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/src/docket/core/graph.py +185 -49
- ticket_docket-1.8.0/src/docket/core/handoff.py +112 -0
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/src/docket/core/ids.py +53 -24
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/src/docket/core/inputs.py +25 -10
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/src/docket/core/lock.py +17 -9
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/src/docket/core/mermaid.py +45 -23
- ticket_docket-1.8.0/src/docket/core/resources.py +35 -0
- ticket_docket-1.8.0/src/docket/core/roadmap.py +91 -0
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/src/docket/core/store.py +96 -51
- ticket_docket-1.8.0/src/docket/core/templating.py +66 -0
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/src/docket/core/ticket.py +48 -17
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/src/docket/core/titles.py +12 -6
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/src/docket/core/validate.py +53 -29
- ticket_docket-1.8.0/src/docket/docs/roadmap.md.jinja +22 -0
- ticket_docket-1.8.0/src/docket/docs/writingTicketsOffsite.md.jinja +139 -0
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/src/docket/server.py +51 -43
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/src/docket/templates/CLAUDE.md +12 -0
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/src/docket/templates/docket.toml +4 -0
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/tests/test_cli.py +545 -10
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/tests/test_config.py +35 -1
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/tests/test_graph.py +169 -2
- ticket_docket-1.8.0/tests/test_handoff.py +146 -0
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/tests/test_inputs.py +5 -5
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/tests/test_packaging.py +2 -0
- ticket_docket-1.8.0/tests/test_roadmap.py +173 -0
- ticket_docket-1.3.0/src/docket/cli/commands.py +0 -457
- ticket_docket-1.3.0/src/docket/cli/output.py +0 -134
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/LICENSE +0 -0
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/scripts/bumpVersion.py +0 -0
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/src/docket/cli/__main__.py +0 -0
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/src/docket/core/__init__.py +0 -0
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/src/docket/core/errors.py +0 -0
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/src/docket/py.typed +0 -0
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/tests/concurrencyWorker.py +0 -0
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/tests/conftest.py +0 -0
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/tests/test_atomic.py +0 -0
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/tests/test_bumpVersion.py +0 -0
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/tests/test_concurrency.py +0 -0
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/tests/test_deploy.py +0 -0
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/tests/test_ids.py +0 -0
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/tests/test_lock.py +0 -0
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/tests/test_mermaid.py +0 -0
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/tests/test_server.py +0 -0
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/tests/test_store.py +0 -0
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/tests/test_ticket.py +0 -0
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/tests/test_titles.py +0 -0
- {ticket_docket-1.3.0 → ticket_docket-1.8.0}/tests/test_validate.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: ticket-docket
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.8.0
|
|
4
4
|
Summary: A per-repo ticketing system that is plain markdown for humans and structured MCP for agents
|
|
5
5
|
Project-URL: Homepage, https://github.com/Sorcerio/Docket
|
|
6
6
|
Project-URL: Repository, https://github.com/Sorcerio/Docket
|
|
@@ -21,6 +21,7 @@ Classifier: Topic :: Utilities
|
|
|
21
21
|
Classifier: Typing :: Typed
|
|
22
22
|
Requires-Python: >=3.12
|
|
23
23
|
Requires-Dist: filelock>=3.32.2
|
|
24
|
+
Requires-Dist: jinja2>=3.1.6
|
|
24
25
|
Requires-Dist: mcp<3,>=2
|
|
25
26
|
Requires-Dist: pyyaml>=6.0.3
|
|
26
27
|
Requires-Dist: rich-argparse>=1.8.0
|
|
@@ -116,14 +117,30 @@ Unknown fields are round-tripped untouched. Filenames are frozen at creation so
|
|
|
116
117
|
A ticket id is the command:
|
|
117
118
|
|
|
118
119
|
```bash
|
|
119
|
-
docket CORE-14 # show it, dependency context and all
|
|
120
|
-
docket CORE-14
|
|
121
|
-
docket CORE-14 ready # true or false. Every dependency done?
|
|
120
|
+
docket CORE-14 # show it, dependency context and all, with the body rendered as Markdown
|
|
121
|
+
docket CORE-14 show --plain # the same content as bare text, body left raw
|
|
122
122
|
docket CORE-14 done # todo, wip, or done. The file follows
|
|
123
123
|
docket CORE-14 set [-t TEXT] [-p N] [-r A,B|none] [-ra A,B] [-rr A,B]
|
|
124
124
|
docket CORE-14 meta [KEY [VALUE]] [-c]
|
|
125
125
|
```
|
|
126
126
|
|
|
127
|
+
Every frontmatter field has an accessor that prints the value and nothing else, for a pipe:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
docket CORE-14 title # the title
|
|
131
|
+
docket CORE-14 status # todo, wip, or done
|
|
132
|
+
docket CORE-14 priority # the number
|
|
133
|
+
docket CORE-14 requires # one id per line, nothing when empty
|
|
134
|
+
docket CORE-14 required-by # the reverse direction, same shape
|
|
135
|
+
docket CORE-14 key # CORE
|
|
136
|
+
docket CORE-14 ready # true or false. Every dependency done?
|
|
137
|
+
docket CORE-14 body # the raw Markdown body, no frontmatter
|
|
138
|
+
docket CORE-14 meta # the whole map as JSON
|
|
139
|
+
docket CORE-14 meta KEY # one value, bare, or JSON when it has structure
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
JSON is highlighted in a terminal and plain when piped, so `docket CORE-14 meta | jq` works as written.
|
|
143
|
+
|
|
127
144
|
Everything else works on the set:
|
|
128
145
|
|
|
129
146
|
```bash
|
|
@@ -132,8 +149,14 @@ docket list [-s todo] [-k CORE] [-m 2] [-r]
|
|
|
132
149
|
docket graph [-i CORE-14 | -k GEN | -s todo] [-o FILE]
|
|
133
150
|
docket key list | add KEY "desc" [-r TEXT] | remove KEY
|
|
134
151
|
docket validate | deploy PATH | upgrade PATH
|
|
152
|
+
docket docs handoff [-p] [-o FILE]
|
|
153
|
+
docket docs roadmap [CORE-14 | GEN | todo] [-m N] [-p] [-o FILE]
|
|
135
154
|
```
|
|
136
155
|
|
|
156
|
+
`docs` writes a file: `handoff.md` and `roadmap.md` at the repo root. `-p/--print` sends it to stdout instead, `-o` picks another path, and passing both writes the file and prints it. `graph` is the exception, printing unless you ask for a file, because its output is usually piped.
|
|
157
|
+
|
|
158
|
+
`docket docs roadmap` is the committable picture of the graph: a markdown file wrapping a mermaid diagram, plus the legend a renderer that ignores styling would otherwise leave you without. Past `maxRoadmapNodes` it drops the completed tickets furthest from the work still open, and never drops an open ticket, so the diagram stays readable without losing what is ahead.
|
|
159
|
+
|
|
137
160
|
`-r` replaces the dependency list. `-ra` and `-rr` edit the one already there. Both in one call is refused.
|
|
138
161
|
|
|
139
162
|
A ticket is ready when every id in its `requires` names a ticket that is `done`. A missing dependency blocks, and a `done` ticket is never ready, so `docket list -r` is the set you can pick up right now.
|
|
@@ -158,6 +181,18 @@ Every short flag has a long form (`-k/--key`, `-p/--priority`, `-m/--priority-ma
|
|
|
158
181
|
| `validate()` | Structured findings. |
|
|
159
182
|
| `set_metadata(id, key, value?)` | One entry at a time, leaving every other key alone. |
|
|
160
183
|
|
|
184
|
+
## Writing Tickets Elsewhere
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
docket docs handoff > brief.md
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Prints a brief written for a chat system that has no access to your repository. Paste it in, describe the project, and it writes ticket files by hand.
|
|
191
|
+
|
|
192
|
+
The brief is rendered against this repository, so it names your registered keys, the first free number under each, your priority band, and the directory the files belong in. Nothing is left for it to guess.
|
|
193
|
+
|
|
194
|
+
Save what comes back into your todo directory and run `docket validate`. That is the whole import step, because every rule an importer would need already lives there. Tickets written somewhere else are checked by the same code as the ones written here.
|
|
195
|
+
|
|
161
196
|
## Key Ticket Rules
|
|
162
197
|
|
|
163
198
|
1. **Dependencies point one way.** A ticket declares `requires` and nothing else. Reverse edges are derived, so a one-sided edge is impossible rather than merely detectable.
|
|
@@ -175,6 +210,7 @@ doneDir = "done"
|
|
|
175
210
|
defaultPriority = 2
|
|
176
211
|
maxPriority = 4
|
|
177
212
|
lockTimeout = 5.0
|
|
213
|
+
maxRoadmapNodes = 200
|
|
178
214
|
|
|
179
215
|
[keys]
|
|
180
216
|
# Primary arch
|
|
@@ -185,6 +221,8 @@ META = "campaign and progression"
|
|
|
185
221
|
|
|
186
222
|
A key's rationale becomes the comment above it, and removing the key takes the comment with it. The status vocabulary is deliberately not configurable.
|
|
187
223
|
|
|
224
|
+
`maxRoadmapNodes` is how many nodes `docket docs roadmap` aims to draw, and `0` turns the ceiling off.
|
|
225
|
+
|
|
188
226
|
`docket deploy` never rewrites an existing `.docket.toml`. Run `docket upgrade .` later to refresh the template and repair the server entry without touching your config or tickets.
|
|
189
227
|
|
|
190
228
|
## Concurrent Access
|
|
@@ -85,14 +85,30 @@ Unknown fields are round-tripped untouched. Filenames are frozen at creation so
|
|
|
85
85
|
A ticket id is the command:
|
|
86
86
|
|
|
87
87
|
```bash
|
|
88
|
-
docket CORE-14 # show it, dependency context and all
|
|
89
|
-
docket CORE-14
|
|
90
|
-
docket CORE-14 ready # true or false. Every dependency done?
|
|
88
|
+
docket CORE-14 # show it, dependency context and all, with the body rendered as Markdown
|
|
89
|
+
docket CORE-14 show --plain # the same content as bare text, body left raw
|
|
91
90
|
docket CORE-14 done # todo, wip, or done. The file follows
|
|
92
91
|
docket CORE-14 set [-t TEXT] [-p N] [-r A,B|none] [-ra A,B] [-rr A,B]
|
|
93
92
|
docket CORE-14 meta [KEY [VALUE]] [-c]
|
|
94
93
|
```
|
|
95
94
|
|
|
95
|
+
Every frontmatter field has an accessor that prints the value and nothing else, for a pipe:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
docket CORE-14 title # the title
|
|
99
|
+
docket CORE-14 status # todo, wip, or done
|
|
100
|
+
docket CORE-14 priority # the number
|
|
101
|
+
docket CORE-14 requires # one id per line, nothing when empty
|
|
102
|
+
docket CORE-14 required-by # the reverse direction, same shape
|
|
103
|
+
docket CORE-14 key # CORE
|
|
104
|
+
docket CORE-14 ready # true or false. Every dependency done?
|
|
105
|
+
docket CORE-14 body # the raw Markdown body, no frontmatter
|
|
106
|
+
docket CORE-14 meta # the whole map as JSON
|
|
107
|
+
docket CORE-14 meta KEY # one value, bare, or JSON when it has structure
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
JSON is highlighted in a terminal and plain when piped, so `docket CORE-14 meta | jq` works as written.
|
|
111
|
+
|
|
96
112
|
Everything else works on the set:
|
|
97
113
|
|
|
98
114
|
```bash
|
|
@@ -101,8 +117,14 @@ docket list [-s todo] [-k CORE] [-m 2] [-r]
|
|
|
101
117
|
docket graph [-i CORE-14 | -k GEN | -s todo] [-o FILE]
|
|
102
118
|
docket key list | add KEY "desc" [-r TEXT] | remove KEY
|
|
103
119
|
docket validate | deploy PATH | upgrade PATH
|
|
120
|
+
docket docs handoff [-p] [-o FILE]
|
|
121
|
+
docket docs roadmap [CORE-14 | GEN | todo] [-m N] [-p] [-o FILE]
|
|
104
122
|
```
|
|
105
123
|
|
|
124
|
+
`docs` writes a file: `handoff.md` and `roadmap.md` at the repo root. `-p/--print` sends it to stdout instead, `-o` picks another path, and passing both writes the file and prints it. `graph` is the exception, printing unless you ask for a file, because its output is usually piped.
|
|
125
|
+
|
|
126
|
+
`docket docs roadmap` is the committable picture of the graph: a markdown file wrapping a mermaid diagram, plus the legend a renderer that ignores styling would otherwise leave you without. Past `maxRoadmapNodes` it drops the completed tickets furthest from the work still open, and never drops an open ticket, so the diagram stays readable without losing what is ahead.
|
|
127
|
+
|
|
106
128
|
`-r` replaces the dependency list. `-ra` and `-rr` edit the one already there. Both in one call is refused.
|
|
107
129
|
|
|
108
130
|
A ticket is ready when every id in its `requires` names a ticket that is `done`. A missing dependency blocks, and a `done` ticket is never ready, so `docket list -r` is the set you can pick up right now.
|
|
@@ -127,6 +149,18 @@ Every short flag has a long form (`-k/--key`, `-p/--priority`, `-m/--priority-ma
|
|
|
127
149
|
| `validate()` | Structured findings. |
|
|
128
150
|
| `set_metadata(id, key, value?)` | One entry at a time, leaving every other key alone. |
|
|
129
151
|
|
|
152
|
+
## Writing Tickets Elsewhere
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
docket docs handoff > brief.md
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Prints a brief written for a chat system that has no access to your repository. Paste it in, describe the project, and it writes ticket files by hand.
|
|
159
|
+
|
|
160
|
+
The brief is rendered against this repository, so it names your registered keys, the first free number under each, your priority band, and the directory the files belong in. Nothing is left for it to guess.
|
|
161
|
+
|
|
162
|
+
Save what comes back into your todo directory and run `docket validate`. That is the whole import step, because every rule an importer would need already lives there. Tickets written somewhere else are checked by the same code as the ones written here.
|
|
163
|
+
|
|
130
164
|
## Key Ticket Rules
|
|
131
165
|
|
|
132
166
|
1. **Dependencies point one way.** A ticket declares `requires` and nothing else. Reverse edges are derived, so a one-sided edge is impossible rather than merely detectable.
|
|
@@ -144,6 +178,7 @@ doneDir = "done"
|
|
|
144
178
|
defaultPriority = 2
|
|
145
179
|
maxPriority = 4
|
|
146
180
|
lockTimeout = 5.0
|
|
181
|
+
maxRoadmapNodes = 200
|
|
147
182
|
|
|
148
183
|
[keys]
|
|
149
184
|
# Primary arch
|
|
@@ -154,6 +189,8 @@ META = "campaign and progression"
|
|
|
154
189
|
|
|
155
190
|
A key's rationale becomes the comment above it, and removing the key takes the comment with it. The status vocabulary is deliberately not configurable.
|
|
156
191
|
|
|
192
|
+
`maxRoadmapNodes` is how many nodes `docket docs roadmap` aims to draw, and `0` turns the ceiling off.
|
|
193
|
+
|
|
157
194
|
`docket deploy` never rewrites an existing `.docket.toml`. Run `docket upgrade .` later to refresh the template and repair the server entry without touching your config or tickets.
|
|
158
195
|
|
|
159
196
|
## Concurrent Access
|
|
@@ -30,6 +30,7 @@ classifiers = [
|
|
|
30
30
|
]
|
|
31
31
|
dependencies = [
|
|
32
32
|
"filelock>=3.32.2",
|
|
33
|
+
"jinja2>=3.1.6",
|
|
33
34
|
"mcp>=2,<3",
|
|
34
35
|
"pyyaml>=6.0.3",
|
|
35
36
|
"rich>=15.0.0",
|
|
@@ -73,6 +74,7 @@ testpaths = ["tests"]
|
|
|
73
74
|
|
|
74
75
|
[dependency-groups]
|
|
75
76
|
dev = [
|
|
77
|
+
"pdoc>=16.0.0",
|
|
76
78
|
"pytest>=9.1.1",
|
|
77
79
|
"twine>=6.1.0",
|
|
78
80
|
]
|
|
@@ -13,31 +13,40 @@ import sys
|
|
|
13
13
|
from typing import Optional
|
|
14
14
|
|
|
15
15
|
from docket.cli.commands import (
|
|
16
|
+
FIELD_READERS,
|
|
16
17
|
commandDeploy,
|
|
18
|
+
commandDocs,
|
|
19
|
+
commandField,
|
|
17
20
|
commandGraph,
|
|
18
21
|
commandKey,
|
|
19
22
|
commandList,
|
|
20
23
|
commandMeta,
|
|
21
24
|
commandNew,
|
|
25
|
+
commandRoadmap,
|
|
22
26
|
commandSet,
|
|
23
27
|
commandShow,
|
|
24
28
|
commandStatus,
|
|
25
|
-
commandStatusRead,
|
|
26
29
|
commandTicket,
|
|
27
30
|
commandValidate,
|
|
31
|
+
documentPath,
|
|
32
|
+
emitDocument,
|
|
33
|
+
requireScopeKey,
|
|
28
34
|
)
|
|
29
35
|
from docket.cli.grammar import (
|
|
36
|
+
ACCESSORS,
|
|
30
37
|
CLEAR_SENTINEL,
|
|
31
38
|
EXIT_INVALID,
|
|
32
39
|
EXIT_OK,
|
|
33
40
|
EXIT_USAGE,
|
|
34
|
-
|
|
41
|
+
FIELD_ACCESSORS,
|
|
42
|
+
OUTPUT_ARGUMENT,
|
|
35
43
|
PROGRAM_NAME,
|
|
36
44
|
TICKET_COMMAND,
|
|
37
45
|
TOKEN_ID,
|
|
38
46
|
TOKEN_KEY,
|
|
39
47
|
TOKEN_PRIORITY,
|
|
40
48
|
TOKEN_STATUS,
|
|
49
|
+
addScopeArguments,
|
|
41
50
|
buildParser,
|
|
42
51
|
classifyToken,
|
|
43
52
|
describeKeys,
|
|
@@ -58,11 +67,14 @@ from docket.core.store import Store
|
|
|
58
67
|
|
|
59
68
|
# `docket.cli` was one module before it was a package, and it is what `pyproject.toml` names as the console script. Everything the outside world reached for then is still reachable by the same path.
|
|
60
69
|
__all__: list[str] = [
|
|
70
|
+
"ACCESSORS",
|
|
61
71
|
"CLEAR_SENTINEL",
|
|
62
72
|
"EXIT_INVALID",
|
|
63
73
|
"EXIT_OK",
|
|
64
74
|
"EXIT_USAGE",
|
|
65
|
-
"
|
|
75
|
+
"FIELD_ACCESSORS",
|
|
76
|
+
"FIELD_READERS",
|
|
77
|
+
"OUTPUT_ARGUMENT",
|
|
66
78
|
"PROGRAM_NAME",
|
|
67
79
|
"STATUS_STYLES",
|
|
68
80
|
"TICKET_COMMAND",
|
|
@@ -71,28 +83,34 @@ __all__: list[str] = [
|
|
|
71
83
|
"TOKEN_PRIORITY",
|
|
72
84
|
"TOKEN_STATUS",
|
|
73
85
|
"Output",
|
|
86
|
+
"addScopeArguments",
|
|
74
87
|
"buildContextTable",
|
|
75
88
|
"buildParser",
|
|
76
89
|
"classifyToken",
|
|
77
90
|
"commandDeploy",
|
|
91
|
+
"commandDocs",
|
|
92
|
+
"commandField",
|
|
78
93
|
"commandGraph",
|
|
79
94
|
"commandKey",
|
|
80
95
|
"commandList",
|
|
81
96
|
"commandMeta",
|
|
82
97
|
"commandNew",
|
|
98
|
+
"commandRoadmap",
|
|
83
99
|
"commandSet",
|
|
84
100
|
"commandShow",
|
|
85
101
|
"commandStatus",
|
|
86
|
-
"commandStatusRead",
|
|
87
102
|
"commandTicket",
|
|
88
103
|
"commandValidate",
|
|
89
104
|
"describeKeys",
|
|
90
105
|
"describePriorities",
|
|
91
106
|
"dispatch",
|
|
107
|
+
"documentPath",
|
|
108
|
+
"emitDocument",
|
|
92
109
|
"main",
|
|
93
110
|
"parseEditIdList",
|
|
94
111
|
"parseIdList",
|
|
95
112
|
"relativeToRoot",
|
|
113
|
+
"requireScopeKey",
|
|
96
114
|
"resolveGraphScope",
|
|
97
115
|
"resolveListFilters",
|
|
98
116
|
"rewriteIdFirst",
|
|
@@ -106,9 +124,11 @@ def main(argv: Optional[list[str]] = None) -> int:
|
|
|
106
124
|
"""
|
|
107
125
|
Entry point for the `docket` console script.
|
|
108
126
|
|
|
109
|
-
|
|
127
|
+
Args:
|
|
128
|
+
argv: Argument list to parse, defaulting to `sys.argv[1:]`.
|
|
110
129
|
|
|
111
|
-
Returns
|
|
130
|
+
Returns:
|
|
131
|
+
The process exit code.
|
|
112
132
|
"""
|
|
113
133
|
|
|
114
134
|
# Read the configuration before the parser is built, so the help text can name the keys and priorities this repository actually allows. A missing one is not fatal here, since the commands that need it say so themselves.
|
|
@@ -139,17 +159,23 @@ def dispatch(args: argparse.Namespace, config: Optional[Config], output: Output)
|
|
|
139
159
|
"""
|
|
140
160
|
Route parsed arguments to the command that handles them.
|
|
141
161
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
162
|
+
Args:
|
|
163
|
+
args: The parsed arguments.
|
|
164
|
+
config: The configuration already discovered for the help text, or `None` when none was found.
|
|
165
|
+
output: Where to write.
|
|
145
166
|
|
|
146
|
-
Returns
|
|
167
|
+
Returns:
|
|
168
|
+
The process exit code.
|
|
147
169
|
"""
|
|
148
170
|
|
|
149
171
|
# Deploy and upgrade run before a configuration exists, or in order to repair one, so they must not require discovering it first.
|
|
150
172
|
if args.command in ("deploy", "upgrade"):
|
|
151
173
|
return commandDeploy(args, output)
|
|
152
174
|
|
|
175
|
+
# A shipped document renders with or without a configuration, so it must not be gated behind discovering one either.
|
|
176
|
+
if args.command == "docs":
|
|
177
|
+
return commandDocs(args, config, output)
|
|
178
|
+
|
|
153
179
|
# Every other command works against the configuration governing the current directory. Discovery is repeated when the parser was built without one, so the reason it could not be found is reported by the code that knows it.
|
|
154
180
|
store: Store = Store(config if config is not None else discoverConfig())
|
|
155
181
|
|