mktask 0.1.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.
- mktask-0.1.0/.gitignore +9 -0
- mktask-0.1.0/CLAUDE.md +63 -0
- mktask-0.1.0/LICENSE +190 -0
- mktask-0.1.0/PKG-INFO +98 -0
- mktask-0.1.0/PLAN.md +198 -0
- mktask-0.1.0/README.md +69 -0
- mktask-0.1.0/mktask/__init__.py +8 -0
- mktask-0.1.0/mktask/__main__.py +153 -0
- mktask-0.1.0/mktask/mktask.toml +75 -0
- mktask-0.1.0/mktask/static/app.json +578 -0
- mktask-0.1.0/mktask/static/index.html +24 -0
- mktask-0.1.0/mktask/static/mktask.css +13 -0
- mktask-0.1.0/pyproject.toml +49 -0
- mktask-0.1.0/tests/__init__.py +0 -0
- mktask-0.1.0/tests/test_cli.py +33 -0
- mktask-0.1.0/tests/test_config.py +226 -0
- mktask-0.1.0/tests/test_server.py +286 -0
- mktask-0.1.0/tests/test_ui_config.py +313 -0
mktask-0.1.0/.gitignore
ADDED
mktask-0.1.0/CLAUDE.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# mktask
|
|
2
|
+
|
|
3
|
+
Work task prioritizer built on [mkio](https://github.com/markuskimius/mkio) (config-driven microservice backend: SQLite + WebSocket services) and [mkui](https://github.com/markuskimius/mkui) (config-driven Web Components workspace). Sibling of [mkfix](../mkfix), whose structure this repo copies.
|
|
4
|
+
|
|
5
|
+
## Quick start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install -e '.[test]'
|
|
9
|
+
mktask # http://127.0.0.1:8080/, mktask.db in cwd
|
|
10
|
+
mktask -d :memory: -p 9090
|
|
11
|
+
python -m pytest
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Project layout
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
mktask/
|
|
18
|
+
__init__.py __version__ (single source of truth) + lazy serve()
|
|
19
|
+
__main__.py CLI (argparse) → mkio create_app(); resolves "__mkui__" static route
|
|
20
|
+
mktask.toml tables, services, static routes (no version key — injected at load)
|
|
21
|
+
static/
|
|
22
|
+
index.html imports /mkui/src/index.js, fetches app.json, sets mkio.url from location
|
|
23
|
+
app.json the whole UI: menubar, statusbar, panes, frames, dialogs, layouts
|
|
24
|
+
mktask.css app overrides on top of mkui.css
|
|
25
|
+
tests/
|
|
26
|
+
test_cli.py --help / --version / bad config path (subprocess)
|
|
27
|
+
test_config.py _load_config, _find_config, main() parsing, serve() overrides, _check_port, banner
|
|
28
|
+
test_server.py boots the real server on a free port (-d :memory:): HTTP routes, every task op,
|
|
29
|
+
server-side query filter, saved-layouts round trip, --host, busy-port exit
|
|
30
|
+
test_ui_config.py static integrity of app.json against mktask.toml and index.html
|
|
31
|
+
PLAN.md the original skeleton plan; phases and deferred work
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Architecture
|
|
35
|
+
|
|
36
|
+
- `serve()` in `__main__.py` loads `mktask.toml` via `mkio.config.load_config`, injects `version = __version__`, resolves `"__mkui__"` to `mkui.static_dir` and relative static dirs against the TOML's directory, probes the port (`_check_port`), then `create_app(cfg).run()`. A startup hook prints the banner.
|
|
37
|
+
- `_check_port` runs before `create_app`: a bind failure inside `app.start()` happens after the startup hooks have opened the database, whose aiosqlite threads then keep the process alive after the traceback. The probe turns that hang into an exit-1 with a one-line error (`test_port_in_use_fails_cleanly`).
|
|
38
|
+
- `_find_config()` prefers `./mktask.toml` over the packaged one, so a user can copy the TOML out and customize it.
|
|
39
|
+
- The UI is JSON, not TOML: `index.html` fetches `/static/app.json` with `cache: "no-cache"` (mkio serves statics without Cache-Control) and calls `setConfig`. No `[config]` route in the TOML.
|
|
40
|
+
- `mkio.expect` in app.json pins `name` and `expr` only. Never pin `version` — every release would then show "Server mismatch" (`test_ui_config.py` guards this).
|
|
41
|
+
|
|
42
|
+
## Data model
|
|
43
|
+
|
|
44
|
+
One table, `tasks`: `title`, `notes`, `status` (`open` | `done`), `importance` and `urgency` (1..5), `due` (ISO date or `''`), `created_at` / `updated_at` / `done_at` (UTC `YYYY-MM-DD HH:MM:SS`, matching SQLite's `CURRENT_TIMESTAMP`). Timestamps on update come from the client: buttons and the Edit dialog send `${TIME(NOW(), '%Y-%m-%d %H:%M:%S')}` (mkio expression stdlib, UTC by default) because mkio transaction `defaults` are static values.
|
|
45
|
+
|
|
46
|
+
The `score` column is virtual: `values.score = "importance * urgency"` on the `tasks` pane. It is the placeholder for the real prioritization model (see PLAN.md, Deferred).
|
|
47
|
+
|
|
48
|
+
## Services (`mktask.toml`)
|
|
49
|
+
|
|
50
|
+
- `tasks` — transaction; ops `add` (defaults for notes/importance/urgency/due), `edit`, `done` (defaults `status = "done"`), `reopen` (defaults `status = "open"`, `done_at = ""`), `delete`. Fields listed without a `defaults` entry are required by mkio.
|
|
51
|
+
- `all_tasks` — query on `tasks`, `filterable = ["status"]`. The blotter subscribes to this.
|
|
52
|
+
- `mkui_layouts`, `mkui_layouts_list`, `mkui_layouts_get` — verbatim from mkui's scaffold; mktask has no login so every save lands under owner `''`.
|
|
53
|
+
|
|
54
|
+
## UI (`app.json`)
|
|
55
|
+
|
|
56
|
+
- `tasks` pane: `mkio-table` with default filter `status = ["open"]`, `sort = "-score"`, `select.state = "selected_task"`. Buttons: `+ Add` (dialog → `tasks.add`), `Edit` (`unit = "row"`, dialog prefilled from `${row.*}` with hidden `id` and `updated_at`), `Done` / `Reopen` (transaction buttons gated by `enable.when` on `status`), `Delete` (a dialog with a readonly title line acts as the confirmation — mkui has no confirm on transaction buttons).
|
|
57
|
+
- `task-detail` pane: two `text` widgets over `state.selected_task`. Text widget templates see `state.<path>` (not bare names) and the expression language has no ternary — use `IF(...)`.
|
|
58
|
+
- Menubar `Tasks` has `table.filter` entries: `{"status": ["open"]}` with `merge` shows open only; `{"status": null}` with `merge` clears that column's filter.
|
|
59
|
+
- `test_ui_config.py` checks every dialog/button field against the op's `fields` + `key` (and that every field without a `defaults` entry is sent); it also checks that `${row.x}`, `values`, `styles`, `sort`, `filters`, and text-widget `state.x` references name real columns and declared state. Add the column to `mktask.toml` before using it in the UI.
|
|
60
|
+
|
|
61
|
+
## Versioning and release
|
|
62
|
+
|
|
63
|
+
`mktask/__init__.py` `__version__` is the single source of truth (hatch dynamic version). Release (`/cut`): bump it, update README/CLAUDE/tests, commit as `Release vX.Y.Z: summary`, push, `rm -f dist/*; python -m build`, `twine upload dist/*`, then `pip install --upgrade mktask` so the user's venv runs the published wheel (siblings mkfix/mkui are installed non-editable there; mkio is editable). No git tags, matching mkfix.
|
mktask-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by the Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding any notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
Copyright 2026 Mark Kim
|
|
179
|
+
|
|
180
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
|
+
you may not use this file except in compliance with the License.
|
|
182
|
+
You may obtain a copy of the License at
|
|
183
|
+
|
|
184
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
+
|
|
186
|
+
Unless required by applicable law or agreed to in writing, software
|
|
187
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
188
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
189
|
+
See the License for the specific language governing permissions and
|
|
190
|
+
limitations under the License.
|
mktask-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: mktask
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Work task prioritizer built on mkio and mkui
|
|
5
|
+
Project-URL: Homepage, https://github.com/markuskimius/mktask
|
|
6
|
+
Project-URL: Repository, https://github.com/markuskimius/mktask
|
|
7
|
+
Project-URL: Issues, https://github.com/markuskimius/mktask/issues
|
|
8
|
+
Author: Mark Kim
|
|
9
|
+
License-Expression: Apache-2.0
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: mkio,mkui,prioritization,tasks,todo
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Environment :: Web Environment
|
|
14
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
15
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Topic :: Office/Business :: Scheduling
|
|
21
|
+
Requires-Python: >=3.11
|
|
22
|
+
Requires-Dist: mkio>=0.2.0
|
|
23
|
+
Requires-Dist: mkui>=0.2.9
|
|
24
|
+
Provides-Extra: test
|
|
25
|
+
Requires-Dist: pytest; extra == 'test'
|
|
26
|
+
Requires-Dist: pytest-aiohttp; extra == 'test'
|
|
27
|
+
Requires-Dist: pytest-asyncio; extra == 'test'
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
|
|
30
|
+
# mktask
|
|
31
|
+
|
|
32
|
+
[](https://pypi.org/project/mktask/)
|
|
33
|
+
[](https://pypi.org/project/mktask/)
|
|
34
|
+
[](https://github.com/markuskimius/mktask/blob/main/LICENSE)
|
|
35
|
+
|
|
36
|
+
A work task prioritizer built on [mkio](https://github.com/markuskimius/mkio)
|
|
37
|
+
(config-driven microservice backend) and
|
|
38
|
+
[mkui](https://github.com/markuskimius/mkui) (config-driven Web Components
|
|
39
|
+
workspace with dockable panes).
|
|
40
|
+
|
|
41
|
+
Tasks live in a local SQLite database and show up in a live-updating blotter
|
|
42
|
+
you can sort, filter, and arrange however you like. Each task carries an
|
|
43
|
+
importance and an urgency (1–5); the blotter derives a score from them so the
|
|
44
|
+
most pressing work floats to the top.
|
|
45
|
+
|
|
46
|
+
## Quick start
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pip install mktask
|
|
50
|
+
mktask # http://127.0.0.1:8080/
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Everything installs via `pip`; nothing is fetched at runtime.
|
|
54
|
+
|
|
55
|
+
## CLI
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
mktask [config] [-p PORT] [--host HOST] [-d PATH] [--version]
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
- `config` — path to a `mktask.toml`. Defaults to `./mktask.toml` if
|
|
62
|
+
present, otherwise the one bundled with the package.
|
|
63
|
+
- `-p, --port` — override the listening port (default 8080).
|
|
64
|
+
- `--host` — override the listening host (default `127.0.0.1`).
|
|
65
|
+
- `-d, --db` — database file; `.db` is appended when there is no
|
|
66
|
+
extension. `:memory:` runs without persistence.
|
|
67
|
+
|
|
68
|
+
The server prints the URL to open once it is listening. If the port is
|
|
69
|
+
already taken it exits immediately with an error instead of starting.
|
|
70
|
+
|
|
71
|
+
## Customizing
|
|
72
|
+
|
|
73
|
+
Copy the bundled config out and edit it:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
python -c "import mktask, pathlib; print(pathlib.Path(mktask.__file__).parent / 'mktask.toml')"
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
`mktask.toml` declares the SQLite tables, the mkio services, and the static
|
|
80
|
+
routes; `static/app.json` next to it declares the UI (menus, panes, frames,
|
|
81
|
+
dialogs). Both are plain config — see the mkio and mkui READMEs for the
|
|
82
|
+
formats.
|
|
83
|
+
|
|
84
|
+
## Development
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
pip install -e '.[test]'
|
|
88
|
+
mktask -d :memory:
|
|
89
|
+
python -m pytest
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
The tests cover the CLI and config loading, a real server over HTTP and
|
|
93
|
+
WebSocket (every task op, the query filter, saved layouts, the port and
|
|
94
|
+
host flags), and the static integrity of `app.json` against `mktask.toml`.
|
|
95
|
+
|
|
96
|
+
## License
|
|
97
|
+
|
|
98
|
+
Apache License 2.0. See [LICENSE](LICENSE).
|
mktask-0.1.0/PLAN.md
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# mktask — skeleton application plan
|
|
2
|
+
|
|
3
|
+
mktask is a work-task prioritizer built on [mkio](https://github.com/markuskimius/mkio)
|
|
4
|
+
(TOML-driven backend: SQLite + WebSocket services) and
|
|
5
|
+
[mkui](https://github.com/markuskimius/mkui) (config-driven Web Components
|
|
6
|
+
workspace). Apache-2.0, published to PyPI as `mktask` (name is free on PyPI
|
|
7
|
+
as of 2026-09-05).
|
|
8
|
+
|
|
9
|
+
The structure follows `../mkfix`, the same author's existing mkio+mkui app:
|
|
10
|
+
one Python package that bundles its server TOML and static UI, a `mktask`
|
|
11
|
+
console script that runs the server, and mkui's assets served from the
|
|
12
|
+
installed package rather than copied into the repo.
|
|
13
|
+
|
|
14
|
+
**Status (2026-09-05):** All five phases are done. v0.1.0 is published to PyPI
|
|
15
|
+
and the repo is on GitHub; 75 tests pass and the UI was exercised end to end
|
|
16
|
+
in a browser.
|
|
17
|
+
|
|
18
|
+
## Target layout
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
mktask/
|
|
22
|
+
__init__.py __version__ (single source of truth) + lazy serve()
|
|
23
|
+
__main__.py CLI (argparse) → mkio create_app(); resolves "__mkui__"
|
|
24
|
+
mktask.toml tables, services, static routes (no version key)
|
|
25
|
+
static/
|
|
26
|
+
index.html loads /mkui/src/index.js, fetches app.json, sets mkio.url
|
|
27
|
+
app.json mkui config: menubar, statusbar, panes, frames, layouts
|
|
28
|
+
mktask.css app-specific overrides (may start empty)
|
|
29
|
+
tests/
|
|
30
|
+
test_cli.py --help, --version, bad config path
|
|
31
|
+
test_server.py boots on a free port with -d :memory:, exercises services over WS
|
|
32
|
+
test_ui_config.py app.json integrity: pane refs, service names, index.html imports
|
|
33
|
+
pyproject.toml hatchling, dynamic version, deps mkio>=0.2.0 mkui>=0.2.9
|
|
34
|
+
LICENSE Apache-2.0
|
|
35
|
+
README.md badges, quick start, screenshot placeholder
|
|
36
|
+
CLAUDE.md project notes for future sessions
|
|
37
|
+
.gitignore __pycache__, *.db*, *.egg-info, dist/, build/
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Phase 1 — repository scaffolding
|
|
41
|
+
|
|
42
|
+
1. `LICENSE`: Apache License 2.0 full text, copyright Mark Kim.
|
|
43
|
+
2. `pyproject.toml`: hatchling build; `name = "mktask"`, `dynamic = ["version"]`
|
|
44
|
+
read from `mktask/__init__.py`; `license = "Apache-2.0"`;
|
|
45
|
+
`requires-python = ">=3.11"` (mkio's floor); deps `mkio>=0.2.0`,
|
|
46
|
+
`mkui>=0.2.9`; optional `test = [pytest, pytest-asyncio, pytest-aiohttp]`;
|
|
47
|
+
`[project.scripts] mktask = "mktask.__main__:main"`; classifiers include
|
|
48
|
+
`License :: OSI Approved :: Apache Software License` and
|
|
49
|
+
`Development Status :: 3 - Alpha`; URLs to github.com/markuskimius/mktask.
|
|
50
|
+
Hatch includes non-.py files under the package by default, so
|
|
51
|
+
`mktask.toml` and `static/` ship in the wheel without extra config.
|
|
52
|
+
3. `mktask/__init__.py`: `__version__ = "0.1.0"` and a lazy `serve()` wrapper.
|
|
53
|
+
4. `.gitignore`, `README.md` (short for now), `CLAUDE.md` (layout + commands).
|
|
54
|
+
5. Install editable: `pip install -e '.[test]'`. Commit as "Scaffold package".
|
|
55
|
+
|
|
56
|
+
## Phase 2 — server (`mktask.toml` + `__main__.py`)
|
|
57
|
+
|
|
58
|
+
Data model for the skeleton. Keep it deliberately small; the prioritization
|
|
59
|
+
model is the app's real subject and should be designed after the skeleton
|
|
60
|
+
runs.
|
|
61
|
+
|
|
62
|
+
```toml
|
|
63
|
+
name = "mktask"
|
|
64
|
+
port = 8080
|
|
65
|
+
host = "127.0.0.1" # personal tool: loopback by default
|
|
66
|
+
db_path = "mktask.db"
|
|
67
|
+
auto_migrate = true
|
|
68
|
+
|
|
69
|
+
[tables.tasks]
|
|
70
|
+
columns = { id = "INTEGER PRIMARY KEY AUTOINCREMENT",
|
|
71
|
+
title = "TEXT NOT NULL",
|
|
72
|
+
notes = "TEXT DEFAULT ''",
|
|
73
|
+
status = "TEXT NOT NULL DEFAULT 'open'", # open | done
|
|
74
|
+
importance = "INTEGER NOT NULL DEFAULT 3", # 1..5
|
|
75
|
+
urgency = "INTEGER NOT NULL DEFAULT 3", # 1..5
|
|
76
|
+
due = "TEXT DEFAULT ''", # ISO date or ''
|
|
77
|
+
created_at = "TEXT DEFAULT CURRENT_TIMESTAMP",
|
|
78
|
+
updated_at = "TEXT DEFAULT CURRENT_TIMESTAMP",
|
|
79
|
+
done_at = "TEXT DEFAULT ''" }
|
|
80
|
+
|
|
81
|
+
[tables.mkui_layouts] # copied verbatim from mkui's scaffold (saved layouts)
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Services:
|
|
85
|
+
|
|
86
|
+
- `tasks` — `protocol = "transaction"` with ops `add` (insert: title, notes,
|
|
87
|
+
importance, urgency, due, with explicit `defaults` for every optional
|
|
88
|
+
field), `edit` (update by id), `done` (update status/done_at by id),
|
|
89
|
+
`reopen`, `delete` (by id). One transaction service with several ops keeps
|
|
90
|
+
the UI's action names in one place.
|
|
91
|
+
- `all_tasks` — `protocol = "query"`, `primary_table = "tasks"`,
|
|
92
|
+
`filterable = ["status"]`. The blotter subscribes to this.
|
|
93
|
+
- `mkui_layouts`, `mkui_layouts_list`, `mkui_layouts_get` — verbatim from
|
|
94
|
+
mkui's `init` scaffold so the Layout menu works. mkfix runs without login
|
|
95
|
+
and stores layouts under owner `''`; do the same.
|
|
96
|
+
|
|
97
|
+
Static routes: `"/" = "./static"`, `"/mkui" = "__mkui__"`. No `[config]`
|
|
98
|
+
route: like mkfix, the UI is JSON (`app.json`) fetched by `index.html`, so
|
|
99
|
+
no TOML→JSON serving is needed.
|
|
100
|
+
|
|
101
|
+
`__main__.py` mirrors mkfix's without the FIX engine:
|
|
102
|
+
|
|
103
|
+
- `_load_config(path)`: `mkio.config.load_config`, inject
|
|
104
|
+
`cfg["version"] = __version__`, resolve `"__mkui__"` to `mkui.static_dir`
|
|
105
|
+
and relative static dirs against the TOML's directory.
|
|
106
|
+
- `_find_config()`: `./mktask.toml` if present, else the packaged one. This
|
|
107
|
+
lets a user copy the TOML out and customize it.
|
|
108
|
+
- `serve(config, host, port, db_path)`: `create_app(cfg)` then `app.run()`.
|
|
109
|
+
Skip mkfix's port pre-probe and custom banner initially; add them only if
|
|
110
|
+
the default `run()` output proves insufficient.
|
|
111
|
+
- `main()`: positional optional `config`, `-p/--port`, `--host`, `-d/--db`
|
|
112
|
+
(`.db` appended when no suffix, `:memory:` passthrough), `--version`.
|
|
113
|
+
|
|
114
|
+
Verify: `mktask -d :memory:` serves `http://127.0.0.1:8080/`, `/mkui/src/index.js`
|
|
115
|
+
returns JS, and `mkio ls` (or a WS client) lists the services. Commit.
|
|
116
|
+
|
|
117
|
+
## Phase 3 — UI (`static/`)
|
|
118
|
+
|
|
119
|
+
`index.html`: copy mkfix's pattern — import `/mkui/src/index.js`, fetch
|
|
120
|
+
`app.json` with `cache: "no-cache"`, set `config.mkio.url` from
|
|
121
|
+
`location.host`, call `setConfig`. No custom pane modules yet.
|
|
122
|
+
|
|
123
|
+
`app.json`:
|
|
124
|
+
|
|
125
|
+
- `app`: title "mktask", theme dark.
|
|
126
|
+
- `state`: `status.message/background/color`, `selected_task: null`.
|
|
127
|
+
- `menubar`: Edit (copy, select all), Tasks (Open Tasks, All Tasks, Done via
|
|
128
|
+
`pane.show`; a `table.filter` entry "Hide done"), Layout (save, restore
|
|
129
|
+
submenu, reset), Window (cascade, tile submenu, `windows: true`).
|
|
130
|
+
- `statusbar`: left `status.message`; right version text; `bindStyle` on
|
|
131
|
+
`status.*`.
|
|
132
|
+
- `mkio`: `connected`/`disconnected` state maps; `expect = { name = "mktask" }`
|
|
133
|
+
(do not pin `version`, mkfix's tests exist precisely because a pinned
|
|
134
|
+
version leaks past releases).
|
|
135
|
+
- `layouts`: `{ keep = 10, keepDays = 7 }`.
|
|
136
|
+
- `panes.tasks`: `mkio-table` on `all_tasks`, columns id, title, importance,
|
|
137
|
+
urgency, score, due, status, created_at; `values.score` derives
|
|
138
|
+
`importance * urgency` as a virtual column (listed in `columns`);
|
|
139
|
+
`sort = "-score"`; `filters.status = ["open"]`; `rowStyle` greys done
|
|
140
|
+
rows; `select = { state = "selected_task" }`.
|
|
141
|
+
Toolbar buttons: "+ Add Task" (dialog → `tasks` op `add`), "Edit"
|
|
142
|
+
(`unit = "row"`, dialog prefilled from the row → op `edit`), "Done"
|
|
143
|
+
(`unit = "rows"`, transaction op `done`, `enable.when` status == open),
|
|
144
|
+
"Reopen", "Delete" (transaction op `delete`, confirm). Copy the dialog and
|
|
145
|
+
transaction action shapes from mkfix's `app.json` and mkui's `init`
|
|
146
|
+
scaffold.
|
|
147
|
+
- `panes.task-detail`: a `text` widget bound to `selected_task.notes` as a
|
|
148
|
+
placeholder for a future custom pane.
|
|
149
|
+
- `frames`: one main frame with tasks (0.03, 0.05, 0.64, 0.9) and one aux
|
|
150
|
+
frame with task-detail.
|
|
151
|
+
|
|
152
|
+
`mktask.css`: empty file with a comment, imported by index.html so the hook
|
|
153
|
+
exists.
|
|
154
|
+
|
|
155
|
+
Verify in a browser: add, edit, complete, reopen, delete a task; rows
|
|
156
|
+
flash live; saved layouts round-trip after reload. Commit.
|
|
157
|
+
|
|
158
|
+
## Phase 4 — tests
|
|
159
|
+
|
|
160
|
+
- `test_cli.py`: as mkfix's — help text, version string, nonexistent
|
|
161
|
+
config exits non-zero.
|
|
162
|
+
- `test_server.py`: module-scoped fixture launches `python -m mktask -d
|
|
163
|
+
:memory: -p <free port>`; assert `/` and `/mkui/src/index.js` are 200;
|
|
164
|
+
over WS, `add` a task then `all_tasks` query returns it; `done` flips
|
|
165
|
+
status; `delete` removes it.
|
|
166
|
+
- `test_ui_config.py`: every `pane.show` arg and frame layout child names a
|
|
167
|
+
pane; every `mkio-table` `service` and every transaction/dialog service
|
|
168
|
+
exists in `mktask.toml`; every `import "..."` in index.html resolves under
|
|
169
|
+
`static/` or `/mkui/`; `mkio.expect` has no `version`.
|
|
170
|
+
|
|
171
|
+
`python -m pytest` green. Commit.
|
|
172
|
+
|
|
173
|
+
## Phase 5 — publish
|
|
174
|
+
|
|
175
|
+
1. README: badges (PyPI, Python, License), one-paragraph pitch, quick start
|
|
176
|
+
(`pip install mktask` / `mktask`), CLI flags, how to customize the TOML,
|
|
177
|
+
screenshot placeholder, license section.
|
|
178
|
+
2. Tag `v0.1.0`; `python -m build`; upload to TestPyPI first, install into a
|
|
179
|
+
clean venv, run `mktask -d :memory:`; then `twine upload dist/*`.
|
|
180
|
+
3. Create the GitHub repo `markuskimius/mktask`, push, add the PyPI link.
|
|
181
|
+
|
|
182
|
+
## Deferred (not in the skeleton)
|
|
183
|
+
|
|
184
|
+
- The prioritization model itself: weighted scoring, Eisenhower quadrants,
|
|
185
|
+
aging/due-date decay, projects/tags, recurring tasks. The `score` derived
|
|
186
|
+
column is the placeholder where this lands; it may move server-side into a
|
|
187
|
+
`reqrep` or computed column later.
|
|
188
|
+
- Custom pane types (task detail editor, quadrant board, calendar).
|
|
189
|
+
- Authentication (mkui `auth` + mkio `_mkio_users`) if the app is ever
|
|
190
|
+
multi-user; the per-owner layouts scaffold already supports it.
|
|
191
|
+
- CI workflow (mkui and mkfix have none; add GitHub Actions if wanted).
|
|
192
|
+
|
|
193
|
+
## Assumptions to confirm
|
|
194
|
+
|
|
195
|
+
- Python >= 3.11 is acceptable (forced by mkio).
|
|
196
|
+
- Single-user, no login, loopback host by default.
|
|
197
|
+
- `importance`/`urgency` 1..5 integers are a fine placeholder schema for the
|
|
198
|
+
skeleton; the real model comes later.
|
mktask-0.1.0/README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# mktask
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/mktask/)
|
|
4
|
+
[](https://pypi.org/project/mktask/)
|
|
5
|
+
[](https://github.com/markuskimius/mktask/blob/main/LICENSE)
|
|
6
|
+
|
|
7
|
+
A work task prioritizer built on [mkio](https://github.com/markuskimius/mkio)
|
|
8
|
+
(config-driven microservice backend) and
|
|
9
|
+
[mkui](https://github.com/markuskimius/mkui) (config-driven Web Components
|
|
10
|
+
workspace with dockable panes).
|
|
11
|
+
|
|
12
|
+
Tasks live in a local SQLite database and show up in a live-updating blotter
|
|
13
|
+
you can sort, filter, and arrange however you like. Each task carries an
|
|
14
|
+
importance and an urgency (1–5); the blotter derives a score from them so the
|
|
15
|
+
most pressing work floats to the top.
|
|
16
|
+
|
|
17
|
+
## Quick start
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pip install mktask
|
|
21
|
+
mktask # http://127.0.0.1:8080/
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Everything installs via `pip`; nothing is fetched at runtime.
|
|
25
|
+
|
|
26
|
+
## CLI
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
mktask [config] [-p PORT] [--host HOST] [-d PATH] [--version]
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
- `config` — path to a `mktask.toml`. Defaults to `./mktask.toml` if
|
|
33
|
+
present, otherwise the one bundled with the package.
|
|
34
|
+
- `-p, --port` — override the listening port (default 8080).
|
|
35
|
+
- `--host` — override the listening host (default `127.0.0.1`).
|
|
36
|
+
- `-d, --db` — database file; `.db` is appended when there is no
|
|
37
|
+
extension. `:memory:` runs without persistence.
|
|
38
|
+
|
|
39
|
+
The server prints the URL to open once it is listening. If the port is
|
|
40
|
+
already taken it exits immediately with an error instead of starting.
|
|
41
|
+
|
|
42
|
+
## Customizing
|
|
43
|
+
|
|
44
|
+
Copy the bundled config out and edit it:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
python -c "import mktask, pathlib; print(pathlib.Path(mktask.__file__).parent / 'mktask.toml')"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
`mktask.toml` declares the SQLite tables, the mkio services, and the static
|
|
51
|
+
routes; `static/app.json` next to it declares the UI (menus, panes, frames,
|
|
52
|
+
dialogs). Both are plain config — see the mkio and mkui READMEs for the
|
|
53
|
+
formats.
|
|
54
|
+
|
|
55
|
+
## Development
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pip install -e '.[test]'
|
|
59
|
+
mktask -d :memory:
|
|
60
|
+
python -m pytest
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The tests cover the CLI and config loading, a real server over HTTP and
|
|
64
|
+
WebSocket (every task op, the query filter, saved layouts, the port and
|
|
65
|
+
host flags), and the static integrity of `app.json` against `mktask.toml`.
|
|
66
|
+
|
|
67
|
+
## License
|
|
68
|
+
|
|
69
|
+
Apache License 2.0. See [LICENSE](LICENSE).
|