peneo 0.4.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 (111) hide show
  1. peneo-0.4.0/.github/workflows/python-ci.yml +31 -0
  2. peneo-0.4.0/.github/workflows/release.yml +171 -0
  3. peneo-0.4.0/.gitignore +9 -0
  4. peneo-0.4.0/.python-version +1 -0
  5. peneo-0.4.0/AGENTS.md +35 -0
  6. peneo-0.4.0/CLAUDE.md +35 -0
  7. peneo-0.4.0/LICENSE +21 -0
  8. peneo-0.4.0/PKG-INFO +390 -0
  9. peneo-0.4.0/README.ja.md +368 -0
  10. peneo-0.4.0/README.md +362 -0
  11. peneo-0.4.0/docs/architecture.en.md +360 -0
  12. peneo-0.4.0/docs/architecture.md +360 -0
  13. peneo-0.4.0/docs/performance.en.md +52 -0
  14. peneo-0.4.0/docs/performance.md +78 -0
  15. peneo-0.4.0/docs/resources/screen-bookmark.png +0 -0
  16. peneo-0.4.0/docs/resources/screen-command-palette.png +0 -0
  17. peneo-0.4.0/docs/resources/screen-entire-screen.png +0 -0
  18. peneo-0.4.0/docs/resources/screen-filter-sort.png +0 -0
  19. peneo-0.4.0/docs/resources/screen-find-command.png +0 -0
  20. peneo-0.4.0/docs/resources/screen-grep-command.png +0 -0
  21. peneo-0.4.0/docs/resources/screen-history.png +0 -0
  22. peneo-0.4.0/docs/resources/screen-split-terminal.png +0 -0
  23. peneo-0.4.0/docs/resources/screen-terminal-editor.png +0 -0
  24. peneo-0.4.0/docs/spec_mvp.en.md +419 -0
  25. peneo-0.4.0/docs/spec_mvp.md +406 -0
  26. peneo-0.4.0/pyproject.toml +69 -0
  27. peneo-0.4.0/src/peneo/__init__.py +6 -0
  28. peneo-0.4.0/src/peneo/__main__.py +104 -0
  29. peneo-0.4.0/src/peneo/adapters/__init__.py +21 -0
  30. peneo-0.4.0/src/peneo/adapters/external_launcher.py +519 -0
  31. peneo-0.4.0/src/peneo/adapters/file_operations.py +118 -0
  32. peneo-0.4.0/src/peneo/adapters/filesystem.py +106 -0
  33. peneo-0.4.0/src/peneo/app.py +632 -0
  34. peneo-0.4.0/src/peneo/app_runtime.py +1279 -0
  35. peneo-0.4.0/src/peneo/app_shell.py +154 -0
  36. peneo-0.4.0/src/peneo/archive_utils.py +85 -0
  37. peneo-0.4.0/src/peneo/models/__init__.py +118 -0
  38. peneo-0.4.0/src/peneo/models/config.py +106 -0
  39. peneo-0.4.0/src/peneo/models/external_launch.py +16 -0
  40. peneo-0.4.0/src/peneo/models/file_operations.py +174 -0
  41. peneo-0.4.0/src/peneo/models/shell_command.py +12 -0
  42. peneo-0.4.0/src/peneo/models/shell_data.py +276 -0
  43. peneo-0.4.0/src/peneo/services/__init__.py +146 -0
  44. peneo-0.4.0/src/peneo/services/archive_extract.py +301 -0
  45. peneo-0.4.0/src/peneo/services/archive_list.py +165 -0
  46. peneo-0.4.0/src/peneo/services/browser_snapshot.py +308 -0
  47. peneo-0.4.0/src/peneo/services/clipboard_operations.py +159 -0
  48. peneo-0.4.0/src/peneo/services/config.py +584 -0
  49. peneo-0.4.0/src/peneo/services/directory_size.py +81 -0
  50. peneo-0.4.0/src/peneo/services/external_launcher.py +105 -0
  51. peneo-0.4.0/src/peneo/services/file_mutations.py +145 -0
  52. peneo-0.4.0/src/peneo/services/file_search.py +160 -0
  53. peneo-0.4.0/src/peneo/services/grep_search.py +197 -0
  54. peneo-0.4.0/src/peneo/services/logging.py +144 -0
  55. peneo-0.4.0/src/peneo/services/shell_command.py +78 -0
  56. peneo-0.4.0/src/peneo/services/split_terminal.py +249 -0
  57. peneo-0.4.0/src/peneo/services/zip_compress.py +199 -0
  58. peneo-0.4.0/src/peneo/state/__init__.py +388 -0
  59. peneo-0.4.0/src/peneo/state/actions.py +936 -0
  60. peneo-0.4.0/src/peneo/state/command_palette.py +401 -0
  61. peneo-0.4.0/src/peneo/state/effects.py +198 -0
  62. peneo-0.4.0/src/peneo/state/input.py +784 -0
  63. peneo-0.4.0/src/peneo/state/models.py +481 -0
  64. peneo-0.4.0/src/peneo/state/reducer.py +133 -0
  65. peneo-0.4.0/src/peneo/state/reducer_common.py +961 -0
  66. peneo-0.4.0/src/peneo/state/reducer_mutations.py +935 -0
  67. peneo-0.4.0/src/peneo/state/reducer_navigation.py +570 -0
  68. peneo-0.4.0/src/peneo/state/reducer_palette.py +1056 -0
  69. peneo-0.4.0/src/peneo/state/reducer_terminal_config.py +544 -0
  70. peneo-0.4.0/src/peneo/state/selectors.py +1254 -0
  71. peneo-0.4.0/src/peneo/ui/__init__.py +30 -0
  72. peneo-0.4.0/src/peneo/ui/attribute_dialog.py +55 -0
  73. peneo-0.4.0/src/peneo/ui/command_palette.py +100 -0
  74. peneo-0.4.0/src/peneo/ui/config_dialog.py +55 -0
  75. peneo-0.4.0/src/peneo/ui/conflict_dialog.py +45 -0
  76. peneo-0.4.0/src/peneo/ui/current_path_bar.py +32 -0
  77. peneo-0.4.0/src/peneo/ui/help_bar.py +27 -0
  78. peneo-0.4.0/src/peneo/ui/input_bar.py +45 -0
  79. peneo-0.4.0/src/peneo/ui/panes.py +620 -0
  80. peneo-0.4.0/src/peneo/ui/shell_command_dialog.py +58 -0
  81. peneo-0.4.0/src/peneo/ui/split_terminal.py +276 -0
  82. peneo-0.4.0/src/peneo/ui/status_bar.py +37 -0
  83. peneo-0.4.0/src/peneo/ui/summary_bar.py +38 -0
  84. peneo-0.4.0/tests/__init__.py +1 -0
  85. peneo-0.4.0/tests/state_test_helpers.py +49 -0
  86. peneo-0.4.0/tests/test_adapters_file_operations.py +227 -0
  87. peneo-0.4.0/tests/test_adapters_filesystem.py +92 -0
  88. peneo-0.4.0/tests/test_app.py +3985 -0
  89. peneo-0.4.0/tests/test_app_runtime.py +699 -0
  90. peneo-0.4.0/tests/test_cli.py +154 -0
  91. peneo-0.4.0/tests/test_entrypoint.py +12 -0
  92. peneo-0.4.0/tests/test_input_dispatch.py +1412 -0
  93. peneo-0.4.0/tests/test_services_archive_extract.py +100 -0
  94. peneo-0.4.0/tests/test_services_archive_list.py +174 -0
  95. peneo-0.4.0/tests/test_services_browser_snapshot.py +195 -0
  96. peneo-0.4.0/tests/test_services_clipboard_operations.py +201 -0
  97. peneo-0.4.0/tests/test_services_config.py +221 -0
  98. peneo-0.4.0/tests/test_services_directory_size.py +64 -0
  99. peneo-0.4.0/tests/test_services_external_launcher.py +602 -0
  100. peneo-0.4.0/tests/test_services_file_mutations.py +178 -0
  101. peneo-0.4.0/tests/test_services_file_search.py +108 -0
  102. peneo-0.4.0/tests/test_services_grep_search.py +68 -0
  103. peneo-0.4.0/tests/test_services_logging.py +61 -0
  104. peneo-0.4.0/tests/test_services_shell_command.py +32 -0
  105. peneo-0.4.0/tests/test_services_split_terminal.py +43 -0
  106. peneo-0.4.0/tests/test_services_zip_compress.py +62 -0
  107. peneo-0.4.0/tests/test_shell_command_feature.py +161 -0
  108. peneo-0.4.0/tests/test_state_reducer.py +4599 -0
  109. peneo-0.4.0/tests/test_state_selectors.py +1812 -0
  110. peneo-0.4.0/tests/test_ui_panes.py +46 -0
  111. peneo-0.4.0/uv.lock +271 -0
@@ -0,0 +1,31 @@
1
+ name: Python CI
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+
7
+ jobs:
8
+ lint-and-test:
9
+ runs-on: ubuntu-latest
10
+
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+
14
+ - uses: astral-sh/setup-uv@v4
15
+ with:
16
+ python-version: "3.12"
17
+
18
+ - name: Install system dependencies
19
+ run: sudo apt-get install -y ripgrep
20
+
21
+ - name: Install dependencies
22
+ run: uv sync --dev
23
+
24
+ - name: Prepare temp directory
25
+ run: mkdir -p "$RUNNER_TEMP/peneo-tmp"
26
+
27
+ - name: Lint
28
+ run: uv run ruff check .
29
+
30
+ - name: Test
31
+ run: TMPDIR="$RUNNER_TEMP/peneo-tmp" uv run pytest
@@ -0,0 +1,171 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*.*.*'
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ build-distributions:
13
+ runs-on: ubuntu-latest
14
+ outputs:
15
+ version: ${{ steps.version.outputs.version }}
16
+
17
+ steps:
18
+ - name: Checkout code
19
+ uses: actions/checkout@v4
20
+ with:
21
+ fetch-depth: 0
22
+
23
+ - name: Set up Python with uv
24
+ uses: astral-sh/setup-uv@v4
25
+ with:
26
+ python-version: "3.12"
27
+
28
+ - name: Install dependencies
29
+ run: uv sync --dev
30
+
31
+ - name: Prepare temp directory
32
+ run: mkdir -p "$RUNNER_TEMP/peneo-tmp"
33
+
34
+ - name: Extract version from tag
35
+ id: version
36
+ run: |
37
+ VERSION=${GITHUB_REF#refs/tags/v}
38
+ echo "version=$VERSION" >> $GITHUB_OUTPUT
39
+ echo "Version: $VERSION"
40
+
41
+ - name: Verify version consistency
42
+ run: |
43
+ TAG_VERSION=${{ steps.version.outputs.version }}
44
+ PY_VERSION=$(python3 - <<'PY'
45
+ import tomllib
46
+
47
+ with open("pyproject.toml", "rb") as f:
48
+ print(tomllib.load(f)["project"]["version"])
49
+ PY
50
+ )
51
+ if [ "$TAG_VERSION" != "$PY_VERSION" ]; then
52
+ echo "Error: Tag version ($TAG_VERSION) does not match pyproject.toml version ($PY_VERSION)"
53
+ exit 1
54
+ fi
55
+
56
+ - name: Run tests
57
+ run: TMPDIR="$RUNNER_TEMP/peneo-tmp" uv run pytest
58
+
59
+ - name: Build source distribution
60
+ run: |
61
+ uv build --sdist --out-dir dist
62
+
63
+ - name: Build wheel
64
+ run: |
65
+ uv build --wheel --out-dir dist
66
+
67
+ - name: Upload distribution artifacts
68
+ uses: actions/upload-artifact@v4
69
+ with:
70
+ name: python-package-distributions
71
+ path: dist/*
72
+
73
+ publish-testpypi:
74
+ runs-on: ubuntu-latest
75
+ needs: build-distributions
76
+
77
+ steps:
78
+ - name: Download distribution artifacts
79
+ uses: actions/download-artifact@v4
80
+ with:
81
+ name: python-package-distributions
82
+ path: dist
83
+
84
+ - name: Publish package distributions to TestPyPI
85
+ uses: pypa/gh-action-pypi-publish@release/v1
86
+ with:
87
+ packages-dir: dist/
88
+ password: ${{ secrets.TEST_PYPI_API_TOKEN }}
89
+ repository-url: https://test.pypi.org/legacy/
90
+
91
+ verify-testpypi:
92
+ runs-on: ubuntu-latest
93
+ needs:
94
+ - build-distributions
95
+ - publish-testpypi
96
+
97
+ steps:
98
+ - name: Set up Python with uv
99
+ uses: astral-sh/setup-uv@v4
100
+ with:
101
+ python-version: "3.12"
102
+
103
+ - name: Wait for package availability on TestPyPI
104
+ env:
105
+ VERSION: ${{ needs.build-distributions.outputs.version }}
106
+ run: |
107
+ uv venv .testpypi-venv
108
+ for attempt in $(seq 1 10); do
109
+ if uv pip install \
110
+ --python .testpypi-venv/bin/python \
111
+ --refresh \
112
+ --index-url https://test.pypi.org/simple/ \
113
+ --extra-index-url https://pypi.org/simple/ \
114
+ "peneo==${VERSION}"; then
115
+ exit 0
116
+ fi
117
+ echo "Package not available yet on TestPyPI, retrying..."
118
+ sleep 15
119
+ done
120
+ echo "Failed to install peneo==${VERSION} from TestPyPI"
121
+ exit 1
122
+
123
+ - name: Verify installed package import
124
+ run: .testpypi-venv/bin/python -c "import peneo; import peneo.__main__"
125
+
126
+ publish-pypi:
127
+ runs-on: ubuntu-latest
128
+ needs: verify-testpypi
129
+ environment:
130
+ name: pypi
131
+ url: https://pypi.org/p/peneo
132
+
133
+ steps:
134
+ - name: Download distribution artifacts
135
+ uses: actions/download-artifact@v4
136
+ with:
137
+ name: python-package-distributions
138
+ path: dist
139
+
140
+ - name: Publish package distributions to PyPI
141
+ uses: pypa/gh-action-pypi-publish@release/v1
142
+ with:
143
+ packages-dir: dist/
144
+ password: ${{ secrets.PYPI_API_TOKEN }}
145
+
146
+ create-github-release:
147
+ runs-on: ubuntu-latest
148
+ needs:
149
+ - build-distributions
150
+ - publish-pypi
151
+ permissions:
152
+ contents: write
153
+
154
+ steps:
155
+ - name: Download distribution artifacts
156
+ uses: actions/download-artifact@v4
157
+ with:
158
+ name: python-package-distributions
159
+ path: dist
160
+
161
+ - name: Create GitHub Release
162
+ uses: softprops/action-gh-release@v2
163
+ with:
164
+ tag_name: ${{ github.ref_name }}
165
+ name: Peneo ${{ needs.build-distributions.outputs.version }}
166
+ generate_release_notes: true
167
+ files: |
168
+ dist/*
169
+ draft: false
170
+ prerelease: false
171
+ fail_on_unmatched_files: true
peneo-0.4.0/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ .venv/
2
+ __pycache__/
3
+ .pytest_cache/
4
+ .ruff_cache/
5
+ .mypy_cache/
6
+ *.pyc
7
+ .vscode/
8
+ .serena/
9
+
@@ -0,0 +1 @@
1
+ 3.12
peneo-0.4.0/AGENTS.md ADDED
@@ -0,0 +1,35 @@
1
+ # Repository Guidelines
2
+
3
+ ## Project Structure & Module Organization
4
+
5
+ Core application code lives under `src/peneo/`. Keep UI concerns in `src/peneo/ui/`, state and reducers in `src/peneo/state/`, side-effect orchestration in `src/peneo/services/`, external integrations in `src/peneo/adapters/`, and shared data models in `src/peneo/models/`. Tests live in `tests/`. Product and MVP notes belong in `docs/`. CI is defined in `.github/workflows/python-ci.yml`.
6
+
7
+ Current input handling is centralized in `src/peneo/state/input.py`. Keep key interpretation in the dispatcher and reducer-facing actions rather than embedding per-widget branching in `src/peneo/ui/`.
8
+
9
+ ## Build, Test, and Development Commands
10
+
11
+ - `uv sync --python 3.12 --dev`: create or refresh the local environment with dev dependencies.
12
+ - `uv run peneo`: start the Textual app through the console script.
13
+ - `uv run python -m peneo`: alternate module-based entrypoint.
14
+ - `uv run ruff check .`: run lint checks.
15
+ - `uv run pytest`: execute the test suite.
16
+
17
+ Run commands from the repository root so paths and config resolution stay consistent.
18
+
19
+ ## Coding Style & Naming Conventions
20
+
21
+ Target Python 3.12 and follow PEP 8 with 4-space indentation. Use `snake_case` for modules, functions, and variables; `PascalCase` for classes; and short imperative names for actions or commands. Keep UI code presentation-focused and move filesystem or OS-specific logic into `adapters/` and `services/`. Use `ruff` for import sorting and lint enforcement before opening a PR.
22
+
23
+ ## Testing Guidelines
24
+
25
+ Use `pytest` for all tests and `pytest-asyncio` for async or Textual headless cases. Name test files `test_*.py` and test functions `test_*`. Add or update tests with every behavior change. New UI bootstrap or state transitions should have at least one smoke-level test proving the app can start or the reducer path works.
26
+
27
+ The current app renders a live three-pane filesystem browser and routes keyboard input through the centralized dispatcher/reducer flow. Covered interactions include directory navigation, reload, filtering, sort changes, directories-first toggle, selection, copy/cut/paste, delete-to-trash with configurable confirmation, single-target rename, create file/directory flows, recursive file search from the command palette, read-only attribute inspection, startup-config editing and saving, opening files with the OS default app, opening files in a terminal editor with `e`, copying paths to the system clipboard, opening a terminal in the current directory with optional `config.toml` overrides, toggling hidden-file visibility from the command palette, and using the embedded split terminal. `HistoryState` exists in state but back/forward navigation is not yet wired to the UI; keep AGENTS/README in sync when that changes.
28
+
29
+ ## Commit & Pull Request Guidelines
30
+
31
+ Recent history uses short imperative commit subjects such as `Add MVP specification document`. Follow that style and keep commits focused. Create feature branches per issue from the latest `develop` branch, for example `feat/issue-7-textual-bootstrap`. Treat `develop` as the next release candidate and keep it in a state that is ready for functional verification. Merge feature work by opening PRs from the feature branch into `develop`. Except for hotfixes, do not merge work branches directly into `main`; release by merging `develop` into `main`. PR titles should include the related issue ID, and PR descriptions should summarize scope, test results, and follow-up work. Link the issue, and include terminal output or screenshots when a UI change is easier to review visually.
32
+
33
+ ## Configuration & Workflow Notes
34
+
35
+ Use `gh` for GitHub operations. Sync the latest `develop` branch before creating a feature branch, and keep the hotfix exception explicit when a direct `main` update is required. Keep `.venv/`, cache directories, and editor-specific files out of commits. Update `README.md` when setup steps, commands, repository layout, or developer workflow change.
peneo-0.4.0/CLAUDE.md ADDED
@@ -0,0 +1,35 @@
1
+ # Repository Guidelines
2
+
3
+ ## Project Structure & Module Organization
4
+
5
+ Core application code lives under `src/peneo/`. Keep UI concerns in `src/peneo/ui/`, state and reducers in `src/peneo/state/`, side-effect orchestration in `src/peneo/services/`, external integrations in `src/peneo/adapters/`, and shared data models in `src/peneo/models/`. Tests live in `tests/`. Product and MVP notes belong in `docs/`. CI is defined in `.github/workflows/python-ci.yml`.
6
+
7
+ Current input handling is centralized in `src/peneo/state/input.py`. Keep key interpretation in the dispatcher and reducer-facing actions rather than embedding per-widget branching in `src/peneo/ui/`.
8
+
9
+ ## Build, Test, and Development Commands
10
+
11
+ - `uv sync --python 3.12 --dev`: create or refresh the local environment with dev dependencies.
12
+ - `uv run peneo`: start the Textual app through the console script.
13
+ - `uv run python -m peneo`: alternate module-based entrypoint.
14
+ - `uv run ruff check .`: run lint checks.
15
+ - `uv run pytest`: execute the test suite.
16
+
17
+ Run commands from the repository root so paths and config resolution stay consistent.
18
+
19
+ ## Coding Style & Naming Conventions
20
+
21
+ Target Python 3.12 and follow PEP 8 with 4-space indentation. Use `snake_case` for modules, functions, and variables; `PascalCase` for classes; and short imperative names for actions or commands. Keep UI code presentation-focused and move filesystem or OS-specific logic into `adapters/` and `services/`. Use `ruff` for import sorting and lint enforcement before opening a PR.
22
+
23
+ ## Testing Guidelines
24
+
25
+ Use `pytest` for all tests and `pytest-asyncio` for async or Textual headless cases. Name test files `test_*.py` and test functions `test_*`. Add or update tests with every behavior change. New UI bootstrap or state transitions should have at least one smoke-level test proving the app can start or the reducer path works.
26
+
27
+ The current app renders a live three-pane filesystem browser and routes keyboard input through the centralized dispatcher/reducer flow. Covered interactions include directory navigation, reload, filtering, sort changes, directories-first toggle, selection, copy/cut/paste, delete-to-trash with configurable confirmation, single-target rename, create file/directory flows, recursive file search from the command palette, read-only attribute inspection, startup-config editing and saving, opening files with the OS default app, opening files in a terminal editor with `e`, copying paths to the system clipboard, opening a terminal in the current directory with optional `config.toml` overrides, toggling hidden-file visibility from the command palette, and using the embedded split terminal. `HistoryState` exists in state but back/forward navigation is not yet wired to the UI; keep AGENTS/README in sync when that changes.
28
+
29
+ ## Commit & Pull Request Guidelines
30
+
31
+ Recent history uses short imperative commit subjects such as `Add MVP specification document`. Follow that style and keep commits focused. Create feature branches per issue from the latest `develop` branch, for example `feat/issue-7-textual-bootstrap`. Treat `develop` as the next release candidate and keep it in a state that is ready for functional verification. Merge feature work by opening PRs from the feature branch into `develop`. Except for hotfixes, do not merge work branches directly into `main`; release by merging `develop` into `main`. PR titles should include the related issue ID, and PR descriptions should summarize scope, test results, and follow-up work. Link the issue, and include terminal output or screenshots when a UI change is easier to review visually.
32
+
33
+ ## Configuration & Workflow Notes
34
+
35
+ Use `gh` for GitHub operations. Sync the latest `develop` branch before creating a feature branch, and keep the hotfix exception explicit when a direct `main` update is required. Keep `.venv/`, cache directories, and editor-specific files out of commits. Update `README.md` when setup steps, commands, repository layout, or developer workflow change.
peneo-0.4.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 devgamesan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.