Skip to content
Closed
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:

- name: Install dependencies (matches Makefile exactly)
run: |
uv pip install --python $(which python) -r requirements.txt
uv pip install --python $(which python) -r requirements-dev.txt

- name: Mypy (strict) - matches Makefile exactly
run: |
Expand All @@ -86,7 +86,7 @@ jobs:

- name: Install dependencies
run: |
uv pip install --python $(which python) -r requirements.txt
uv pip install --python $(which python) -r requirements-dev.txt

- name: Run tests with coverage (matches Makefile exactly)
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Install pre-commit and dependencies
run: |
uv pip install --python $(which python) pre-commit
uv pip install --python $(which python) -r requirements.txt
uv pip install --python $(which python) -r requirements-dev.txt

- name: Run pre-commit hooks (fastest feedback)
run: |
Expand Down
24 changes: 6 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ FROM python:3.11-slim
WORKDIR /app

# Install system dependencies
RUN apt-get update && apt-get install -y \
sqlite3 \
postgresql-client \
curl \
postgresql-client \
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
curl \
postgresql-client \
sqlite3 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Copy requirements and install Python dependencies
Expand All @@ -25,19 +26,6 @@ RUN chmod +x /docker-entrypoint.sh
# Create directories for data and logs
RUN mkdir -p /app/data /app/logs

# Create config files from examples if they don't exist
# This ensures the image works even if built from a fresh git clone
RUN for example_file in config/defaults/*.example.yaml; do \
if [ -f "$example_file" ]; then \
filename=$(basename "$example_file" .example.yaml); \
target="config/${filename}.yaml"; \
if [ ! -f "$target" ]; then \
cp "$example_file" "$target"; \
echo "Created $target from example"; \
fi; \
fi; \
done

# Healthcheck: validate settings can be loaded
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD python -c "from src.config.settings import get_settings; get_settings(); print('OK')" || exit 1
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ help: ## Show this help message
@echo "$(BLUE)Available targets:$(NC)"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " $(GREEN)%-15s$(NC) %s\n", $$1, $$2}'

install: ## Install dependencies
install: ## Install development dependencies
@echo "$(BLUE)Installing dependencies...$(NC)"
pip install -r requirements.txt
pip install -r requirements-dev.txt

format: ## Format code with ruff
@echo "$(BLUE)Formatting code with ruff...$(NC)"
Expand Down
20 changes: 20 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
-r requirements.txt

# Testing
pytest==8.0.0
pytest-asyncio==0.23.5
pytest-cov==4.1.0
pytest-mock==3.12.0
pytest-timeout==2.2.0

# Code Quality
ruff==0.12.8
mypy==1.8.0
pre-commit==3.6.2

# Type stubs
types-jsonschema==4.20.0.20240316
types-pytz==2024.1.0.20240203
types-PyYAML==6.0.12.20240311
types-python-dateutil==2.8.19.20240106
types-requests==2.31.0.20240218
57 changes: 20 additions & 37 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,45 +1,28 @@
# Core dependencies
pydantic>=2.6.0
pydantic-settings>=2.2.0
python-dotenv>=1.0.0
# Runtime dependencies (pinned)
pydantic==2.6.0
pydantic-settings==2.2.0
python-dotenv==1.0.1

# HTTP & APIs
httpx>=0.27.0
slack-sdk>=3.27.0
openai>=1.12.0
telethon>=1.41.0
httpx==0.27.0
slack-sdk==3.27.0
openai==1.12.0
telethon==1.41.1

# Utilities
pytz>=2024.1
python-dateutil>=2.8.2
rapidfuzz>=3.6.0
pyyaml>=6.0.0
jsonschema>=4.20.0
types-jsonschema>=4.20.0
structlog>=24.1.0
prometheus-client>=0.20.0
qrcode[pil]>=7.4.0

# Testing
pytest>=8.0.0
pytest-asyncio>=0.23.0
pytest-cov>=4.1.0
pytest-mock>=3.12.0
pytest-timeout>=2.2.0

# Code Quality
ruff==0.12.8
mypy>=1.8.0
pre-commit>=3.6.0
types-pytz>=2024.1.0
types-PyYAML>=6.0.0
types-python-dateutil>=2.8.0
types-requests>=2.31.0
pytz==2024.1
python-dateutil==2.8.2
rapidfuzz==3.6.1
pyyaml==6.0.1
jsonschema==4.20.0
structlog==24.1.0
prometheus-client==0.20.0
qrcode[pil]==7.4.2

# Database & Migrations
alembic>=1.13.0
psycopg2-binary>=2.9.9
alembic==1.13.1
psycopg2-binary==2.9.9

# Streamlit & Visualization
streamlit>=1.29.0
plotly>=5.17.0
streamlit==1.29.0
plotly==5.17.0
Loading