lupaxa-sandbox 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.
- lupaxa_sandbox-0.1.0/.gitignore +24 -0
- lupaxa_sandbox-0.1.0/LICENCE +21 -0
- lupaxa_sandbox-0.1.0/PKG-INFO +205 -0
- lupaxa_sandbox-0.1.0/README.md +139 -0
- lupaxa_sandbox-0.1.0/docs/README.md +23 -0
- lupaxa_sandbox-0.1.0/pyproject.toml +108 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/__init__.py +7 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/__main__.py +10 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/cli.py +934 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/compare.py +254 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/exceptions.py +39 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/execution/__init__.py +1 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/execution/base.py +48 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/execution/container.py +150 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/execution/environment.py +96 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/execution/local.py +257 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/execution/policy.py +40 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/execution/registry.py +93 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/execution/restricted.py +172 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/locations.py +24 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/operations/__init__.py +1 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/operations/apply.py +344 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/operations/export.py +150 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/operations/paths.py +47 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/operations/retention.py +156 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/py.typed +0 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/recipes/__init__.py +1 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/recipes/loader.py +101 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/recipes/models.py +188 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/recipes/runner.py +362 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/reporting.py +142 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/service.py +336 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/sessions/__init__.py +1 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/sessions/database.py +104 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/sessions/store.py +584 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/tui/__init__.py +1 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/tui/app.py +230 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/tui/launch.py +26 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/version.py +10 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/workspace/__init__.py +1 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/workspace/changes.py +75 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/workspace/manifest.py +156 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/workspace/patterns.py +40 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/workspace/staging.py +126 -0
- lupaxa_sandbox-0.1.0/src/lupaxa/sandbox/workspace/textdiff.py +45 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# OS
|
|
2
|
+
.DS_Store
|
|
3
|
+
|
|
4
|
+
# Cursor
|
|
5
|
+
.cursor/
|
|
6
|
+
.superpowers/
|
|
7
|
+
.worktrees/
|
|
8
|
+
cursor-docs
|
|
9
|
+
|
|
10
|
+
# Make
|
|
11
|
+
.makefiles/
|
|
12
|
+
|
|
13
|
+
# MkDocs
|
|
14
|
+
site/
|
|
15
|
+
|
|
16
|
+
# Python
|
|
17
|
+
.venv/
|
|
18
|
+
__pycache__/
|
|
19
|
+
.mypy_cache/
|
|
20
|
+
.ruff_cache/
|
|
21
|
+
.pytest_cache/
|
|
22
|
+
dist/
|
|
23
|
+
build/
|
|
24
|
+
*.egg-info/
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) The Lupaxa Project
|
|
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.
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: lupaxa-sandbox
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Run commands in disposable workspaces and inspect what they change.
|
|
5
|
+
Project-URL: Homepage, https://github.com/lupaxa-developers-toolbox/sandbox
|
|
6
|
+
Project-URL: Documentation, https://sandbox.thelupaxaproject.org/
|
|
7
|
+
Project-URL: Repository, https://github.com/lupaxa-developers-toolbox/sandbox
|
|
8
|
+
Project-URL: Issues, https://github.com/lupaxa-developers-toolbox/sandbox/issues
|
|
9
|
+
Author: The Lupaxa Project
|
|
10
|
+
License: MIT License
|
|
11
|
+
|
|
12
|
+
Copyright (c) The Lupaxa Project
|
|
13
|
+
|
|
14
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
15
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
16
|
+
in the Software without restriction, including without limitation the rights
|
|
17
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
18
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
19
|
+
furnished to do so, subject to the following conditions:
|
|
20
|
+
|
|
21
|
+
The above copyright notice and this permission notice shall be included in all
|
|
22
|
+
copies or substantial portions of the Software.
|
|
23
|
+
|
|
24
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
25
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
26
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
27
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
28
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
29
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
30
|
+
SOFTWARE.
|
|
31
|
+
License-File: LICENCE
|
|
32
|
+
Keywords: cli,filesystem,sandbox,workspace
|
|
33
|
+
Classifier: Development Status :: 3 - Alpha
|
|
34
|
+
Classifier: Environment :: Console
|
|
35
|
+
Classifier: Intended Audience :: Developers
|
|
36
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
37
|
+
Classifier: Operating System :: OS Independent
|
|
38
|
+
Classifier: Programming Language :: Python :: 3
|
|
39
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
40
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
41
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
42
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
43
|
+
Classifier: Topic :: Software Development
|
|
44
|
+
Classifier: Topic :: Utilities
|
|
45
|
+
Requires-Python: >=3.11
|
|
46
|
+
Requires-Dist: pathspec>=0.12
|
|
47
|
+
Requires-Dist: platformdirs>=4
|
|
48
|
+
Requires-Dist: pydantic>=2
|
|
49
|
+
Requires-Dist: pyyaml>=6
|
|
50
|
+
Requires-Dist: rich>=13
|
|
51
|
+
Requires-Dist: typer>=0.12
|
|
52
|
+
Provides-Extra: dev
|
|
53
|
+
Requires-Dist: bump-my-version>=1.2.0; extra == 'dev'
|
|
54
|
+
Requires-Dist: hatch>=1.12.0; extra == 'dev'
|
|
55
|
+
Requires-Dist: mypy>=1.12.0; extra == 'dev'
|
|
56
|
+
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
|
|
57
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
58
|
+
Requires-Dist: ruff>=0.6.0; extra == 'dev'
|
|
59
|
+
Requires-Dist: textual>=1.0; extra == 'dev'
|
|
60
|
+
Provides-Extra: test
|
|
61
|
+
Requires-Dist: pytest-cov>=5.0; extra == 'test'
|
|
62
|
+
Requires-Dist: pytest>=8.0; extra == 'test'
|
|
63
|
+
Provides-Extra: tui
|
|
64
|
+
Requires-Dist: textual>=1.0; extra == 'tui'
|
|
65
|
+
Description-Content-Type: text/markdown
|
|
66
|
+
|
|
67
|
+
<p align="center">
|
|
68
|
+
<a href="https://github.com/lupaxa-developers-toolbox">
|
|
69
|
+
<img src="https://raw.githubusercontent.com/the-lupaxa-project/brand-assets/master/logos/organisations/developers-toolbox/readme-logo.png" alt="Developers Toolbox" />
|
|
70
|
+
</a>
|
|
71
|
+
</p>
|
|
72
|
+
|
|
73
|
+
<h1 align="center">Sandbox</h1>
|
|
74
|
+
|
|
75
|
+
Sandbox runs commands in a disposable copy of a project and shows what
|
|
76
|
+
those commands changed. The original project stays in place.
|
|
77
|
+
|
|
78
|
+
> **Note:** A workspace is a copied directory, not a security boundary. A
|
|
79
|
+
> command still runs with your user permissions.
|
|
80
|
+
|
|
81
|
+
The PyPI name is `lupaxa-sandbox`. The import path is `lupaxa.sandbox`.
|
|
82
|
+
The console script is `sandbox`. `lupaxa` is a namespace package — there
|
|
83
|
+
is no `lupaxa/__init__.py`.
|
|
84
|
+
|
|
85
|
+
## Install
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
pip install lupaxa-sandbox
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Python 3.11 or newer is required.
|
|
92
|
+
|
|
93
|
+
## Run
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
sandbox run -- python -c "open('generated.txt', 'w').write('ok\n')"
|
|
97
|
+
sandbox list
|
|
98
|
+
sandbox diff run-name
|
|
99
|
+
sandbox logs run-name
|
|
100
|
+
sandbox destroy run-name
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
`sandbox run` copies the current directory, runs the command in that copy,
|
|
104
|
+
and prints what was added, changed, or deleted. The copy is kept until
|
|
105
|
+
you destroy the session. Put the command after `--` so Sandbox does not
|
|
106
|
+
treat it as its own options. Add `--shell` only when you want a shell to
|
|
107
|
+
expand the command.
|
|
108
|
+
|
|
109
|
+
`sandbox --help` and `sandbox --version` print usage and the package
|
|
110
|
+
version. `--json` prints a machine-readable report. A normal command
|
|
111
|
+
failure returns that command's exit code. A timeout returns exit code 5.
|
|
112
|
+
|
|
113
|
+
## Isolation
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
sandbox backend list
|
|
117
|
+
sandbox run --backend restricted --network deny -- python -c "open('out.txt', 'w').write('ok')"
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
The local backend is the default. It runs as you and does not restrict
|
|
121
|
+
files, the network, or processes. `restricted`, `docker`, and `podman`
|
|
122
|
+
are used only when a probe says they work. A limit the selected backend
|
|
123
|
+
cannot enforce is refused. Sandbox does not switch to a weaker backend,
|
|
124
|
+
and it does not pull container images.
|
|
125
|
+
|
|
126
|
+
## Compare
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
sandbox compare sandbox.yml --python-a python3.11 --python-b python3.12
|
|
130
|
+
sandbox tui
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
`sandbox compare` stages the project once and runs that same snapshot in
|
|
134
|
+
two sessions. The report lists exit codes, output, and files that
|
|
135
|
+
differ. A difference is an observation. It does not mean the commands
|
|
136
|
+
are incompatible. `sandbox tui` browses sessions, diffs, and export.
|
|
137
|
+
Install it with `pip install "lupaxa-sandbox[tui]"`. A normal install
|
|
138
|
+
does not include it.
|
|
139
|
+
|
|
140
|
+
## Recipes
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
sandbox validate sandbox.yml
|
|
144
|
+
sandbox run sandbox.yml
|
|
145
|
+
sandbox config show --resolved
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
A recipe lists commands as argument arrays and can create a virtual
|
|
149
|
+
environment with an interpreter that is already installed. Sandbox does
|
|
150
|
+
not download Python. The environment is not a security boundary.
|
|
151
|
+
`sandbox validate` checks the file before it creates a workspace.
|
|
152
|
+
|
|
153
|
+
## Keep Results
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
sandbox export experiment-1 --include "dist/**" --to ./output/
|
|
157
|
+
sandbox apply experiment-1 --all --dry-run
|
|
158
|
+
sandbox clean --dry-run
|
|
159
|
+
sandbox storage
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Export copies the files you name. Apply writes changes back only when
|
|
163
|
+
the original files still match the snapshot from session creation. A
|
|
164
|
+
file you edited after that is left alone and reported as a conflict.
|
|
165
|
+
Deletes need `--delete`. `sandbox clean` does not remove a session that
|
|
166
|
+
is still running.
|
|
167
|
+
|
|
168
|
+
## Samples
|
|
169
|
+
|
|
170
|
+
The repository has three ready-to-run projects under `samples/`. This is
|
|
171
|
+
the smallest:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
sandbox validate samples/hello/sandbox.yml
|
|
175
|
+
sandbox run samples/hello/sandbox.yml
|
|
176
|
+
sandbox diff hello
|
|
177
|
+
sandbox destroy hello
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
`samples/report` builds a file and checks it. `samples/compare-notes`
|
|
181
|
+
runs one snapshot twice so you can compare the results.
|
|
182
|
+
|
|
183
|
+
## Documentation
|
|
184
|
+
|
|
185
|
+
The guide lives in `mkdocs/` and publishes to
|
|
186
|
+
<https://sandbox.thelupaxaproject.org/>.
|
|
187
|
+
It has install steps, session and recipe usage, a command reference, and
|
|
188
|
+
a walkthrough of each sample with commands you can paste.
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
pip install -r requirements.txt
|
|
192
|
+
mkdocs serve
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
## Development
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
make init
|
|
199
|
+
make python-install-dev
|
|
200
|
+
make python-check
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
<a href="https://github.com/the-lupaxa-project">
|
|
204
|
+
<img src="https://raw.githubusercontent.com/the-lupaxa-project/brand-assets/master/logos/components/footer-for-child-orgs.svg" alt="The Lupaxa Project Footer" width="100%" />
|
|
205
|
+
</a>
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://github.com/lupaxa-developers-toolbox">
|
|
3
|
+
<img src="https://raw.githubusercontent.com/the-lupaxa-project/brand-assets/master/logos/organisations/developers-toolbox/readme-logo.png" alt="Developers Toolbox" />
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<h1 align="center">Sandbox</h1>
|
|
8
|
+
|
|
9
|
+
Sandbox runs commands in a disposable copy of a project and shows what
|
|
10
|
+
those commands changed. The original project stays in place.
|
|
11
|
+
|
|
12
|
+
> **Note:** A workspace is a copied directory, not a security boundary. A
|
|
13
|
+
> command still runs with your user permissions.
|
|
14
|
+
|
|
15
|
+
The PyPI name is `lupaxa-sandbox`. The import path is `lupaxa.sandbox`.
|
|
16
|
+
The console script is `sandbox`. `lupaxa` is a namespace package — there
|
|
17
|
+
is no `lupaxa/__init__.py`.
|
|
18
|
+
|
|
19
|
+
## Install
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pip install lupaxa-sandbox
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Python 3.11 or newer is required.
|
|
26
|
+
|
|
27
|
+
## Run
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
sandbox run -- python -c "open('generated.txt', 'w').write('ok\n')"
|
|
31
|
+
sandbox list
|
|
32
|
+
sandbox diff run-name
|
|
33
|
+
sandbox logs run-name
|
|
34
|
+
sandbox destroy run-name
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
`sandbox run` copies the current directory, runs the command in that copy,
|
|
38
|
+
and prints what was added, changed, or deleted. The copy is kept until
|
|
39
|
+
you destroy the session. Put the command after `--` so Sandbox does not
|
|
40
|
+
treat it as its own options. Add `--shell` only when you want a shell to
|
|
41
|
+
expand the command.
|
|
42
|
+
|
|
43
|
+
`sandbox --help` and `sandbox --version` print usage and the package
|
|
44
|
+
version. `--json` prints a machine-readable report. A normal command
|
|
45
|
+
failure returns that command's exit code. A timeout returns exit code 5.
|
|
46
|
+
|
|
47
|
+
## Isolation
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
sandbox backend list
|
|
51
|
+
sandbox run --backend restricted --network deny -- python -c "open('out.txt', 'w').write('ok')"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The local backend is the default. It runs as you and does not restrict
|
|
55
|
+
files, the network, or processes. `restricted`, `docker`, and `podman`
|
|
56
|
+
are used only when a probe says they work. A limit the selected backend
|
|
57
|
+
cannot enforce is refused. Sandbox does not switch to a weaker backend,
|
|
58
|
+
and it does not pull container images.
|
|
59
|
+
|
|
60
|
+
## Compare
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
sandbox compare sandbox.yml --python-a python3.11 --python-b python3.12
|
|
64
|
+
sandbox tui
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
`sandbox compare` stages the project once and runs that same snapshot in
|
|
68
|
+
two sessions. The report lists exit codes, output, and files that
|
|
69
|
+
differ. A difference is an observation. It does not mean the commands
|
|
70
|
+
are incompatible. `sandbox tui` browses sessions, diffs, and export.
|
|
71
|
+
Install it with `pip install "lupaxa-sandbox[tui]"`. A normal install
|
|
72
|
+
does not include it.
|
|
73
|
+
|
|
74
|
+
## Recipes
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
sandbox validate sandbox.yml
|
|
78
|
+
sandbox run sandbox.yml
|
|
79
|
+
sandbox config show --resolved
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
A recipe lists commands as argument arrays and can create a virtual
|
|
83
|
+
environment with an interpreter that is already installed. Sandbox does
|
|
84
|
+
not download Python. The environment is not a security boundary.
|
|
85
|
+
`sandbox validate` checks the file before it creates a workspace.
|
|
86
|
+
|
|
87
|
+
## Keep Results
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
sandbox export experiment-1 --include "dist/**" --to ./output/
|
|
91
|
+
sandbox apply experiment-1 --all --dry-run
|
|
92
|
+
sandbox clean --dry-run
|
|
93
|
+
sandbox storage
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Export copies the files you name. Apply writes changes back only when
|
|
97
|
+
the original files still match the snapshot from session creation. A
|
|
98
|
+
file you edited after that is left alone and reported as a conflict.
|
|
99
|
+
Deletes need `--delete`. `sandbox clean` does not remove a session that
|
|
100
|
+
is still running.
|
|
101
|
+
|
|
102
|
+
## Samples
|
|
103
|
+
|
|
104
|
+
The repository has three ready-to-run projects under `samples/`. This is
|
|
105
|
+
the smallest:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
sandbox validate samples/hello/sandbox.yml
|
|
109
|
+
sandbox run samples/hello/sandbox.yml
|
|
110
|
+
sandbox diff hello
|
|
111
|
+
sandbox destroy hello
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
`samples/report` builds a file and checks it. `samples/compare-notes`
|
|
115
|
+
runs one snapshot twice so you can compare the results.
|
|
116
|
+
|
|
117
|
+
## Documentation
|
|
118
|
+
|
|
119
|
+
The guide lives in `mkdocs/` and publishes to
|
|
120
|
+
<https://sandbox.thelupaxaproject.org/>.
|
|
121
|
+
It has install steps, session and recipe usage, a command reference, and
|
|
122
|
+
a walkthrough of each sample with commands you can paste.
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
pip install -r requirements.txt
|
|
126
|
+
mkdocs serve
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Development
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
make init
|
|
133
|
+
make python-install-dev
|
|
134
|
+
make python-check
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
<a href="https://github.com/the-lupaxa-project">
|
|
138
|
+
<img src="https://raw.githubusercontent.com/the-lupaxa-project/brand-assets/master/logos/components/footer-for-child-orgs.svg" alt="The Lupaxa Project Footer" width="100%" />
|
|
139
|
+
</a>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://github.com/lupaxa-developers-toolbox">
|
|
3
|
+
<img src="https://raw.githubusercontent.com/the-lupaxa-project/brand-assets/master/logos/organisations/developers-toolbox/readme-logo.png" alt="Organisation Logo" />
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<h1 align="center">Core Documentation</h1>
|
|
8
|
+
|
|
9
|
+
The following documents define the standards that apply across **The Lupaxa Project**:
|
|
10
|
+
|
|
11
|
+
| Document | Purpose |
|
|
12
|
+
| :------------------------------------ | :---------------------------------------------------------------- |
|
|
13
|
+
| [Code of Conduct](CODE_OF_CONDUCT.md) | Expected behaviour and reporting procedures. |
|
|
14
|
+
| [How to Contribute](CONTRIBUTING.md) | Development workflow, coding standards, and contribution process. |
|
|
15
|
+
| [Governance](GOVERNANCE.md) | Project governance, roles, and decision-making. |
|
|
16
|
+
| [Maintainers](MAINTAINERS.md) | Maintainer responsibilities and expectations. |
|
|
17
|
+
| [Projects Overview](PROJECTS.md) | Overview of organisations, repositories, and project structure. |
|
|
18
|
+
| [Security Policy](SECURITY.md) | Responsible disclosure and secure development practices. |
|
|
19
|
+
| [Support Guide](SUPPORT.md) | How to obtain help and support. |
|
|
20
|
+
|
|
21
|
+
<a href="https://github.com/the-lupaxa-project">
|
|
22
|
+
<img src="https://raw.githubusercontent.com/the-lupaxa-project/brand-assets/master/logos/components/footer-for-child-orgs.svg" alt="The Lupaxa Project Footer" width="100%" />
|
|
23
|
+
</a>
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling>=1.18"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "lupaxa-sandbox"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "Run commands in disposable workspaces and inspect what they change."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = { file = "LICENCE" }
|
|
11
|
+
requires-python = ">=3.11"
|
|
12
|
+
|
|
13
|
+
authors = [
|
|
14
|
+
{ name = "The Lupaxa Project" }
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
keywords = ["sandbox", "workspace", "cli", "filesystem"]
|
|
18
|
+
|
|
19
|
+
dependencies = [
|
|
20
|
+
"pathspec>=0.12",
|
|
21
|
+
"platformdirs>=4",
|
|
22
|
+
"pydantic>=2",
|
|
23
|
+
"PyYAML>=6",
|
|
24
|
+
"rich>=13",
|
|
25
|
+
"typer>=0.12",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
classifiers = [
|
|
29
|
+
"Development Status :: 3 - Alpha",
|
|
30
|
+
"Environment :: Console",
|
|
31
|
+
"Intended Audience :: Developers",
|
|
32
|
+
"License :: OSI Approved :: MIT License",
|
|
33
|
+
"Operating System :: OS Independent",
|
|
34
|
+
"Programming Language :: Python :: 3",
|
|
35
|
+
"Programming Language :: Python :: 3.11",
|
|
36
|
+
"Programming Language :: Python :: 3.12",
|
|
37
|
+
"Programming Language :: Python :: 3.13",
|
|
38
|
+
"Programming Language :: Python :: 3.14",
|
|
39
|
+
"Topic :: Software Development",
|
|
40
|
+
"Topic :: Utilities",
|
|
41
|
+
]
|
|
42
|
+
|
|
43
|
+
[project.urls]
|
|
44
|
+
Homepage = "https://github.com/lupaxa-developers-toolbox/sandbox"
|
|
45
|
+
Documentation = "https://sandbox.thelupaxaproject.org/"
|
|
46
|
+
Repository = "https://github.com/lupaxa-developers-toolbox/sandbox"
|
|
47
|
+
Issues = "https://github.com/lupaxa-developers-toolbox/sandbox/issues"
|
|
48
|
+
|
|
49
|
+
[project.scripts]
|
|
50
|
+
sandbox = "lupaxa.sandbox.cli:main"
|
|
51
|
+
|
|
52
|
+
[project.optional-dependencies]
|
|
53
|
+
tui = [
|
|
54
|
+
"textual>=1.0",
|
|
55
|
+
]
|
|
56
|
+
dev = [
|
|
57
|
+
"pytest>=8.0",
|
|
58
|
+
"pytest-cov>=5.0",
|
|
59
|
+
"ruff>=0.6.0",
|
|
60
|
+
"mypy>=1.12.0",
|
|
61
|
+
"hatch>=1.12.0",
|
|
62
|
+
"bump-my-version>=1.2.0",
|
|
63
|
+
"textual>=1.0",
|
|
64
|
+
]
|
|
65
|
+
test = [
|
|
66
|
+
"pytest>=8.0",
|
|
67
|
+
"pytest-cov>=5.0",
|
|
68
|
+
]
|
|
69
|
+
|
|
70
|
+
[tool.hatch.version]
|
|
71
|
+
path = "src/lupaxa/sandbox/version.py"
|
|
72
|
+
|
|
73
|
+
[tool.hatch.build.targets.sdist]
|
|
74
|
+
include = [
|
|
75
|
+
"src/**",
|
|
76
|
+
"README.md",
|
|
77
|
+
"LICENCE",
|
|
78
|
+
]
|
|
79
|
+
|
|
80
|
+
[tool.hatch.build.targets.wheel]
|
|
81
|
+
packages = ["src/lupaxa"]
|
|
82
|
+
|
|
83
|
+
[tool.ruff]
|
|
84
|
+
line-length = 100
|
|
85
|
+
target-version = "py311"
|
|
86
|
+
|
|
87
|
+
[tool.ruff.lint]
|
|
88
|
+
select = ["E", "F", "I", "B", "UP", "SIM"]
|
|
89
|
+
|
|
90
|
+
[tool.ruff.lint.isort]
|
|
91
|
+
known-first-party = ["lupaxa"]
|
|
92
|
+
|
|
93
|
+
[tool.ruff.format]
|
|
94
|
+
quote-style = "double"
|
|
95
|
+
|
|
96
|
+
[tool.mypy]
|
|
97
|
+
python_version = "3.11"
|
|
98
|
+
files = ["src", "tests"]
|
|
99
|
+
mypy_path = "src"
|
|
100
|
+
explicit_package_bases = true
|
|
101
|
+
namespace_packages = true
|
|
102
|
+
warn_unused_configs = true
|
|
103
|
+
ignore_missing_imports = true
|
|
104
|
+
|
|
105
|
+
[tool.pytest.ini_options]
|
|
106
|
+
addopts = "-ra -q --disable-warnings"
|
|
107
|
+
testpaths = ["tests"]
|
|
108
|
+
pythonpath = ["src"]
|