Skip to content

Commit 07cec31

Browse files
committed
chore: create devcontainer setup
1 parent 487a424 commit 07cec31

3 files changed

Lines changed: 44 additions & 0 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Dev container Dockerfile
2+
FROM mcr.microsoft.com/devcontainers/python:3.12-bullseye
3+
4+
# Install Poetry
5+
RUN curl -sSL https://install.python-poetry.org | python3 -
6+
7+
# Install Poetry Plugins
8+
RUN poetry self add poetry-dotenv-plugin || true && poetry self add poetry-bumpversion || true

.devcontainer/devcontainer.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"name": "Langfuse Python SDK",
3+
"build": {
4+
"dockerfile": "Dockerfile"
5+
},
6+
"postCreateCommand": "bash .devcontainer/post-create.sh"
7+
}

.devcontainer/post-create.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
echo "🚀 Setting up Langfuse Python SDK development environment..."
6+
7+
# Install project dependencies including all extras
8+
echo "📚 Installing project dependencies..."
9+
poetry install --all-extras
10+
11+
# Setup pre-commit hooks
12+
echo "🪝 Setting up pre-commit hooks..."
13+
poetry run pre-commit install
14+
15+
# Create a basic .env file if it doesn't exist
16+
if [ ! -f .env ]; then
17+
echo "📝 Creating .env file from template..."
18+
cp .env.template .env
19+
fi
20+
21+
echo "✅ Development environment setup complete!"
22+
echo ""
23+
echo "🎯 Quick start commands:"
24+
echo " poetry run pytest -s -v --log-cli-level=INFO # Run tests"
25+
echo " poetry run ruff format . # Format code"
26+
echo " poetry run ruff check . # Lint code"
27+
echo " poetry run mypy . # Type check"
28+
echo " poetry run pre-commit run --all-files # Run pre-commit"
29+
echo ""

0 commit comments

Comments
 (0)