workmap 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.
- workmap-0.1.0/.github/ISSUE_TEMPLATE/bug_report.yml +84 -0
- workmap-0.1.0/.github/workflows/release.yml +97 -0
- workmap-0.1.0/.github/workflows/test.yml +37 -0
- workmap-0.1.0/.gitignore +7 -0
- workmap-0.1.0/ARCHITECTURE.md +679 -0
- workmap-0.1.0/LICENSE +21 -0
- workmap-0.1.0/PKG-INFO +258 -0
- workmap-0.1.0/README.md +218 -0
- workmap-0.1.0/docs/confirm.svg +138 -0
- workmap-0.1.0/docs/desk.gif +0 -0
- workmap-0.1.0/docs/desk.svg +192 -0
- workmap-0.1.0/docs/work.gif +0 -0
- workmap-0.1.0/install.sh +112 -0
- workmap-0.1.0/pyproject.toml +40 -0
- workmap-0.1.0/tests/__init__.py +1 -0
- workmap-0.1.0/tests/_helpers.py +115 -0
- workmap-0.1.0/tests/test_actions.py +1025 -0
- workmap-0.1.0/tests/test_applescript.py +1067 -0
- workmap-0.1.0/tests/test_audit.py +474 -0
- workmap-0.1.0/tests/test_cli.py +1391 -0
- workmap-0.1.0/tests/test_config.py +258 -0
- workmap-0.1.0/tests/test_copy.py +1132 -0
- workmap-0.1.0/tests/test_driver_contract.py +277 -0
- workmap-0.1.0/tests/test_gui_apps.py +202 -0
- workmap-0.1.0/tests/test_install.py +247 -0
- workmap-0.1.0/tests/test_kill.py +218 -0
- workmap-0.1.0/tests/test_kill_integration.py +242 -0
- workmap-0.1.0/tests/test_live_bugs.py +1130 -0
- workmap-0.1.0/tests/test_live_write_path.py +363 -0
- workmap-0.1.0/tests/test_multiplexer.py +226 -0
- workmap-0.1.0/tests/test_onboarding_ui.py +1160 -0
- workmap-0.1.0/tests/test_other_machines.py +746 -0
- workmap-0.1.0/tests/test_scan.py +452 -0
- workmap-0.1.0/tests/test_tui.py +1549 -0
- workmap-0.1.0/tests/test_tui_resilience.py +332 -0
- workmap-0.1.0/tests/test_work.py +688 -0
- workmap-0.1.0/tools/README.md +119 -0
- workmap-0.1.0/tools/render_gif.py +234 -0
- workmap-0.1.0/tools/render_svg.py +302 -0
- workmap-0.1.0/tools/stage_desk.py +243 -0
- workmap-0.1.0/workmap/__init__.py +30 -0
- workmap-0.1.0/workmap/__main__.py +15 -0
- workmap-0.1.0/workmap/actions.py +350 -0
- workmap-0.1.0/workmap/audit.py +153 -0
- workmap-0.1.0/workmap/cli.py +789 -0
- workmap-0.1.0/workmap/config.py +589 -0
- workmap-0.1.0/workmap/demo.py +94 -0
- workmap-0.1.0/workmap/drivers/__init__.py +93 -0
- workmap-0.1.0/workmap/drivers/apple_terminal.py +578 -0
- workmap-0.1.0/workmap/layout.py +64 -0
- workmap-0.1.0/workmap/model.py +719 -0
- workmap-0.1.0/workmap/multiplexer.py +201 -0
- workmap-0.1.0/workmap/procs.py +504 -0
- workmap-0.1.0/workmap/scan.py +413 -0
- workmap-0.1.0/workmap/setup.py +400 -0
- workmap-0.1.0/workmap/shell.py +117 -0
- workmap-0.1.0/workmap/terminal.py +50 -0
- workmap-0.1.0/workmap/themes.py +45 -0
- workmap-0.1.0/workmap/tui/__init__.py +6 -0
- workmap-0.1.0/workmap/tui/app.py +1090 -0
- workmap-0.1.0/workmap/tui/onboarding.py +266 -0
- workmap-0.1.0/workmap/tui/text.py +156 -0
- workmap-0.1.0/workmap/tui/widgets.py +189 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
name: Something went wrong
|
|
2
|
+
description: workmap did something you did not expect, or would not start.
|
|
3
|
+
labels: ["bug"]
|
|
4
|
+
body:
|
|
5
|
+
- type: markdown
|
|
6
|
+
attributes:
|
|
7
|
+
value: |
|
|
8
|
+
Thank you for taking the time. The four boxes below are the ones that
|
|
9
|
+
save a round trip, and none of them needs you to know anything about
|
|
10
|
+
how workmap works.
|
|
11
|
+
|
|
12
|
+
You will not break anything by filing this.
|
|
13
|
+
|
|
14
|
+
- type: textarea
|
|
15
|
+
id: what-happened
|
|
16
|
+
attributes:
|
|
17
|
+
label: What happened, and what you expected instead
|
|
18
|
+
description: >
|
|
19
|
+
Plain words are fine. If workmap printed something, paste it: it is
|
|
20
|
+
written to explain itself, so the message is usually the answer.
|
|
21
|
+
placeholder: |
|
|
22
|
+
I pressed k to quit the orphaned processes and the memory did not
|
|
23
|
+
come back. I expected the row to disappear.
|
|
24
|
+
validations:
|
|
25
|
+
required: true
|
|
26
|
+
|
|
27
|
+
- type: input
|
|
28
|
+
id: version
|
|
29
|
+
attributes:
|
|
30
|
+
label: What `workmap --version` says
|
|
31
|
+
description: Run it in Terminal and paste the line.
|
|
32
|
+
placeholder: workmap 0.1.0
|
|
33
|
+
validations:
|
|
34
|
+
required: true
|
|
35
|
+
|
|
36
|
+
- type: input
|
|
37
|
+
id: macos
|
|
38
|
+
attributes:
|
|
39
|
+
label: Your macOS version
|
|
40
|
+
description: >
|
|
41
|
+
Apple menu, then About This Mac. The number is enough.
|
|
42
|
+
placeholder: "15.5"
|
|
43
|
+
validations:
|
|
44
|
+
required: true
|
|
45
|
+
|
|
46
|
+
- type: dropdown
|
|
47
|
+
id: automation
|
|
48
|
+
attributes:
|
|
49
|
+
label: Did you allow workmap to control Terminal?
|
|
50
|
+
description: >
|
|
51
|
+
macOS asks this the first time you run it, because reading your
|
|
52
|
+
windows means talking to Terminal. If you are not sure, look in System
|
|
53
|
+
Settings, Privacy and Security, Automation.
|
|
54
|
+
options:
|
|
55
|
+
- "Yes"
|
|
56
|
+
- "No, I declined it"
|
|
57
|
+
- "I was never asked"
|
|
58
|
+
- "I am not sure"
|
|
59
|
+
validations:
|
|
60
|
+
required: true
|
|
61
|
+
|
|
62
|
+
- type: textarea
|
|
63
|
+
id: list
|
|
64
|
+
attributes:
|
|
65
|
+
label: What `workmap list` shows
|
|
66
|
+
description: >
|
|
67
|
+
Optional, and only if it is relevant. This is the same map as the
|
|
68
|
+
interactive one, as text. It names your projects, so take out anything
|
|
69
|
+
you would rather not post.
|
|
70
|
+
render: text
|
|
71
|
+
validations:
|
|
72
|
+
required: false
|
|
73
|
+
|
|
74
|
+
- type: markdown
|
|
75
|
+
attributes:
|
|
76
|
+
value: |
|
|
77
|
+
Two things that are known, in case one of them is what you are seeing:
|
|
78
|
+
|
|
79
|
+
`o`, `O` and `organize` cannot move a window macOS is tiling. Drag the
|
|
80
|
+
window out of its tile, or turn tiling off in System Settings, under
|
|
81
|
+
Desktop and Dock.
|
|
82
|
+
|
|
83
|
+
`w` cannot close a window whose program has already exited, the ones
|
|
84
|
+
showing `[Process completed]`. Terminal ignores the request.
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
name: release
|
|
2
|
+
|
|
3
|
+
# Publishing happens when a GitHub release is published, not on a tag push, so
|
|
4
|
+
# that writing the release notes is the deliberate act and pushing a tag is
|
|
5
|
+
# not. A version on PyPI can never be reused or replaced: 0.1.0 published by
|
|
6
|
+
# accident is 0.1.0 for ever, and the only way forward is 0.1.1.
|
|
7
|
+
on:
|
|
8
|
+
release:
|
|
9
|
+
types: [published]
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
verify:
|
|
16
|
+
# The same runner the tests use. The wheel is pure Python and would build
|
|
17
|
+
# anywhere, but the smoke test below runs the tool, and the tool is macOS
|
|
18
|
+
# only: building somewhere it cannot run means the first machine to
|
|
19
|
+
# execute this code is a stranger's.
|
|
20
|
+
runs-on: macos-latest
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v7
|
|
23
|
+
|
|
24
|
+
- uses: actions/setup-python@v7
|
|
25
|
+
with:
|
|
26
|
+
python-version: "3.14"
|
|
27
|
+
|
|
28
|
+
- name: Check the version being released is the version in the tree
|
|
29
|
+
# A tag that disagrees with pyproject.toml publishes the wrong number
|
|
30
|
+
# under the right name, and PyPI will not let you take it back. This
|
|
31
|
+
# is the one check that has to happen before the build rather than
|
|
32
|
+
# after it.
|
|
33
|
+
run: |
|
|
34
|
+
tag="${GITHUB_REF_NAME#v}"
|
|
35
|
+
want=$(sed -n 's/^version = "\(.*\)"$/\1/p' pyproject.toml | head -1)
|
|
36
|
+
if [ "$tag" != "$want" ]; then
|
|
37
|
+
echo "release tag is $GITHUB_REF_NAME and pyproject.toml says $want."
|
|
38
|
+
echo "One of them is wrong, and a wrong version cannot be undone"
|
|
39
|
+
echo "once it is on PyPI. Nothing was published."
|
|
40
|
+
exit 1
|
|
41
|
+
fi
|
|
42
|
+
echo "releasing workmap $want"
|
|
43
|
+
|
|
44
|
+
- name: Run the tests
|
|
45
|
+
# CI already runs these on every push, but a release is built from a
|
|
46
|
+
# tag, and a tag can point at a commit that was never pushed to main.
|
|
47
|
+
run: python -m unittest discover -s tests -t tests
|
|
48
|
+
|
|
49
|
+
- name: Build the sdist and the wheel
|
|
50
|
+
run: |
|
|
51
|
+
python -m pip install --upgrade build
|
|
52
|
+
python -m build
|
|
53
|
+
|
|
54
|
+
- name: Install what was just built and run it
|
|
55
|
+
# Against the artefact, not the checkout. A wheel that is missing a
|
|
56
|
+
# module imports fine from the source tree beside it and fails for
|
|
57
|
+
# everyone who downloads it.
|
|
58
|
+
run: |
|
|
59
|
+
python -m venv /tmp/release-check
|
|
60
|
+
/tmp/release-check/bin/python -m pip install --quiet dist/*.whl
|
|
61
|
+
cd / # so nothing resolves out of the checkout
|
|
62
|
+
/tmp/release-check/bin/workmap --version
|
|
63
|
+
|
|
64
|
+
- name: Hand the tested files to the job that uploads them
|
|
65
|
+
# The upload has to be the same bytes this job just ran, so the files
|
|
66
|
+
# travel rather than being built a second time. A rebuild on the other
|
|
67
|
+
# runner would publish a wheel no smoke test ever touched.
|
|
68
|
+
uses: actions/upload-artifact@v7
|
|
69
|
+
with:
|
|
70
|
+
name: dist
|
|
71
|
+
path: dist/
|
|
72
|
+
if-no-files-found: error
|
|
73
|
+
|
|
74
|
+
publish:
|
|
75
|
+
# Everything above has to run on macOS because it runs workmap. This job
|
|
76
|
+
# does not: it moves two files to PyPI. It is here on Linux because
|
|
77
|
+
# `pypa/gh-action-pypi-publish` is a Docker container action, and Docker
|
|
78
|
+
# actions do not run on the macOS runners. Asking it to was how the first
|
|
79
|
+
# release failed, after the tests and the build had already passed.
|
|
80
|
+
needs: verify
|
|
81
|
+
runs-on: ubuntu-latest
|
|
82
|
+
environment: pypi
|
|
83
|
+
# Trusted publishing. PyPI verifies this job's own identity through OIDC,
|
|
84
|
+
# so there is no API token stored in the repository to leak, rotate or
|
|
85
|
+
# forget about. `id-token: write` is what mints that identity, and it is
|
|
86
|
+
# the only permission raised above read. The environment name is part of
|
|
87
|
+
# what PyPI checks, so it has to stay `pypi` in both places.
|
|
88
|
+
permissions:
|
|
89
|
+
id-token: write
|
|
90
|
+
contents: read
|
|
91
|
+
steps:
|
|
92
|
+
- uses: actions/download-artifact@v8
|
|
93
|
+
with:
|
|
94
|
+
name: dist
|
|
95
|
+
path: dist/
|
|
96
|
+
|
|
97
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
# workmap drives Terminal.app, so it is tested where it runs. The suite
|
|
11
|
+
# itself stubs every OS call, so it needs no Terminal and no permissions.
|
|
12
|
+
runs-on: macos-latest
|
|
13
|
+
strategy:
|
|
14
|
+
fail-fast: false
|
|
15
|
+
matrix:
|
|
16
|
+
# 3.9 is the Python that ships with macOS: workmap must run on a
|
|
17
|
+
# stock machine with nothing installed. 3.14 is what `install.sh`
|
|
18
|
+
# builds the venv with when Homebrew's python is the newest one
|
|
19
|
+
# around, so it is the version most people will actually run.
|
|
20
|
+
python-version: ["3.9", "3.14"]
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v7
|
|
23
|
+
- uses: actions/setup-python@v7
|
|
24
|
+
with:
|
|
25
|
+
python-version: ${{ matrix.python-version }}
|
|
26
|
+
- name: Run tests
|
|
27
|
+
run: python -m unittest discover -s tests -t tests -v
|
|
28
|
+
- name: Check the CLI starts
|
|
29
|
+
run: python -c "from workmap.cli import main; main(['--version'])"
|
|
30
|
+
- name: Check it installs and runs independently of the checkout
|
|
31
|
+
run: |
|
|
32
|
+
./install.sh
|
|
33
|
+
# Move the source away: an install that still needs it is not one.
|
|
34
|
+
cd /
|
|
35
|
+
mv "$GITHUB_WORKSPACE" "$GITHUB_WORKSPACE-moved"
|
|
36
|
+
"$HOME/.local/bin/workmap" --version
|
|
37
|
+
mv "$GITHUB_WORKSPACE-moved" "$GITHUB_WORKSPACE"
|