Skip to content

Commit 80bc067

Browse files
committed
fix: Improve Dev Container Build and Install Fixes
1 parent c6996d3 commit 80bc067

File tree

5 files changed

+52
-30
lines changed

5 files changed

+52
-30
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/devcontainers/base:bookworm
1+
FROM mcr.microsoft.com/devcontainers/base:bullseye
22

33
SHELL ["/bin/bash", "-l", "-c"]
44

.devcontainer/devcontainer.json

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,22 @@
1414
"actboy168.tasks",
1515
"anthropic.claude-code",
1616
"charliermarsh.ruff",
17-
"CodeRabbit.coderabbit-vscode",
1817
"dbaeumer.vscode-eslint",
1918
"dotenv.dotenv-vscode",
2019
"esbenp.prettier-vscode",
21-
"GitHub.copilot",
2220
"github.github-vscode-theme",
2321
"lumirelle.shell-format-rev",
24-
"ms-azuretools.vscode-docker",
2522
"ms-python.debugpy",
2623
"ms-python.mypy-type-checker",
2724
"ms-python.python",
2825
"ms-python.vscode-pylance",
2926
"ms-python.vscode-python-envs",
30-
"ms-toolsai.datawrangler",
31-
"ms-toolsai.jupyter",
3227
"mtxr.sqltools",
3328
"mtxr.sqltools-driver-pg",
3429
"pkief.material-icon-theme",
35-
"postman.postman-for-vscode",
3630
"redhat.vscode-xml",
3731
"redhat.vscode-yaml",
38-
"tamasfe.even-better-toml",
39-
"yzhang.markdown-all-in-one",
40-
"zilliz.semanticcodesearch"
32+
"tamasfe.even-better-toml"
4133
]
4234
}
4335
},
@@ -65,10 +57,12 @@
6557
"nvm": "latest",
6658
"pnpm": "latest"
6759
},
68-
/* https://github.com/devcontainers/features/tree/main/src/docker-in-docker */
69-
"ghcr.io/devcontainers/features/docker-in-docker:2": {
70-
"moby": false,
71-
"version": "latest"
60+
/* https://github.com/devcontainers/features/blob/main/src/docker-outside-of-docker/ */
61+
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
62+
"moby": "false",
63+
"dockerDashComposeVersion": "v1",
64+
"installDockerBuildx": "false",
65+
"installDockerComposeSwitch": "false"
7266
},
7367
/* https://github.com/va-h/devcontainers-features/tree/main/src/uv */
7468
"ghcr.io/va-h/devcontainers-features/uv:1": {
@@ -87,10 +81,10 @@
8781
"ghcr.io/devcontainers/features/git:1": {
8882
"version": "latest"
8983
},
90-
/* https://github.com/devcontainers-extra/features/tree/main/src/fzf */
91-
"ghcr.io/devcontainers-extra/features/fzf:1": {
92-
"version": "latest"
93-
}
84+
/* https://github.com/braun-daniel/devcontainer-features/blob/main/src/spaceship */
85+
"ghcr.io/braun-daniel/devcontainer-features/spaceship:1": {},
86+
/* https://github.com/braun-daniel/devcontainer-features/blob/main/src/fzf */
87+
"ghcr.io/braun-daniel/devcontainer-features/fzf:1": {}
9488
},
9589
"postCreateCommand": ".devcontainer/postCreateCommand.sh",
9690
"remoteUser": "root",

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "1.0.0"
44
description = "Claude CodePro"
55
requires-python = ">=3.13,<3.14"
66
readme = "README.md"
7-
dependencies = ["ipykernel>=6.29.5", "jupyter>=1.1.1", "pyyaml>=6.0.2"]
7+
dependencies = ["pyyaml>=6.0.2"]
88

99
[dependency-groups]
1010
dev = [

scripts/lib/dependencies.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,18 @@ def install_qlty(project_dir: Path) -> None:
181181
os.environ["QLTY_INSTALL"] = str(qlty_install)
182182
os.environ["PATH"] = f"{qlty_bin}:{os.environ.get('PATH', '')}"
183183

184+
# Add to zshrc
185+
zshrc = Path.home() / ".zshrc"
186+
if zshrc.exists():
187+
marker = "# qlty configuration"
188+
if marker not in zshrc.read_text():
189+
zsh_config = (
190+
f'\n{marker}\nexport QLTY_INSTALL="{qlty_install}"\nexport PATH="$QLTY_INSTALL/bin:$PATH"\n'
191+
)
192+
with open(zshrc, "a") as f:
193+
f.write(zsh_config)
194+
ui.print_success("Added qlty to .zshrc")
195+
184196
qlty_cmd = qlty_bin / "qlty"
185197
if qlty_cmd.exists():
186198
subprocess.run(

scripts/lib/files.py

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -171,14 +171,17 @@ def merge_yaml_config(
171171
import sys
172172

173173
try:
174-
uv_available = (
175-
subprocess.run(
176-
["uv", "--version"],
177-
capture_output=True,
178-
check=False,
179-
).returncode
180-
== 0
181-
)
174+
try:
175+
uv_available = (
176+
subprocess.run(
177+
["uv", "--version"],
178+
capture_output=True,
179+
check=False,
180+
).returncode
181+
== 0
182+
)
183+
except FileNotFoundError:
184+
uv_available = False
182185

183186
if uv_available:
184187
result = subprocess.run(
@@ -197,7 +200,14 @@ def merge_yaml_config(
197200

198201
if result.returncode != 0:
199202
result = subprocess.run(
200-
[sys.executable, "-m", "pip", "install", "--user", "pyyaml"],
203+
[
204+
sys.executable,
205+
"-m",
206+
"pip",
207+
"install",
208+
"--user",
209+
"pyyaml",
210+
],
201211
capture_output=True,
202212
text=True,
203213
check=False,
@@ -219,7 +229,9 @@ def merge_yaml_config(
219229
)
220230
return True
221231
else:
222-
error_msg = result.stderr.strip() if result.stderr else "Unknown error"
232+
error_msg = (
233+
result.stderr.strip() if result.stderr else "Unknown error"
234+
)
223235

224236
import shutil
225237

@@ -246,7 +258,11 @@ def merge_yaml_config(
246258
if "commands" in new_config and "commands" in existing_config:
247259
for cmd_name, cmd_config in new_config["commands"].items():
248260
if cmd_name in existing_config["commands"]:
249-
old_custom = existing_config["commands"][cmd_name].get("rules", {}).get("custom", [])
261+
old_custom = (
262+
existing_config["commands"][cmd_name]
263+
.get("rules", {})
264+
.get("custom", [])
265+
)
250266
if "rules" not in cmd_config:
251267
cmd_config["rules"] = {}
252268
cmd_config["rules"]["custom"] = old_custom

0 commit comments

Comments
 (0)