Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .claude/hooks/SessionStart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SessionStart hook for Claude Code online environment
# This script sets up the Python development environment using pixi

set -e
set -eo pipefail

echo "🚀 Setting up Python Template environment..."

Expand All @@ -15,6 +15,7 @@ if ! command -v pixi &> /dev/null; then
export PATH="$HOME/.pixi/bin:$PATH"

# Source bashrc to get pixi in PATH (if bashrc was updated)
# shellcheck disable=SC1091
[ -f "$HOME/.bashrc" ] && source "$HOME/.bashrc"

echo "✅ Pixi installed successfully"
Expand Down
6 changes: 4 additions & 2 deletions .devcontainer/claude-code/install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
set -eu
#!/bin/bash
set -euo pipefail

# Claude Code CLI Local Feature Install Script
# Installs Claude Code via pixi and sets up configuration directories
Expand Down Expand Up @@ -83,6 +83,7 @@ install_claude_code() {

# Add pixi bin path to user's profile if not already there
local profile="$TARGET_HOME/.profile"
# shellcheck disable=SC2016
local pixi_path_line='export PATH="$HOME/.pixi/bin:$PATH"'
if [ -f "$profile" ] && ! grep -q '\.pixi/bin' "$profile"; then
echo "$pixi_path_line" >> "$profile"
Expand All @@ -93,6 +94,7 @@ install_claude_code() {

# Workaround: pixi trampoline fails for bash scripts, so add env bin directly
# This conditionally adds the path only if the env exists
# shellcheck disable=SC2016
local env_path_line='[ -d "$HOME/.pixi/envs/claude-shim/bin" ] && export PATH="$HOME/.pixi/envs/claude-shim/bin:$PATH"'
if [ -f "$profile" ] && ! grep -q 'pixi/envs/claude-shim' "$profile"; then
echo "# Workaround: pixi trampoline fails for bash scripts" >> "$profile"
Expand Down
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

"features": {
"./claude-code": {},
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/common-utils:2": {}
// "ghcr.io/devcontainers/features/docker-in-docker:2": {},
// "ghcr.io/devcontainers/features/common-utils:2": {}
},

"initializeCommand": ".devcontainer/claude-code/init-host.sh",
Expand Down
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ repos:
# Run the formatter.
- id: ruff-format
types_or: [ python, pyi ]
# Shell script linter
- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.11.0
hooks:
- id: shellcheck

# Checks for spelling mistakes
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
Expand Down
8 changes: 5 additions & 3 deletions scripts/launch_vscode.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#! /bin/bash
set -e
set -eo pipefail

export COMPOSE_DOCKER_CLI_BUILD=1
export DOCKER_BUILDKIT=1
Expand All @@ -25,14 +25,16 @@ if [ ! -d "$VENV_DIR" ]; then
echo "Creating virtual environment in $VENV_DIR..."
python3 -m venv "$VENV_DIR"
echo "Activating the virtual environment..."
source $VENV_DIR/bin/activate
# shellcheck disable=SC1091
source "$VENV_DIR/bin/activate"
echo "Installing deps rocker..."
pip install deps-rocker pixi-rocker rockervsc
echo "Virtual environment setup and deps rocker installation complete."
else
echo "Virtual environment already exists in $VENV_DIR."
echo "Activating the existing virtual environment..."
source $VENV_DIR/bin/activate
# shellcheck disable=SC1091
source "$VENV_DIR/bin/activate"
fi

rockervsc
Expand Down
1 change: 1 addition & 0 deletions scripts/rename_project.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
set -eo pipefail

# Escape characters special in sed replacement strings (\, &, /)
escape_sed() { printf '%s\n' "$1" | sed 's/[\\&/]/\\&/g'; }
Expand Down
7 changes: 5 additions & 2 deletions scripts/setup_host.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#! /bin/bash
set -eo pipefail

#Sets up docker, nvidia docker git-lfs and rocker which are used to clone and setup docker containers

#COPIED FROM OFFICIAL DOCKER INSTALL INSTRUCTIONS
# https://docs.docker.com/engine/install/ubuntu/

#remove incorrect docker
for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done
for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove "$pkg"; done

# Add Docker's official GPG key:
sudo apt update
Expand All @@ -16,6 +17,7 @@ sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyring
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
# shellcheck disable=SC1091
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
Expand Down Expand Up @@ -52,11 +54,12 @@ echo "you may need to restart your machine"

#INSTALL PIXI
curl -fsSL https://pixi.sh/install.sh | bash
# shellcheck disable=SC2016
echo 'eval "$(pixi completion --shell bash)"' >> ~/.bashrc

#INSTALL UV
curl -LsSf https://astral.sh/uv/install.sh | sh

sudo groupadd docker
sudo usermod -aG docker $USER
sudo usermod -aG docker "$USER"
newgrp docker || true
1 change: 1 addition & 0 deletions scripts/update_from_template.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#! /bin/bash
set -eo pipefail

git config --global pull.rebase false
git remote add template https://github.com/blooop/python_template.git
Expand Down