Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 8 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Dev container Dockerfile
FROM mcr.microsoft.com/devcontainers/python:3.12-bullseye

# Install Poetry
RUN curl -sSL https://install.python-poetry.org | python3 -

# Install Poetry Plugins
RUN poetry self add poetry-dotenv-plugin || true && poetry self add poetry-bumpversion || true
7 changes: 7 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "Langfuse Python SDK",
"build": {
"dockerfile": "Dockerfile"
},
"postCreateCommand": "bash .devcontainer/post-create.sh"
}
29 changes: 29 additions & 0 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

set -e

echo "🚀 Setting up Langfuse Python SDK development environment..."

# Install project dependencies including all extras
echo "📚 Installing project dependencies..."
poetry install --all-extras

# Setup pre-commit hooks
echo "🪝 Setting up pre-commit hooks..."
poetry run pre-commit install

# Create a basic .env file if it doesn't exist
if [ ! -f .env ]; then
echo "📝 Creating .env file from template..."
cp .env.template .env
fi

echo "✅ Development environment setup complete!"
echo ""
echo "🎯 Quick start commands:"
echo " poetry run pytest -s -v --log-cli-level=INFO # Run tests"
echo " poetry run ruff format . # Format code"
echo " poetry run ruff check . # Lint code"
echo " poetry run mypy . # Type check"
echo " poetry run pre-commit run --all-files # Run pre-commit"
echo ""