Skip to content

Commit

Permalink
Merge branch 'main' into fix/use-latest-redis-client
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewleith authored Feb 19, 2025
2 parents 54776e4 + 8694456 commit ece4579
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff"
},
"python.defaultInterpreterPath": "/home/vscode/.venv/workspace/bin/python",
"python.venvPath": "/home/vscode/.venv",
"useAdminDebug": true,
"debug.default.configuration": "Python: Remote Attach",
"debug.toolBarLocation": "docked",
Expand Down Expand Up @@ -127,7 +129,7 @@
}
]
}
}
}
}
},
"features": {
Expand Down
12 changes: 11 additions & 1 deletion .devcontainer/scripts/installations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
set -ex

export POETRY_VERSION="1.7.1"
export POETRY_VENV_PATH="/home/vscode/.venv/workspace"

# Define aliases
echo -e "\n\n# User's Aliases" >> ~/.zshrc
Expand All @@ -21,26 +22,35 @@ echo -e "source /usr/share/doc/fzf/examples/completion.zsh" >> ~/.zshrc
echo -e "fpath+=/.zfunc" >> ~/.zshrc
echo -e "autoload -Uz compinit && compinit"

# Install Poetry
# Install and configure Poetry
pip install poetry==${POETRY_VERSION} poetry-plugin-sort
echo "PATH=$PATH"
#echo "/home/vscode/.local/bin/.."
export PATH=$PATH:/home/vscode/.local/bin/
which poetry
poetry --version
# Disable poetry auto-venv creation
poetry config virtualenvs.create false

# Initialize poetry autocompletions
mkdir -p ~/.zfunc
touch ~/.zfunc/_poetry
poetry completions zsh > ~/.zfunc/_poetry

# Manually create and activate a virtual environment with a static path
python -m venv ${POETRY_VENV_PATH}
source ${POETRY_VENV_PATH}/bin/activate

# Set up git blame to ignore certain revisions e.g. sweeping code formatting changes.
cd /workspace
git config blame.ignoreRevsFile .git-blame-ignore-revs

# Install dependencies
poetry install

# Ensure newly created shells activate the poetry venv
echo "source ${POETRY_VENV_PATH}/bin/activate" >> ~/.zshrc

# Poe the Poet plugin tab completions
touch ~/.zfunc/_poe
poetry run poe _zsh_completion > ~/.zfunc/_poe
Expand Down

0 comments on commit ece4579

Please sign in to comment.