sentry-devenv 1.25.0__tar.gz → 1.26.1__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 (87) hide show
  1. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/PKG-INFO +27 -107
  2. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/README.md +26 -106
  3. sentry_devenv-1.26.1/devenv/checks/diskfree.py +38 -0
  4. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/doctor.py +2 -1
  5. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/lib/colima.py +16 -9
  6. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/pyproject.toml +1 -1
  7. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/sentry_devenv.egg-info/PKG-INFO +27 -107
  8. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/sentry_devenv.egg-info/SOURCES.txt +1 -1
  9. sentry_devenv-1.25.0/devenv/checks/test.py +0 -36
  10. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/ci/integration/repo/devenv/sync.py +0 -0
  11. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/__init__.py +0 -0
  12. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/__main__.py +0 -0
  13. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/bootstrap.py +0 -0
  14. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/checks/__init__.py +0 -0
  15. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/checks/colimaSsh.py +0 -0
  16. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/checks/dockerConfig.py +0 -0
  17. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/checks/dockerDesktop.py +0 -0
  18. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/checks/limaDns.py +0 -0
  19. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/colima.py +0 -0
  20. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/constants.py +0 -0
  21. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/fetch.py +0 -0
  22. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/lib/__init__.py +0 -0
  23. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/lib/archive.py +0 -0
  24. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/lib/brew.py +0 -0
  25. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/lib/config.py +0 -0
  26. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/lib/context.py +0 -0
  27. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/lib/direnv.py +0 -0
  28. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/lib/docker.py +0 -0
  29. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/lib/fs.py +0 -0
  30. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/lib/gcloud.py +0 -0
  31. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/lib/github.py +0 -0
  32. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/lib/limactl.py +0 -0
  33. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/lib/modules.py +0 -0
  34. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/lib/node.py +0 -0
  35. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/lib/proc.py +0 -0
  36. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/lib/repository.py +0 -0
  37. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/lib/rosetta.py +0 -0
  38. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/lib/tenv.py +0 -0
  39. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/lib/uv.py +0 -0
  40. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/lib/venv.py +0 -0
  41. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/lib_check/__init__.py +0 -0
  42. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/lib_check/brew.py +0 -0
  43. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/lib_check/types.py +0 -0
  44. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/main.py +0 -0
  45. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/pin_gha.py +0 -0
  46. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/py.typed +0 -0
  47. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/pythons.py +0 -0
  48. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/sync.py +0 -0
  49. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/devenv/update.py +0 -0
  50. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/sentry_devenv.egg-info/dependency_links.txt +0 -0
  51. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/sentry_devenv.egg-info/entry_points.txt +0 -0
  52. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/sentry_devenv.egg-info/requires.txt +0 -0
  53. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/sentry_devenv.egg-info/top_level.txt +0 -0
  54. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/setup.cfg +0 -0
  55. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/tests/__init__.py +0 -0
  56. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/tests/checks/__init__.py +0 -0
  57. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/tests/checks/test_dockerConfig.py +0 -0
  58. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/tests/conftest.py +0 -0
  59. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/tests/doctor/__init__.py +0 -0
  60. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/tests/doctor/devenv/checks/bad_check.py +0 -0
  61. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/tests/doctor/devenv/checks/bad_fix.py +0 -0
  62. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/tests/doctor/devenv/checks/broken_check.py +0 -0
  63. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/tests/doctor/devenv/checks/broken_fix.py +0 -0
  64. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/tests/doctor/devenv/checks/failing_check.py +0 -0
  65. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/tests/doctor/devenv/checks/failing_check_with_msg.py +0 -0
  66. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/tests/doctor/devenv/checks/no_check.py +0 -0
  67. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/tests/doctor/devenv/checks/no_name.py +0 -0
  68. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/tests/doctor/devenv/checks/no_tags.py +0 -0
  69. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/tests/doctor/devenv/checks/passing_check.py +0 -0
  70. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/tests/doctor/test_attempt_fix.py +0 -0
  71. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/tests/doctor/test_filter_failing_checks.py +0 -0
  72. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/tests/doctor/test_load_checks.py +0 -0
  73. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/tests/doctor/test_prompt_for_fix.py +0 -0
  74. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/tests/doctor/test_run_checks.py +0 -0
  75. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/tests/lib/test_archive.py +0 -0
  76. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/tests/lib/test_brew.py +0 -0
  77. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/tests/lib/test_direnv.py +0 -0
  78. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/tests/lib/test_fs.py +0 -0
  79. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/tests/lib/test_github.py +0 -0
  80. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/tests/lib/test_node.py +0 -0
  81. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/tests/lib/test_proc.py +0 -0
  82. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/tests/lib/test_repository.py +0 -0
  83. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/tests/lib/test_venv.py +0 -0
  84. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/tests/test_main.py +0 -0
  85. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/tests/test_pythons.py +0 -0
  86. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/tests/test_sync.py +0 -0
  87. {sentry_devenv-1.25.0 → sentry_devenv-1.26.1}/tests/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sentry_devenv
3
- Version: 1.25.0
3
+ Version: 1.26.1
4
4
  Summary: Utilities for setting up a Sentry development environment
5
5
  Author-email: Joshua Li <joshua.li@sentry.io>, Ian Woodard <ian.woodard@sentry.io>, Buck Evan <buck.evan@sentry.io>
6
6
  Classifier: Programming Language :: Python :: 3
@@ -84,6 +84,10 @@ This updates the global devenv installation, and global tools.
84
84
  If you're upgrading from a particularly old devenv, it won't have `update` so you need to:
85
85
  `~/.local/share/sentry-devenv/venv/bin/pip install -U sentry-devenv`
86
86
 
87
+ `devenv colima start`
88
+
89
+ If you are using colima instead of docker desktop, run this to set up colima on a new machine. The default `colima start` may underprovision resources. Run this command after `colima delete` to reset.
90
+
87
91
 
88
92
  ## technical overview
89
93
 
@@ -119,7 +123,7 @@ coderoot = ~/code
119
123
  ```ini
120
124
  [devenv]
121
125
  # optionally require a minimum version to run sync.py
122
- minimum_version = 1.11.0
126
+ minimum_version = 1.22.1
123
127
  ```
124
128
 
125
129
  There are plenty more sections, their use is best seen in the [examples](#examples).
@@ -157,7 +161,11 @@ PATH_add "${PWD}/.devenv/bin"
157
161
 
158
162
  ### python
159
163
 
160
- Need a single virtualenv (or have one already at `.venv` you want devenv to manage?)
164
+ We have support for, and we standardize on [uv](https://github.com/astral-sh/uv)
165
+ to manage python environments.
166
+
167
+ More details (beyond a bare minimum example which is detailed here) about the standard is
168
+ [here](https://www.notion.so/sentry/Standard-Spec-python-uv-2248b10e4b5d8045b8fff30f8b8b67ca).
161
169
 
162
170
  `[reporoot]/.envrc`
163
171
  ```bash
@@ -166,11 +174,10 @@ export VIRTUAL_ENV="${PWD}/.venv"
166
174
  PATH_add "${PWD}/.venv/bin"
167
175
  ```
168
176
 
169
- if using uv:
170
-
171
177
  `[reporoot]/devenv/sync.py`
172
178
  ```py
173
- from devenv.lib import config, uv
179
+ from devenv import constants
180
+ from devenv.lib import config, proc, uv
174
181
 
175
182
  def main(context: dict[str, str]) -> int:
176
183
  reporoot = context["reporoot"]
@@ -190,22 +197,27 @@ def main(context: dict[str, str]) -> int:
190
197
  return 0
191
198
  ```
192
199
 
200
+ We pin the uv version to avoid any surprises.
201
+ (As opposed to a solution like `brew`, which always puts you on latest software.)
202
+ If you want to update the version then you'll have to update these urls and checksums.
203
+
193
204
  `[reporoot]/devenv/config.ini`
194
205
  ```ini
195
206
  [devenv]
196
207
  minimum_version = 1.22.1
197
208
 
198
209
  [uv]
199
- darwin_arm64 = https://github.com/astral-sh/uv/releases/download/0.7.21/uv-aarch64-apple-darwin.tar.gz
200
- darwin_arm64_sha256 = c73af7a4e0bcea9b5b593a0c7e5c025ee78d8be3f7cd60bfeadc8614a16c92ef
201
- darwin_x86_64 = https://github.com/astral-sh/uv/releases/download/0.7.21/uv-x86_64-apple-darwin.tar.gz
202
- darwin_x86_64_sha256 = f8a9b4f4a80a44653344d36b53e148134176e8f7cc99f8e823676a57c884595e
203
- linux_arm64 = https://github.com/astral-sh/uv/releases/download/0.7.21/uv-aarch64-unknown-linux-gnu.tar.gz
204
- linux_arm64_sha256 = 1dae18211605b9d00767d913da5108aea50200a88372bf8a2e1f56abdbe509f0
205
- linux_x86_64 = https://github.com/astral-sh/uv/releases/download/0.7.21/uv-x86_64-unknown-linux-gnu.tar.gz
206
- linux_x86_64_sha256 = ca3e8898adfce5fcc891d393a079013fa4bd0d9636cef11aded8a7485bcba312
210
+ darwin_arm64 = https://github.com/astral-sh/uv/releases/download/0.8.2/uv-aarch64-apple-darwin.tar.gz
211
+ darwin_arm64_sha256 = 954d24634d5f37fa26c7af75eb79893d11623fc81b4de4b82d60d1ade4bfca22
212
+ darwin_x86_64 = https://github.com/astral-sh/uv/releases/download/0.8.2/uv-x86_64-apple-darwin.tar.gz
213
+ darwin_x86_64_sha256 = ae755df53c8c2c1f3dfbee6e3d2e00be0dfbc9c9b4bdffdb040b96f43678b7ce
214
+ linux_arm64 = https://github.com/astral-sh/uv/releases/download/0.8.2/uv-aarch64-unknown-linux-gnu.tar.gz
215
+ linux_arm64_sha256 = 27da35ef54e9131c2e305de67dd59a07c19257882c6b1f3cf4d8d5fbb8eaf4ca
216
+ linux_x86_64 = https://github.com/astral-sh/uv/releases/download/0.8.2/uv-x86_64-unknown-linux-gnu.tar.gz
217
+ linux_x86_64_sha256 = 6dcb28a541868a455aefb2e8d4a1283dd6bf888605a2db710f0530cec888b0ad
207
218
  # used for autoupdate
208
- version = 0.7.21
219
+ # NOTE: if using uv-build as a build backend, you'll have to make sure the versions match
220
+ version = 0.8.2
209
221
  ```
210
222
 
211
223
  `[reporoot]/.python-version`
@@ -220,98 +232,6 @@ name = "foo"
220
232
  version = "0.0.0"
221
233
  ```
222
234
 
223
- or classic pip:
224
-
225
- `[reporoot]/devenv/sync.py`
226
- ```py
227
- from devenv.lib import config, venv
228
-
229
- def main(context: dict[str, str]) -> int:
230
- reporoot = context["reporoot"]
231
-
232
- venv_dir, python_version, requirements, editable_paths, bins = venv.get(reporoot, "venv")
233
- url, sha256 = config.get_python(reporoot, python_version)
234
- print(f"ensuring venv at {venv_dir}...")
235
- venv.ensure(venv_dir, python_version, url, sha256)
236
-
237
- print(f"syncing venv with {requirements}...")
238
- venv.sync(reporoot, venv_dir, requirements, editable_paths, bins)
239
-
240
- return 0
241
- ```
242
-
243
- `[reporoot]/devenv/config.ini`
244
- ```ini
245
- [venv.venv]
246
- python = 3.12.3
247
- path = .venv
248
- requirements = requirements-dev.txt
249
- editable =
250
- .
251
-
252
- [python3.12.3]
253
- darwin_x86_64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-apple-darwin-install_only.tar.gz
254
- darwin_x86_64_sha256 = c37a22fca8f57d4471e3708de6d13097668c5f160067f264bb2b18f524c890c8
255
- darwin_arm64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-apple-darwin-install_only.tar.gz
256
- darwin_arm64_sha256 = ccc40e5af329ef2af81350db2a88bbd6c17b56676e82d62048c15d548401519e
257
- linux_x86_64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-unknown-linux-gnu-install_only.tar.gz
258
- linux_x86_64_sha256 = a73ba777b5d55ca89edef709e6b8521e3f3d4289581f174c8699adfb608d09d6
259
- linux_arm64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-unknown-linux-gnu-install_only.tar.gz
260
- linux_arm64_sha256 = ec8126de97945e629cca9aedc80a29c4ae2992c9d69f2655e27ae73906ba187d
261
- ```
262
-
263
- You can also have multiple virtualenvs, which is useful if you rely on a python tool
264
- that has a bunch of dependencies that may conflict with others.
265
-
266
- `[reporoot]/.envrc`
267
- ```bash
268
- export VIRTUAL_ENV="${PWD}/.exampleproject"
269
-
270
- PATH_add "${PWD}/.venv-exampleproject/bin"
271
- PATH_add "${PWD}/.venv-inhouse-tool/bin"
272
- ```
273
-
274
- `[reporoot]/devenv/sync.py`
275
- ```py
276
- from devenv.lib import config, venv
277
-
278
- def main(context: dict[str, str]) -> int:
279
- reporoot = context["reporoot"]
280
-
281
- for name in ("exampleproject", "inhouse-tool"):
282
- venv_dir, python_version, requirements, editable_paths, bins = venv.get(reporoot, name)
283
- url, sha256 = config.get_python(reporoot, python_version)
284
- print(f"ensuring {name} venv at {venv_dir}...")
285
- venv.ensure(venv_dir, python_version, url, sha256)
286
-
287
- print(f"syncing {name} with {requirements}...")
288
- venv.sync(reporoot, venv_dir, requirements, editable_paths, bins)
289
-
290
- return 0
291
- ```
292
-
293
- `[reporoot]/devenv/config.ini`
294
- ```ini
295
- [venv.exampleproject]
296
- python = 3.12.3
297
- requirements = requirements-dev.txt
298
- editable =
299
- .
300
-
301
- [venv.inhouse-tool]
302
- python = 3.12.3
303
- requirements = inhouse-tool/requirements-dev.txt
304
-
305
- [python3.12.3]
306
- darwin_x86_64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-apple-darwin-install_only.tar.gz
307
- darwin_x86_64_sha256 = c37a22fca8f57d4471e3708de6d13097668c5f160067f264bb2b18f524c890c8
308
- darwin_arm64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-apple-darwin-install_only.tar.gz
309
- darwin_arm64_sha256 = ccc40e5af329ef2af81350db2a88bbd6c17b56676e82d62048c15d548401519e
310
- linux_x86_64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-unknown-linux-gnu-install_only.tar.gz
311
- linux_x86_64_sha256 = a73ba777b5d55ca89edef709e6b8521e3f3d4289581f174c8699adfb608d09d6
312
- linux_arm64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-unknown-linux-gnu-install_only.tar.gz
313
- linux_arm64_sha256 = ec8126de97945e629cca9aedc80a29c4ae2992c9d69f2655e27ae73906ba187d
314
- ```
315
235
 
316
236
  ### node
317
237
 
@@ -71,6 +71,10 @@ This updates the global devenv installation, and global tools.
71
71
  If you're upgrading from a particularly old devenv, it won't have `update` so you need to:
72
72
  `~/.local/share/sentry-devenv/venv/bin/pip install -U sentry-devenv`
73
73
 
74
+ `devenv colima start`
75
+
76
+ If you are using colima instead of docker desktop, run this to set up colima on a new machine. The default `colima start` may underprovision resources. Run this command after `colima delete` to reset.
77
+
74
78
 
75
79
  ## technical overview
76
80
 
@@ -106,7 +110,7 @@ coderoot = ~/code
106
110
  ```ini
107
111
  [devenv]
108
112
  # optionally require a minimum version to run sync.py
109
- minimum_version = 1.11.0
113
+ minimum_version = 1.22.1
110
114
  ```
111
115
 
112
116
  There are plenty more sections, their use is best seen in the [examples](#examples).
@@ -144,7 +148,11 @@ PATH_add "${PWD}/.devenv/bin"
144
148
 
145
149
  ### python
146
150
 
147
- Need a single virtualenv (or have one already at `.venv` you want devenv to manage?)
151
+ We have support for, and we standardize on [uv](https://github.com/astral-sh/uv)
152
+ to manage python environments.
153
+
154
+ More details (beyond a bare minimum example which is detailed here) about the standard is
155
+ [here](https://www.notion.so/sentry/Standard-Spec-python-uv-2248b10e4b5d8045b8fff30f8b8b67ca).
148
156
 
149
157
  `[reporoot]/.envrc`
150
158
  ```bash
@@ -153,11 +161,10 @@ export VIRTUAL_ENV="${PWD}/.venv"
153
161
  PATH_add "${PWD}/.venv/bin"
154
162
  ```
155
163
 
156
- if using uv:
157
-
158
164
  `[reporoot]/devenv/sync.py`
159
165
  ```py
160
- from devenv.lib import config, uv
166
+ from devenv import constants
167
+ from devenv.lib import config, proc, uv
161
168
 
162
169
  def main(context: dict[str, str]) -> int:
163
170
  reporoot = context["reporoot"]
@@ -177,22 +184,27 @@ def main(context: dict[str, str]) -> int:
177
184
  return 0
178
185
  ```
179
186
 
187
+ We pin the uv version to avoid any surprises.
188
+ (As opposed to a solution like `brew`, which always puts you on latest software.)
189
+ If you want to update the version then you'll have to update these urls and checksums.
190
+
180
191
  `[reporoot]/devenv/config.ini`
181
192
  ```ini
182
193
  [devenv]
183
194
  minimum_version = 1.22.1
184
195
 
185
196
  [uv]
186
- darwin_arm64 = https://github.com/astral-sh/uv/releases/download/0.7.21/uv-aarch64-apple-darwin.tar.gz
187
- darwin_arm64_sha256 = c73af7a4e0bcea9b5b593a0c7e5c025ee78d8be3f7cd60bfeadc8614a16c92ef
188
- darwin_x86_64 = https://github.com/astral-sh/uv/releases/download/0.7.21/uv-x86_64-apple-darwin.tar.gz
189
- darwin_x86_64_sha256 = f8a9b4f4a80a44653344d36b53e148134176e8f7cc99f8e823676a57c884595e
190
- linux_arm64 = https://github.com/astral-sh/uv/releases/download/0.7.21/uv-aarch64-unknown-linux-gnu.tar.gz
191
- linux_arm64_sha256 = 1dae18211605b9d00767d913da5108aea50200a88372bf8a2e1f56abdbe509f0
192
- linux_x86_64 = https://github.com/astral-sh/uv/releases/download/0.7.21/uv-x86_64-unknown-linux-gnu.tar.gz
193
- linux_x86_64_sha256 = ca3e8898adfce5fcc891d393a079013fa4bd0d9636cef11aded8a7485bcba312
197
+ darwin_arm64 = https://github.com/astral-sh/uv/releases/download/0.8.2/uv-aarch64-apple-darwin.tar.gz
198
+ darwin_arm64_sha256 = 954d24634d5f37fa26c7af75eb79893d11623fc81b4de4b82d60d1ade4bfca22
199
+ darwin_x86_64 = https://github.com/astral-sh/uv/releases/download/0.8.2/uv-x86_64-apple-darwin.tar.gz
200
+ darwin_x86_64_sha256 = ae755df53c8c2c1f3dfbee6e3d2e00be0dfbc9c9b4bdffdb040b96f43678b7ce
201
+ linux_arm64 = https://github.com/astral-sh/uv/releases/download/0.8.2/uv-aarch64-unknown-linux-gnu.tar.gz
202
+ linux_arm64_sha256 = 27da35ef54e9131c2e305de67dd59a07c19257882c6b1f3cf4d8d5fbb8eaf4ca
203
+ linux_x86_64 = https://github.com/astral-sh/uv/releases/download/0.8.2/uv-x86_64-unknown-linux-gnu.tar.gz
204
+ linux_x86_64_sha256 = 6dcb28a541868a455aefb2e8d4a1283dd6bf888605a2db710f0530cec888b0ad
194
205
  # used for autoupdate
195
- version = 0.7.21
206
+ # NOTE: if using uv-build as a build backend, you'll have to make sure the versions match
207
+ version = 0.8.2
196
208
  ```
197
209
 
198
210
  `[reporoot]/.python-version`
@@ -207,98 +219,6 @@ name = "foo"
207
219
  version = "0.0.0"
208
220
  ```
209
221
 
210
- or classic pip:
211
-
212
- `[reporoot]/devenv/sync.py`
213
- ```py
214
- from devenv.lib import config, venv
215
-
216
- def main(context: dict[str, str]) -> int:
217
- reporoot = context["reporoot"]
218
-
219
- venv_dir, python_version, requirements, editable_paths, bins = venv.get(reporoot, "venv")
220
- url, sha256 = config.get_python(reporoot, python_version)
221
- print(f"ensuring venv at {venv_dir}...")
222
- venv.ensure(venv_dir, python_version, url, sha256)
223
-
224
- print(f"syncing venv with {requirements}...")
225
- venv.sync(reporoot, venv_dir, requirements, editable_paths, bins)
226
-
227
- return 0
228
- ```
229
-
230
- `[reporoot]/devenv/config.ini`
231
- ```ini
232
- [venv.venv]
233
- python = 3.12.3
234
- path = .venv
235
- requirements = requirements-dev.txt
236
- editable =
237
- .
238
-
239
- [python3.12.3]
240
- darwin_x86_64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-apple-darwin-install_only.tar.gz
241
- darwin_x86_64_sha256 = c37a22fca8f57d4471e3708de6d13097668c5f160067f264bb2b18f524c890c8
242
- darwin_arm64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-apple-darwin-install_only.tar.gz
243
- darwin_arm64_sha256 = ccc40e5af329ef2af81350db2a88bbd6c17b56676e82d62048c15d548401519e
244
- linux_x86_64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-unknown-linux-gnu-install_only.tar.gz
245
- linux_x86_64_sha256 = a73ba777b5d55ca89edef709e6b8521e3f3d4289581f174c8699adfb608d09d6
246
- linux_arm64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-unknown-linux-gnu-install_only.tar.gz
247
- linux_arm64_sha256 = ec8126de97945e629cca9aedc80a29c4ae2992c9d69f2655e27ae73906ba187d
248
- ```
249
-
250
- You can also have multiple virtualenvs, which is useful if you rely on a python tool
251
- that has a bunch of dependencies that may conflict with others.
252
-
253
- `[reporoot]/.envrc`
254
- ```bash
255
- export VIRTUAL_ENV="${PWD}/.exampleproject"
256
-
257
- PATH_add "${PWD}/.venv-exampleproject/bin"
258
- PATH_add "${PWD}/.venv-inhouse-tool/bin"
259
- ```
260
-
261
- `[reporoot]/devenv/sync.py`
262
- ```py
263
- from devenv.lib import config, venv
264
-
265
- def main(context: dict[str, str]) -> int:
266
- reporoot = context["reporoot"]
267
-
268
- for name in ("exampleproject", "inhouse-tool"):
269
- venv_dir, python_version, requirements, editable_paths, bins = venv.get(reporoot, name)
270
- url, sha256 = config.get_python(reporoot, python_version)
271
- print(f"ensuring {name} venv at {venv_dir}...")
272
- venv.ensure(venv_dir, python_version, url, sha256)
273
-
274
- print(f"syncing {name} with {requirements}...")
275
- venv.sync(reporoot, venv_dir, requirements, editable_paths, bins)
276
-
277
- return 0
278
- ```
279
-
280
- `[reporoot]/devenv/config.ini`
281
- ```ini
282
- [venv.exampleproject]
283
- python = 3.12.3
284
- requirements = requirements-dev.txt
285
- editable =
286
- .
287
-
288
- [venv.inhouse-tool]
289
- python = 3.12.3
290
- requirements = inhouse-tool/requirements-dev.txt
291
-
292
- [python3.12.3]
293
- darwin_x86_64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-apple-darwin-install_only.tar.gz
294
- darwin_x86_64_sha256 = c37a22fca8f57d4471e3708de6d13097668c5f160067f264bb2b18f524c890c8
295
- darwin_arm64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-apple-darwin-install_only.tar.gz
296
- darwin_arm64_sha256 = ccc40e5af329ef2af81350db2a88bbd6c17b56676e82d62048c15d548401519e
297
- linux_x86_64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-unknown-linux-gnu-install_only.tar.gz
298
- linux_x86_64_sha256 = a73ba777b5d55ca89edef709e6b8521e3f3d4289581f174c8699adfb608d09d6
299
- linux_arm64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-unknown-linux-gnu-install_only.tar.gz
300
- linux_arm64_sha256 = ec8126de97945e629cca9aedc80a29c4ae2992c9d69f2655e27ae73906ba187d
301
- ```
302
222
 
303
223
  ### node
304
224
 
@@ -0,0 +1,38 @@
1
+ from __future__ import annotations
2
+
3
+ import shutil
4
+
5
+ from devenv.lib_check.types import checker
6
+ from devenv.lib_check.types import fixer
7
+
8
+ tags: set[str] = {"builtin"}
9
+ name = "there should be sufficient host disk space"
10
+
11
+
12
+ @checker
13
+ def check() -> tuple[bool, str]:
14
+ disk_total, disk_used, disk_free = shutil.disk_usage("/")
15
+ disk_gib_free = disk_free / (1024**3)
16
+
17
+ if disk_gib_free < 10:
18
+ return (
19
+ False,
20
+ f"You have less than 10 GiB disk free ({disk_gib_free} GiB free). "
21
+ "You might start to encounter various problems when using colima.",
22
+ )
23
+
24
+ return True, ""
25
+
26
+
27
+ @fixer
28
+ def fix() -> tuple[bool, str]:
29
+ return (
30
+ False,
31
+ """
32
+
33
+ We can't autofix this, only you can clean up your own disk.
34
+
35
+ You might want to try cleaning up unused Docker resources:
36
+ docker system prune -a
37
+ """,
38
+ )
@@ -245,7 +245,8 @@ def main(context: Context, argv: Sequence[str] | None = None) -> int:
245
245
  skip.append(check)
246
246
 
247
247
  print("\nChecking that fixes worked as expected...")
248
- results = run_checks(failing_checks, executor, skip=skip)
248
+ # re-run all checks since fixing one issue can cause another to fail
249
+ results = run_checks(checks, executor, skip=skip)
249
250
 
250
251
  executor.shutdown()
251
252
 
@@ -142,17 +142,23 @@ def check() -> ColimaStatus:
142
142
 
143
143
 
144
144
  def start(restart: bool = False) -> ColimaStatus:
145
+ # switch to default context to avoid broken contexts (e.g., desktop-linux)
146
+ try:
147
+ proc.run(("docker", "context", "use", "default"))
148
+ except RuntimeError as e:
149
+ print(f"Failed to switch docker context: {e}")
150
+
145
151
  status = check()
146
152
 
147
153
  if status == ColimaStatus.UP:
148
154
  if not restart:
149
155
  return ColimaStatus.UP
150
- proc.run(("colima", "stop"), pathprepend=f"{root}/bin")
151
- elif status == ColimaStatus.DOWN:
152
- pass
153
- elif status == ColimaStatus.UNHEALTHY:
154
- print("colima seems to be unhealthy, stopping it")
155
- proc.run(("colima", "stop"), pathprepend=f"{root}/bin")
156
+
157
+ # always stop first (colima's internal state can get out of sync)
158
+ try:
159
+ proc.run(("colima", "stop", "-f"), pathprepend=f"{root}/bin")
160
+ except RuntimeError as e:
161
+ print(f"Failed to stop colima: {e}")
156
162
 
157
163
  # colima start will only WARN if rosetta is unavailable and keep going without it,
158
164
  # so we need to ensure it's installed and running ourselves
@@ -174,15 +180,16 @@ def start(restart: bool = False) -> ColimaStatus:
174
180
  if platform.machine() == "arm64":
175
181
  args = [*args, "--vm-type=vz", "--vz-rosetta", "--mount-type=virtiofs"]
176
182
 
177
- # removing all docker contexts to ensure only colima context is created
178
- shutil.rmtree(f"{home}/.docker/contexts", ignore_errors=True)
179
-
180
183
  proc.run(
181
184
  (
182
185
  # we share the "default" machine across repositories
183
186
  "colima",
184
187
  "start",
185
188
  "--verbose",
189
+ # we're overprovisioning a 512 GiB disk here which is fine because
190
+ # the disk doesn't reserve space and is copy-on-write
191
+ "--disk",
192
+ "512",
186
193
  # this effectively makes the vm's resolvectl status use:
187
194
  # DNS Servers: 8.8.8.8 1.1.1.1 192.168.5.2
188
195
  # https://lima-vm.io/docs/config/network/user/
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "sentry_devenv"
7
- version = "1.25.0"
7
+ version = "1.26.1"
8
8
  authors = [
9
9
  { name="Joshua Li", email="joshua.li@sentry.io" },
10
10
  { name="Ian Woodard", email="ian.woodard@sentry.io" },
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sentry_devenv
3
- Version: 1.25.0
3
+ Version: 1.26.1
4
4
  Summary: Utilities for setting up a Sentry development environment
5
5
  Author-email: Joshua Li <joshua.li@sentry.io>, Ian Woodard <ian.woodard@sentry.io>, Buck Evan <buck.evan@sentry.io>
6
6
  Classifier: Programming Language :: Python :: 3
@@ -84,6 +84,10 @@ This updates the global devenv installation, and global tools.
84
84
  If you're upgrading from a particularly old devenv, it won't have `update` so you need to:
85
85
  `~/.local/share/sentry-devenv/venv/bin/pip install -U sentry-devenv`
86
86
 
87
+ `devenv colima start`
88
+
89
+ If you are using colima instead of docker desktop, run this to set up colima on a new machine. The default `colima start` may underprovision resources. Run this command after `colima delete` to reset.
90
+
87
91
 
88
92
  ## technical overview
89
93
 
@@ -119,7 +123,7 @@ coderoot = ~/code
119
123
  ```ini
120
124
  [devenv]
121
125
  # optionally require a minimum version to run sync.py
122
- minimum_version = 1.11.0
126
+ minimum_version = 1.22.1
123
127
  ```
124
128
 
125
129
  There are plenty more sections, their use is best seen in the [examples](#examples).
@@ -157,7 +161,11 @@ PATH_add "${PWD}/.devenv/bin"
157
161
 
158
162
  ### python
159
163
 
160
- Need a single virtualenv (or have one already at `.venv` you want devenv to manage?)
164
+ We have support for, and we standardize on [uv](https://github.com/astral-sh/uv)
165
+ to manage python environments.
166
+
167
+ More details (beyond a bare minimum example which is detailed here) about the standard is
168
+ [here](https://www.notion.so/sentry/Standard-Spec-python-uv-2248b10e4b5d8045b8fff30f8b8b67ca).
161
169
 
162
170
  `[reporoot]/.envrc`
163
171
  ```bash
@@ -166,11 +174,10 @@ export VIRTUAL_ENV="${PWD}/.venv"
166
174
  PATH_add "${PWD}/.venv/bin"
167
175
  ```
168
176
 
169
- if using uv:
170
-
171
177
  `[reporoot]/devenv/sync.py`
172
178
  ```py
173
- from devenv.lib import config, uv
179
+ from devenv import constants
180
+ from devenv.lib import config, proc, uv
174
181
 
175
182
  def main(context: dict[str, str]) -> int:
176
183
  reporoot = context["reporoot"]
@@ -190,22 +197,27 @@ def main(context: dict[str, str]) -> int:
190
197
  return 0
191
198
  ```
192
199
 
200
+ We pin the uv version to avoid any surprises.
201
+ (As opposed to a solution like `brew`, which always puts you on latest software.)
202
+ If you want to update the version then you'll have to update these urls and checksums.
203
+
193
204
  `[reporoot]/devenv/config.ini`
194
205
  ```ini
195
206
  [devenv]
196
207
  minimum_version = 1.22.1
197
208
 
198
209
  [uv]
199
- darwin_arm64 = https://github.com/astral-sh/uv/releases/download/0.7.21/uv-aarch64-apple-darwin.tar.gz
200
- darwin_arm64_sha256 = c73af7a4e0bcea9b5b593a0c7e5c025ee78d8be3f7cd60bfeadc8614a16c92ef
201
- darwin_x86_64 = https://github.com/astral-sh/uv/releases/download/0.7.21/uv-x86_64-apple-darwin.tar.gz
202
- darwin_x86_64_sha256 = f8a9b4f4a80a44653344d36b53e148134176e8f7cc99f8e823676a57c884595e
203
- linux_arm64 = https://github.com/astral-sh/uv/releases/download/0.7.21/uv-aarch64-unknown-linux-gnu.tar.gz
204
- linux_arm64_sha256 = 1dae18211605b9d00767d913da5108aea50200a88372bf8a2e1f56abdbe509f0
205
- linux_x86_64 = https://github.com/astral-sh/uv/releases/download/0.7.21/uv-x86_64-unknown-linux-gnu.tar.gz
206
- linux_x86_64_sha256 = ca3e8898adfce5fcc891d393a079013fa4bd0d9636cef11aded8a7485bcba312
210
+ darwin_arm64 = https://github.com/astral-sh/uv/releases/download/0.8.2/uv-aarch64-apple-darwin.tar.gz
211
+ darwin_arm64_sha256 = 954d24634d5f37fa26c7af75eb79893d11623fc81b4de4b82d60d1ade4bfca22
212
+ darwin_x86_64 = https://github.com/astral-sh/uv/releases/download/0.8.2/uv-x86_64-apple-darwin.tar.gz
213
+ darwin_x86_64_sha256 = ae755df53c8c2c1f3dfbee6e3d2e00be0dfbc9c9b4bdffdb040b96f43678b7ce
214
+ linux_arm64 = https://github.com/astral-sh/uv/releases/download/0.8.2/uv-aarch64-unknown-linux-gnu.tar.gz
215
+ linux_arm64_sha256 = 27da35ef54e9131c2e305de67dd59a07c19257882c6b1f3cf4d8d5fbb8eaf4ca
216
+ linux_x86_64 = https://github.com/astral-sh/uv/releases/download/0.8.2/uv-x86_64-unknown-linux-gnu.tar.gz
217
+ linux_x86_64_sha256 = 6dcb28a541868a455aefb2e8d4a1283dd6bf888605a2db710f0530cec888b0ad
207
218
  # used for autoupdate
208
- version = 0.7.21
219
+ # NOTE: if using uv-build as a build backend, you'll have to make sure the versions match
220
+ version = 0.8.2
209
221
  ```
210
222
 
211
223
  `[reporoot]/.python-version`
@@ -220,98 +232,6 @@ name = "foo"
220
232
  version = "0.0.0"
221
233
  ```
222
234
 
223
- or classic pip:
224
-
225
- `[reporoot]/devenv/sync.py`
226
- ```py
227
- from devenv.lib import config, venv
228
-
229
- def main(context: dict[str, str]) -> int:
230
- reporoot = context["reporoot"]
231
-
232
- venv_dir, python_version, requirements, editable_paths, bins = venv.get(reporoot, "venv")
233
- url, sha256 = config.get_python(reporoot, python_version)
234
- print(f"ensuring venv at {venv_dir}...")
235
- venv.ensure(venv_dir, python_version, url, sha256)
236
-
237
- print(f"syncing venv with {requirements}...")
238
- venv.sync(reporoot, venv_dir, requirements, editable_paths, bins)
239
-
240
- return 0
241
- ```
242
-
243
- `[reporoot]/devenv/config.ini`
244
- ```ini
245
- [venv.venv]
246
- python = 3.12.3
247
- path = .venv
248
- requirements = requirements-dev.txt
249
- editable =
250
- .
251
-
252
- [python3.12.3]
253
- darwin_x86_64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-apple-darwin-install_only.tar.gz
254
- darwin_x86_64_sha256 = c37a22fca8f57d4471e3708de6d13097668c5f160067f264bb2b18f524c890c8
255
- darwin_arm64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-apple-darwin-install_only.tar.gz
256
- darwin_arm64_sha256 = ccc40e5af329ef2af81350db2a88bbd6c17b56676e82d62048c15d548401519e
257
- linux_x86_64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-unknown-linux-gnu-install_only.tar.gz
258
- linux_x86_64_sha256 = a73ba777b5d55ca89edef709e6b8521e3f3d4289581f174c8699adfb608d09d6
259
- linux_arm64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-unknown-linux-gnu-install_only.tar.gz
260
- linux_arm64_sha256 = ec8126de97945e629cca9aedc80a29c4ae2992c9d69f2655e27ae73906ba187d
261
- ```
262
-
263
- You can also have multiple virtualenvs, which is useful if you rely on a python tool
264
- that has a bunch of dependencies that may conflict with others.
265
-
266
- `[reporoot]/.envrc`
267
- ```bash
268
- export VIRTUAL_ENV="${PWD}/.exampleproject"
269
-
270
- PATH_add "${PWD}/.venv-exampleproject/bin"
271
- PATH_add "${PWD}/.venv-inhouse-tool/bin"
272
- ```
273
-
274
- `[reporoot]/devenv/sync.py`
275
- ```py
276
- from devenv.lib import config, venv
277
-
278
- def main(context: dict[str, str]) -> int:
279
- reporoot = context["reporoot"]
280
-
281
- for name in ("exampleproject", "inhouse-tool"):
282
- venv_dir, python_version, requirements, editable_paths, bins = venv.get(reporoot, name)
283
- url, sha256 = config.get_python(reporoot, python_version)
284
- print(f"ensuring {name} venv at {venv_dir}...")
285
- venv.ensure(venv_dir, python_version, url, sha256)
286
-
287
- print(f"syncing {name} with {requirements}...")
288
- venv.sync(reporoot, venv_dir, requirements, editable_paths, bins)
289
-
290
- return 0
291
- ```
292
-
293
- `[reporoot]/devenv/config.ini`
294
- ```ini
295
- [venv.exampleproject]
296
- python = 3.12.3
297
- requirements = requirements-dev.txt
298
- editable =
299
- .
300
-
301
- [venv.inhouse-tool]
302
- python = 3.12.3
303
- requirements = inhouse-tool/requirements-dev.txt
304
-
305
- [python3.12.3]
306
- darwin_x86_64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-apple-darwin-install_only.tar.gz
307
- darwin_x86_64_sha256 = c37a22fca8f57d4471e3708de6d13097668c5f160067f264bb2b18f524c890c8
308
- darwin_arm64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-apple-darwin-install_only.tar.gz
309
- darwin_arm64_sha256 = ccc40e5af329ef2af81350db2a88bbd6c17b56676e82d62048c15d548401519e
310
- linux_x86_64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-unknown-linux-gnu-install_only.tar.gz
311
- linux_x86_64_sha256 = a73ba777b5d55ca89edef709e6b8521e3f3d4289581f174c8699adfb608d09d6
312
- linux_arm64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-unknown-linux-gnu-install_only.tar.gz
313
- linux_arm64_sha256 = ec8126de97945e629cca9aedc80a29c4ae2992c9d69f2655e27ae73906ba187d
314
- ```
315
235
 
316
236
  ### node
317
237
 
@@ -17,10 +17,10 @@ devenv/sync.py
17
17
  devenv/update.py
18
18
  devenv/checks/__init__.py
19
19
  devenv/checks/colimaSsh.py
20
+ devenv/checks/diskfree.py
20
21
  devenv/checks/dockerConfig.py
21
22
  devenv/checks/dockerDesktop.py
22
23
  devenv/checks/limaDns.py
23
- devenv/checks/test.py
24
24
  devenv/lib/__init__.py
25
25
  devenv/lib/archive.py
26
26
  devenv/lib/brew.py
@@ -1,36 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import os
4
-
5
- from devenv.lib import fs
6
- from devenv.lib import proc
7
- from devenv.lib_check.types import checker
8
- from devenv.lib_check.types import fixer
9
-
10
- tags: set[str] = set()
11
- name = "foo"
12
-
13
-
14
- @checker
15
- def check() -> tuple[bool, str]:
16
- if os.path.exists(f"{fs.gitroot()}/foo"):
17
- return True, ""
18
- return False, f"{fs.gitroot()}/foo doesn't exist"
19
-
20
-
21
- @fixer
22
- def fix() -> tuple[bool, str]:
23
- try:
24
- proc.run(
25
- (
26
- "/bin/bash",
27
- "-c",
28
- """
29
- echo blah > foo
30
- """,
31
- ),
32
- cwd=fs.gitroot(),
33
- )
34
- return True, ""
35
- except RuntimeError as e:
36
- return False, f"{e}"
File without changes