riched 0.2.1__tar.gz → 0.2.2__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 (29) hide show
  1. {riched-0.2.1 → riched-0.2.2}/AGENTS.md +1 -1
  2. {riched-0.2.1 → riched-0.2.2}/PKG-INFO +3 -2
  3. {riched-0.2.1 → riched-0.2.2}/README.md +2 -1
  4. {riched-0.2.1 → riched-0.2.2}/pyproject.toml +1 -1
  5. {riched-0.2.1 → riched-0.2.2}/src/riched/cli.py +6 -0
  6. {riched-0.2.1 → riched-0.2.2}/tests/runner.py +2 -0
  7. riched-0.2.2/tests/test_cli.py +22 -0
  8. {riched-0.2.1 → riched-0.2.2}/uv.lock +1 -1
  9. {riched-0.2.1 → riched-0.2.2}/.gitignore +0 -0
  10. {riched-0.2.1 → riched-0.2.2}/.python-version +0 -0
  11. {riched-0.2.1 → riched-0.2.2}/src/riched/__init__.py +0 -0
  12. {riched-0.2.1 → riched-0.2.2}/src/riched/app.py +0 -0
  13. {riched-0.2.1 → riched-0.2.2}/src/riched/bindings.yaml +0 -0
  14. {riched-0.2.1 → riched-0.2.2}/src/riched/editor.py +0 -0
  15. {riched-0.2.1 → riched-0.2.2}/src/riched/keybindings.py +0 -0
  16. {riched-0.2.1 → riched-0.2.2}/src/riched/quick_open.py +0 -0
  17. {riched-0.2.1 → riched-0.2.2}/src/riched/screens.py +0 -0
  18. {riched-0.2.1 → riched-0.2.2}/src/riched/settings.py +0 -0
  19. {riched-0.2.1 → riched-0.2.2}/src/riched/syntax.py +0 -0
  20. {riched-0.2.1 → riched-0.2.2}/tests/__init__.py +0 -0
  21. {riched-0.2.1 → riched-0.2.2}/tests/helpers.py +0 -0
  22. {riched-0.2.1 → riched-0.2.2}/tests/test_command_palette.py +0 -0
  23. {riched-0.2.1 → riched-0.2.2}/tests/test_dirty_buffers.py +0 -0
  24. {riched-0.2.1 → riched-0.2.2}/tests/test_editor_shortcuts.py +0 -0
  25. {riched-0.2.1 → riched-0.2.2}/tests/test_file_io.py +0 -0
  26. {riched-0.2.1 → riched-0.2.2}/tests/test_file_tree.py +0 -0
  27. {riched-0.2.1 → riched-0.2.2}/tests/test_footer.py +0 -0
  28. {riched-0.2.1 → riched-0.2.2}/tests/test_quick_open.py +0 -0
  29. {riched-0.2.1 → riched-0.2.2}/tests/test_syntax.py +0 -0
@@ -9,7 +9,7 @@ This repository is a uv-managed Python project for `riched`, a Textual TUI edito
9
9
  - `uv sync`: install project dependencies from `pyproject.toml` and `uv.lock`.
10
10
  - `uv run riched path/to/file.txt`: open or create a file in the editor.
11
11
  - `uv run python -m tests.runner`: run the Textual Pilot end-to-end suite.
12
- - `uv build`: build the source distribution and wheel in `dist/`.
12
+ - `rm -rf dist && uv build`: clear stale artifacts, then build the source distribution and wheel in `dist/`.
13
13
  - `set -a; source .env; set +a; uv publish --token "$PYPI_API"`: publish built distributions for a release using the PyPI API key from `.env`.
14
14
  - `uv add <package>`: add runtime dependencies; do not use `pip`.
15
15
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: riched
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: TUI editor with VSCode keybindigs
5
5
  Requires-Python: >=3.12
6
6
  Requires-Dist: pyyaml>=6.0.3
@@ -10,7 +10,7 @@ Description-Content-Type: text/markdown
10
10
 
11
11
  # Riched
12
12
 
13
- > TUI editor tailored for VSCode keybindigs in Ghostty terminal
13
+ > TUI editor with VSCode keybindigs
14
14
 
15
15
  `riched` is a TUI editor powered by the [Rich](https://github.com/Textualize/rich) package and the [Textual](https://github.com/Textualize/textual) framework, the name is a nod to Rich.
16
16
 
@@ -32,6 +32,7 @@ Description-Content-Type: text/markdown
32
32
  ```sh
33
33
  uv tool install riched
34
34
  riched .
35
+ riched --version
35
36
  ```
36
37
 
37
38
  ## Dev
@@ -1,6 +1,6 @@
1
1
  # Riched
2
2
 
3
- > TUI editor tailored for VSCode keybindigs in Ghostty terminal
3
+ > TUI editor with VSCode keybindigs
4
4
 
5
5
  `riched` is a TUI editor powered by the [Rich](https://github.com/Textualize/rich) package and the [Textual](https://github.com/Textualize/textual) framework, the name is a nod to Rich.
6
6
 
@@ -22,6 +22,7 @@
22
22
  ```sh
23
23
  uv tool install riched
24
24
  riched .
25
+ riched --version
25
26
  ```
26
27
 
27
28
  ## Dev
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "riched"
3
- version = "0.2.1"
3
+ version = "0.2.2"
4
4
  description = "TUI editor with VSCode keybindigs"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -1,6 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import argparse
4
+ from importlib.metadata import version
4
5
  from pathlib import Path
5
6
 
6
7
  from .app import RichedApp
@@ -11,6 +12,11 @@ def main() -> int:
11
12
  parser = argparse.ArgumentParser(
12
13
  prog="riched", description="A minimal Textual TUI text editor."
13
14
  )
15
+ parser.add_argument(
16
+ "--version",
17
+ action="version",
18
+ version=f"%(prog)s {version('riched')}",
19
+ )
14
20
  parser.add_argument("filename", help="File to open (created on save if missing)")
15
21
  args = parser.parse_args()
16
22
 
@@ -8,6 +8,7 @@ from .test_command_palette import (
8
8
  test_command_palette_button_is_hidden,
9
9
  test_command_palette_omits_maximize,
10
10
  )
11
+ from .test_cli import test_version_flag_prints_current_version
11
12
  from .test_dirty_buffers import (
12
13
  test_close_buffer_clean_enters_no_buffer_state_via_ctrl_w,
13
14
  test_close_buffer_dirty_shows_wide_modal_then_cancel,
@@ -72,6 +73,7 @@ TESTS: list[tuple[str, Callable[[], Awaitable[None]]]] = [
72
73
  ("open missing file", test_open_missing_file),
73
74
  ("open directory starts with no buffer", test_open_directory_starts_with_no_buffer),
74
75
  ("save writes file", test_save_writes_file),
76
+ ("cli: version flag prints current version", test_version_flag_prints_current_version),
75
77
  ("command palette: button hidden", test_command_palette_button_is_hidden),
76
78
  ("command palette: omit maximize", test_command_palette_omits_maximize),
77
79
  ("quit clean exits", test_quit_clean_exits),
@@ -0,0 +1,22 @@
1
+ from __future__ import annotations
2
+
3
+ import subprocess
4
+ import sys
5
+ from importlib.metadata import version
6
+
7
+
8
+ async def test_version_flag_prints_current_version() -> None:
9
+ result = subprocess.run(
10
+ [
11
+ sys.executable,
12
+ "-c",
13
+ "from riched.cli import main; raise SystemExit(main())",
14
+ "--version",
15
+ ],
16
+ check=False,
17
+ capture_output=True,
18
+ text=True,
19
+ )
20
+ assert result.returncode == 0, result.stderr
21
+ assert result.stdout == f"riched {version('riched')}\n", result.stdout
22
+ assert result.stderr == "", result.stderr
@@ -131,7 +131,7 @@ wheels = [
131
131
 
132
132
  [[package]]
133
133
  name = "riched"
134
- version = "0.2.1"
134
+ version = "0.2.2"
135
135
  source = { editable = "." }
136
136
  dependencies = [
137
137
  { name = "pyyaml" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes