visualmode-tracker 0.1.0__tar.gz → 0.2.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.
Files changed (36) hide show
  1. {visualmode_tracker-0.1.0 → visualmode_tracker-0.2.0}/.github/workflows/release.yml +2 -2
  2. visualmode_tracker-0.2.0/.python-version +1 -0
  3. visualmode_tracker-0.2.0/.zed/settings.json +13 -0
  4. visualmode_tracker-0.2.0/CHANGELOG.md +45 -0
  5. {visualmode_tracker-0.1.0 → visualmode_tracker-0.2.0}/PKG-INFO +49 -7
  6. visualmode_tracker-0.2.0/README.md +115 -0
  7. {visualmode_tracker-0.1.0 → visualmode_tracker-0.2.0}/mise.toml +6 -2
  8. {visualmode_tracker-0.1.0 → visualmode_tracker-0.2.0}/pyproject.toml +9 -5
  9. visualmode_tracker-0.2.0/scripts/release.py +420 -0
  10. {visualmode_tracker-0.1.0 → visualmode_tracker-0.2.0}/src/py_vmt/cli.py +138 -24
  11. {visualmode_tracker-0.1.0 → visualmode_tracker-0.2.0}/src/py_vmt/db.py +5 -1
  12. {visualmode_tracker-0.1.0 → visualmode_tracker-0.2.0}/src/py_vmt/session.py +0 -5
  13. {visualmode_tracker-0.1.0 → visualmode_tracker-0.2.0}/tests/src/py_vmt/test_cli.py +15 -49
  14. visualmode_tracker-0.2.0/tests/src/py_vmt/test_cli_config.py +58 -0
  15. visualmode_tracker-0.2.0/tests/src/py_vmt/test_cli_help.py +62 -0
  16. visualmode_tracker-0.2.0/tests/src/py_vmt/test_cli_info.py +60 -0
  17. {visualmode_tracker-0.1.0 → visualmode_tracker-0.2.0}/tests/src/py_vmt/test_session.py +5 -15
  18. visualmode_tracker-0.2.0/tests/src/py_vmt/test_storage_config.py +5 -0
  19. {visualmode_tracker-0.1.0 → visualmode_tracker-0.2.0}/uv.lock +91 -51
  20. visualmode_tracker-0.1.0/.python-version +0 -1
  21. visualmode_tracker-0.1.0/CHANGELOG.md +0 -23
  22. visualmode_tracker-0.1.0/README.md +0 -73
  23. {visualmode_tracker-0.1.0 → visualmode_tracker-0.2.0}/.github/workflows/lint.yml +0 -0
  24. {visualmode_tracker-0.1.0 → visualmode_tracker-0.2.0}/.github/workflows/test.yml +0 -0
  25. {visualmode_tracker-0.1.0 → visualmode_tracker-0.2.0}/.github/workflows/typecheck.yml +0 -0
  26. {visualmode_tracker-0.1.0 → visualmode_tracker-0.2.0}/.gitignore +0 -0
  27. {visualmode_tracker-0.1.0 → visualmode_tracker-0.2.0}/.vscode/launch.json +0 -0
  28. {visualmode_tracker-0.1.0 → visualmode_tracker-0.2.0}/.zed/debug.json +0 -0
  29. {visualmode_tracker-0.1.0 → visualmode_tracker-0.2.0}/LICENSE +0 -0
  30. {visualmode_tracker-0.1.0 → visualmode_tracker-0.2.0}/Taskfile.yml +0 -0
  31. {visualmode_tracker-0.1.0 → visualmode_tracker-0.2.0}/mise.local.toml.example +0 -0
  32. {visualmode_tracker-0.1.0 → visualmode_tracker-0.2.0}/src/py_vmt/__init__.py +0 -0
  33. {visualmode_tracker-0.1.0 → visualmode_tracker-0.2.0}/src/py_vmt/file_utils.py +0 -0
  34. {visualmode_tracker-0.1.0 → visualmode_tracker-0.2.0}/src/py_vmt/time_helpers.py +0 -0
  35. {visualmode_tracker-0.1.0 → visualmode_tracker-0.2.0}/tests/src/py_vmt/conftest.py +0 -0
  36. {visualmode_tracker-0.1.0 → visualmode_tracker-0.2.0}/tests/src/py_vmt/test_time_helpers.py +0 -0
@@ -28,7 +28,7 @@ jobs:
28
28
  run: uv build
29
29
 
30
30
  - name: Upload dist artifacts
31
- uses: actions/upload-artifact@v4
31
+ uses: actions/upload-artifact@v7
32
32
  with:
33
33
  name: dist
34
34
  path: dist/
@@ -41,7 +41,7 @@ jobs:
41
41
  id-token: write # OIDC — Trusted Publishing, no API token stored
42
42
  steps:
43
43
  - name: Download dist artifacts
44
- uses: actions/download-artifact@v4
44
+ uses: actions/download-artifact@v8
45
45
  with:
46
46
  name: dist
47
47
  path: dist/
@@ -0,0 +1 @@
1
+ 3.14
@@ -0,0 +1,13 @@
1
+ {
2
+ "format_on_save": "on",
3
+ "languages": {
4
+ "Python": {
5
+ "formatter": {
6
+ "external": {
7
+ "command": ".venv/bin/ruff",
8
+ "arguments": ["format", "--stdin-filename", "{buffer_path}", "-"]
9
+ }
10
+ }
11
+ }
12
+ }
13
+ }
@@ -0,0 +1,45 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [0.2.0] - 2026-11-28
11
+
12
+ ### Added
13
+
14
+ - `vmt config --init` to generate a config file with default settings, printing
15
+ its location (and a notice if one already exists).
16
+ - `vmt config --path` to print the path to the config file.
17
+ - `vmt info` to show the config file path, data dir, and version (plus schema
18
+ version when using sqlite storage), with a `--json` flag for JSON output.
19
+
20
+ ### Changed
21
+
22
+ - Upgraded the project to Python 3.14 (now requires Python >= 3.14).
23
+ - Config file parsing now uses pydantic to validate settings, with a
24
+ `StorageFormat` enum (`sqlite`, `json`) for the storage format.
25
+
26
+ ### Fixed
27
+
28
+ - `vmt log` now groups sessions by local date. Sessions started in the evening
29
+ were listed under the next day.
30
+
31
+ ## [0.1.0] - 2026-08-02
32
+
33
+ ### Added
34
+
35
+ - `vmt start <name> [+tags]` to begin tracking a work session, with an optional
36
+ `--at` flag to backdate the start time.
37
+ - `vmt status` to show the currently tracked session and elapsed time.
38
+ - `vmt stop` to end the active session, with `--at` and `--round` flags to adjust
39
+ the exact end time
40
+ - `vmt log` to display sessions tracked over the last 7 days.
41
+ - Session tags (e.g. `+python`) for categorizing tracked work.
42
+
43
+ [Unreleased]: https://github.com/jbranchaud/py-vmt/compare/v0.2.0...HEAD
44
+ [0.2.0]: https://github.com/jbranchaud/py-vmt/compare/v0.1.0...v0.2.0
45
+ [0.1.0]: https://github.com/jbranchaud/py-vmt/releases/tag/v0.1.0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: visualmode-tracker
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: A command-line time tracker for your project and work sessions
5
5
  Project-URL: Homepage, https://github.com/jbranchaud/py-vmt
6
6
  Project-URL: Repository, https://github.com/jbranchaud/py-vmt
@@ -14,13 +14,13 @@ Classifier: Environment :: Console
14
14
  Classifier: Intended Audience :: Developers
15
15
  Classifier: Operating System :: OS Independent
16
16
  Classifier: Programming Language :: Python :: 3
17
- Classifier: Programming Language :: Python :: 3.12
18
- Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: 3.14
19
18
  Classifier: Topic :: Utilities
20
- Requires-Python: >=3.12
19
+ Requires-Python: >=3.14
21
20
  Requires-Dist: click>=8.3.1
22
21
  Requires-Dist: dateparser>=1.3.0
23
22
  Requires-Dist: platformdirs>=4.9.4
23
+ Requires-Dist: pydantic>=2.13.4
24
24
  Description-Content-Type: text/markdown
25
25
 
26
26
  # VisualMode Tracker, built with Python
@@ -56,14 +56,18 @@ Last: 'py-vmt' [python] (30m) at 12:00PM
56
56
 
57
57
  ## Installation
58
58
 
59
- `vmt` (`visualmode-tracker`) can be installed via `uv` and `pipx`:
59
+ `vmt` (`visualmode-tracker`) requires Python 3.14+ and can be installed via
60
+ `uv` and `pipx`:
60
61
 
61
62
  ```bash
62
63
  ❯ uv tool install visualmode-tracker
63
64
  ```
64
65
 
66
+ `uv` downloads Python 3.14 if you don't already have it. `pipx` uses the Python
67
+ it runs on, so point it at 3.14 if that isn't your default:
68
+
65
69
  ```bash
66
- ❯ pipx install visualmode-tracker
70
+ ❯ pipx install --python python3.14 visualmode-tracker
67
71
  ```
68
72
 
69
73
  Note: that while the package name on PyPI is `visualmode-tracker`, the
@@ -96,3 +100,41 @@ Run the tests like so:
96
100
  ```bash
97
101
  ❯ uv run pytest
98
102
  ```
103
+
104
+ ## Releasing
105
+
106
+ This project follows [Semantic Versioning](https://semver.org/) and keeps a
107
+ [`CHANGELOG.md`](CHANGELOG.md) in the
108
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) format. The CLI
109
+ surface (commands, flags, output format, exit codes, config/data locations, and
110
+ supported Python versions) is the public API.
111
+
112
+ While on `0.x`, bump the **minor** version for new features or breaking changes
113
+ and the **patch** version for bug fixes only.
114
+
115
+ Every PR adds a user-facing entry under `## [Unreleased]` in `CHANGELOG.md`.
116
+ Feature PRs don't change the version.
117
+
118
+ To cut a release, run the `release` task from an up-to-date `main`:
119
+
120
+ ```bash
121
+ ❯ mise run release minor --dry-run # check and preview, changes nothing
122
+ ❯ mise run release minor # or patch / major
123
+ ```
124
+
125
+ It checks that `main` is clean and matches `origin/main`, that CI is green and
126
+ that `[Unreleased]` has entries. After you confirm, it:
127
+
128
+ 1. bumps the version and rolls `[Unreleased]` into a dated `[X.Y.Z]` section in
129
+ `CHANGELOG.md`,
130
+ 2. builds the package and smoke tests the wheel,
131
+ 3. commits `Release vX.Y.Z` and creates the annotated tag (rolling back locally
132
+ if any of this fails),
133
+ 4. pushes `main` and the tag together, which triggers the `release` workflow to
134
+ publish to PyPI via Trusted Publishing,
135
+ 5. waits for that workflow, then creates the GitHub Release from the changelog
136
+ notes.
137
+
138
+ If the workflow fails before anything reaches PyPI, fix it, re-run the workflow,
139
+ and finish with `mise run release --resume vX.Y.Z`. If a version did reach PyPI,
140
+ never reuse it: fix the problem and release a new patch version.
@@ -0,0 +1,115 @@
1
+ # VisualMode Tracker, built with Python
2
+
3
+ > A command-line time tracker for your project and work sessions
4
+
5
+ ## Usage
6
+
7
+ Standard usage of `vmt` is to `start` a session by name (e.g. `py-vmt`) with
8
+ zero or more tags (e.g. `+python`) while you work. You can always check the
9
+ `status`. When you are done with a session, you can `stop` it. Check the `log`
10
+ to see what sessions you have tracked over the last 7 days.
11
+
12
+ ```bash
13
+ ❯ vmt start py-vmt +python --at "14 minutes ago"
14
+ • Started tracking 'py-vmt' [python] at 12:00PM
15
+
16
+ ❯ vmt status
17
+ • Tracking 'py-vmt' [python] for 27m20s (since 12:00PM)
18
+
19
+ ❯ vmt stop --round
20
+ • Stopped tracking 'py-vmt' [python] (30m)
21
+
22
+ ❯ vmt log
23
+ Session Log
24
+ Sunday, August 02
25
+ 12:00PM - 12:30PM 30m 'py-vmt' [python]
26
+
27
+ ❯ vmt status
28
+ • Not tracking
29
+ Last: 'py-vmt' [python] (30m) at 12:00PM
30
+ ```
31
+
32
+ ## Installation
33
+
34
+ `vmt` (`visualmode-tracker`) requires Python 3.14+ and can be installed via
35
+ `uv` and `pipx`:
36
+
37
+ ```bash
38
+ ❯ uv tool install visualmode-tracker
39
+ ```
40
+
41
+ `uv` downloads Python 3.14 if you don't already have it. `pipx` uses the Python
42
+ it runs on, so point it at 3.14 if that isn't your default:
43
+
44
+ ```bash
45
+ ❯ pipx install --python python3.14 visualmode-tracker
46
+ ```
47
+
48
+ Note: that while the package name on PyPI is `visualmode-tracker`, the
49
+ executable binary is called via `vmt`.
50
+
51
+ ## Development
52
+
53
+ Run the CLI in development with `uv`:
54
+
55
+ ```bash
56
+ ❯ uv run vmt start taco --at "1 hour ago"
57
+ • Started tracking 'taco' at 12:56PM
58
+ with flag --at of '1 hour ago'
59
+
60
+ ❯ uv run vmt status
61
+ • Tracking 'taco' for 3m
62
+
63
+ ❯ uv run vmt start burrito
64
+ Error: already tracking 'taco'. Stop the current session first.
65
+ Aborted!
66
+ ```
67
+
68
+ ## Testing
69
+
70
+ The test suite uses `pytest` and `click`'s `CliRunner` to verify the behavior of
71
+ the `vmt` CLI.
72
+
73
+ Run the tests like so:
74
+
75
+ ```bash
76
+ ❯ uv run pytest
77
+ ```
78
+
79
+ ## Releasing
80
+
81
+ This project follows [Semantic Versioning](https://semver.org/) and keeps a
82
+ [`CHANGELOG.md`](CHANGELOG.md) in the
83
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) format. The CLI
84
+ surface (commands, flags, output format, exit codes, config/data locations, and
85
+ supported Python versions) is the public API.
86
+
87
+ While on `0.x`, bump the **minor** version for new features or breaking changes
88
+ and the **patch** version for bug fixes only.
89
+
90
+ Every PR adds a user-facing entry under `## [Unreleased]` in `CHANGELOG.md`.
91
+ Feature PRs don't change the version.
92
+
93
+ To cut a release, run the `release` task from an up-to-date `main`:
94
+
95
+ ```bash
96
+ ❯ mise run release minor --dry-run # check and preview, changes nothing
97
+ ❯ mise run release minor # or patch / major
98
+ ```
99
+
100
+ It checks that `main` is clean and matches `origin/main`, that CI is green and
101
+ that `[Unreleased]` has entries. After you confirm, it:
102
+
103
+ 1. bumps the version and rolls `[Unreleased]` into a dated `[X.Y.Z]` section in
104
+ `CHANGELOG.md`,
105
+ 2. builds the package and smoke tests the wheel,
106
+ 3. commits `Release vX.Y.Z` and creates the annotated tag (rolling back locally
107
+ if any of this fails),
108
+ 4. pushes `main` and the tag together, which triggers the `release` workflow to
109
+ publish to PyPI via Trusted Publishing,
110
+ 5. waits for that workflow, then creates the GitHub Release from the changelog
111
+ notes.
112
+
113
+ If the workflow fails before anything reaches PyPI, fix it, re-run the workflow,
114
+ and finish with `mise run release --resume vX.Y.Z`. If a version did reach PyPI,
115
+ never reuse it: fix the problem and release a new patch version.
@@ -1,5 +1,3 @@
1
- # Tokens live in mise.local.toml (gitignored). See mise.local.toml.example.
2
-
3
1
  [tools]
4
2
  uv = "latest"
5
3
 
@@ -10,7 +8,13 @@ run = ["rm -rf dist", "uv build"]
10
8
  [tasks.publish-test]
11
9
  description = "publish to TestPyPI"
12
10
  depends = ["build"]
11
+ # put TEST_PYPI_TOKEN in mise.local.toml
13
12
  run = 'uv publish --publish-url https://test.pypi.org/legacy/ --token "$TEST_PYPI_TOKEN"'
14
13
 
15
14
  # No publish-to-PyPI task on purpose: real releases go through the tag-triggered
16
15
  # .github/workflows/release.yml, which uses Trusted Publishing (OIDC, no token).
16
+
17
+ [tasks.release]
18
+ description = "cut a release: mise run release <patch|minor|major> [--dry-run] [--yes]"
19
+ # see scripts/release.py for the steps; `--resume vX.Y.Z` finishes a pushed tag
20
+ run = "uv run --no-sync scripts/release.py"
@@ -1,11 +1,11 @@
1
1
  [project]
2
2
  name = "visualmode-tracker"
3
- version = "0.1.0"
3
+ version = "0.2.0"
4
4
  description = "A command-line time tracker for your project and work sessions"
5
5
  readme = "README.md"
6
6
  license = "MIT"
7
7
  license-files = ["LICENSE"]
8
- requires-python = ">=3.12"
8
+ requires-python = ">=3.14"
9
9
  authors = [{ name = "Josh Branchaud", email = "jbranchaud@gmail.com" }]
10
10
  keywords = ["cli", "time-tracking", "timer", "productivity", "tracker"]
11
11
  classifiers = [
@@ -14,11 +14,15 @@ classifiers = [
14
14
  "Intended Audience :: Developers",
15
15
  "Operating System :: OS Independent",
16
16
  "Programming Language :: Python :: 3",
17
- "Programming Language :: Python :: 3.12",
18
- "Programming Language :: Python :: 3.13",
17
+ "Programming Language :: Python :: 3.14",
19
18
  "Topic :: Utilities",
20
19
  ]
21
- dependencies = ["click>=8.3.1", "dateparser>=1.3.0", "platformdirs>=4.9.4"]
20
+ dependencies = [
21
+ "click>=8.3.1",
22
+ "dateparser>=1.3.0",
23
+ "platformdirs>=4.9.4",
24
+ "pydantic>=2.13.4",
25
+ ]
22
26
 
23
27
  [project.urls]
24
28
  Homepage = "https://github.com/jbranchaud/py-vmt"