Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
66 changes: 66 additions & 0 deletions .github/workflows/ci-with-pipegenie.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: CI Pipeline with PipeGenie Integration

on:
push:
branches: [ main, develop, 'feature/**' ]
pull_request:
branches: [ main ]

jobs:
test-and-build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'

- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt

- name: Run tests
run: |
pytest tests/ --tb=short -v --junitxml=test-results.xml

- name: Build
run: |
echo "Build step here..."

# This job notifies PipeGenie on failure (via webhook)
notify-pipegenie:
runs-on: ubuntu-latest
needs: test-and-build
if: failure() # Only run if the CI job fails

steps:
#- name: Notify PipeGenie of failure
# run: |
curl -X POST "${{ secrets.PIPEGENIE_URL }}/api/webhook/github" \
-H "Content-Type: application/json" \
-H "X-GitHub-Event: workflow_run" \
-H "X-Hub-Signature-256: sha256=${{ secrets.PIPEGENIE_WEBHOOK_SECRET }}" \
-d '{
"action": "completed",
"workflow_run": {
"id": "${{ github.run_id }}",
"name": "${{ github.workflow }}",
"head_branch": "${{ github.ref_name }}",
"head_sha": "${{ github.sha }}",
"conclusion": "failure",
"html_url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
"head_commit": {
"message": "${{ github.event.head_commit.message }}"
},
"actor": { "login": "${{ github.actor }}" }
},
"repository": {
"full_name": "${{ github.repository }}",
"name": "${{ github.event.repository.name }}"
}
}'
184 changes: 184 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
# OS files
.DS_Store
Thumbs.db

# Editor and IDE
.vscode/
.idea/
*.swp
*.swo

# Environment and secrets
.env
.env.*
!.env.example

# Logs
*.log
logs/

# Python
__pycache__/
*.py[cod]
*$py.class
.pytest_cache/
.mypy_cache/
.ruff_cache/
.coverage
.coverage.*
htmlcov/
.venv/
venv/
env/

# Backend artifacts
backend/.pytest_cache/
backend/.mypy_cache/
backend/.ruff_cache/

# Node / Vite (frontend)
node_modules/
frontend/node_modules/
frontend/dist/
frontend/.vite/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Build and cache outputs
dist/
build/
.tmp/
tmp/
.cache/

# Docker and compose overrides
*.pid
*.seed
docker-compose.override.yml

# SigNoz-specific ignore rules
/signoz/deploy/docker/environment_tiny/common_test
/signoz/frontend/.pnp
/signoz/frontend/i18n-translations-hash.json
/signoz/**/*.pnp.js
/signoz/frontend/coverage
/signoz/frontend/build
/signoz/frontend/.yarnclean
/signoz/frontend/.temp_cache
/signoz/frontend/test-results
/signoz/frontend/src/constants/env.ts

/signoz/**/build
/signoz/**/storage
/signoz/**/locust-scripts/__pycache__/
/signoz/**/__debug_bin

/signoz/pkg/query-service/signoz.db
/signoz/pkg/query-service/tests/test-deploy/data/
/signoz/ee/query-service/signoz.db
/signoz/ee/query-service/tests/test-deploy/data/

# local data (SigNoz)
/signoz/**/*.backup
/signoz/**/*.db
/signoz/**/*.db-shm
/signoz/**/*.db-wal
/signoz/**/db
/signoz/deploy/docker/clickhouse-setup/data/
/signoz/deploy/docker-swarm/clickhouse-setup/data/
/signoz/bin/
/signoz/.local/
/signoz/*/query-service/queries.active
/signoz/ee/query-service/db

# e2e (SigNoz)
/signoz/e2e/node_modules/
/signoz/e2e/test-results/
/signoz/e2e/blob-report/
/signoz/e2e/.auth

# go (SigNoz)
/signoz/vendor/
/signoz/**/main/**
/signoz/**/__debug_bin**

# git-town (SigNoz)
/signoz/.git-branches.toml

# ignore user_scripts fetched by init-clickhouse (SigNoz)
/signoz/deploy/common/clickhouse/user_scripts/

/signoz/queries.active

# tmp (SigNoz)
/signoz/**/tmp/**

# .devenv tmp files (SigNoz)
/signoz/.devenv/**/tmp/**
/signoz/.qodo
/signoz/.dev

# Additional editor/tooling rules from SigNoz
/signoz/.zed

# Additional Python ecosystem rules from SigNoz
/signoz/**/*.so
/signoz/.Python
/signoz/develop-eggs/
/signoz/downloads/
/signoz/eggs/
/signoz/.eggs/
/signoz/lib64/
/signoz/parts/
/signoz/sdist/
/signoz/var/
/signoz/wheels/
/signoz/share/python-wheels/
/signoz/**/*.egg-info/
/signoz/.installed.cfg
/signoz/**/*.egg
/signoz/**/MANIFEST
/signoz/**/*.manifest
/signoz/**/*.spec
/signoz/**/pip-log.txt
/signoz/**/pip-delete-this-directory.txt
/signoz/.tox/
/signoz/.nox/
/signoz/**/nosetests.xml
/signoz/**/coverage.xml
/signoz/**/*.cover
/signoz/**/*.py,cover
/signoz/.hypothesis/
/signoz/**/cover/
/signoz/**/*.mo
/signoz/**/*.pot
/signoz/**/local_settings.py
/signoz/**/db.sqlite3
/signoz/**/db.sqlite3-journal
/signoz/**/instance/
/signoz/**/.webassets-cache
/signoz/**/.scrapy
/signoz/docs/_build/
/signoz/.pybuilder/
/signoz/target/
/signoz/.ipynb_checkpoints
/signoz/**/profile_default/
/signoz/**/ipython_config.py
/signoz/**/celerybeat-schedule
/signoz/**/celerybeat.pid
/signoz/**/*.sage.py
/signoz/ENV/
/signoz/env.bak/
/signoz/venv.bak/
/signoz/.spyderproject
/signoz/.spyproject
/signoz/.ropeproject
/signoz/site
/signoz/.dmypy.json
/signoz/**/dmypy.json
/signoz/.pyre/
/signoz/.pytype/
/signoz/**/cython_debug/
/signoz/**/pyrightconfig.json
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# HackToFuture 4.0 — Template
# The_Quad-D03

Welcome to your official HackToFuture 4 repository.

Expand Down
58 changes: 58 additions & 0 deletions backend/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# PipeGenie Environment Configuration
# Copy this to .env and fill in your values

# MongoDB
MONGODB_URL=mongodb://localhost:27017
MONGODB_DB=pipegenie

# Redis (optional - caching)
REDIS_URL=redis://localhost:6379

# GitHub
GITHUB_TOKEN=your_github_personal_access_token_here
GITHUB_WEBHOOK_SECRET=pipegenie-webhook-secret
REPO_WRITEBACK_ENABLED=true
AUTO_OPEN_PR=true
PIPEGENIE_BOT_NAME=PipeGenie Bot
PIPEGENIE_BOT_EMAIL=pipegenie-bot@users.noreply.github.com

# AI Model Selection
# Option 1: Use Gemini API (default)
LLM_PROVIDER=gemini
GEMINI_API_KEY=your_gemini_api_key_here
GEMINI_MODEL=gemini-2.5-flash

# Option 2: Use local Ollama (manual fallback)
# LLM_PROVIDER=ollama
# OLLAMA_BASE_URL=http://localhost:11434
# LLM_MODEL=mistral

# Option 3: Use Mistral API (manual fallback)
# LLM_PROVIDER=mistral
# MISTRAL_API_KEY=your_mistral_api_key_here
# MISTRAL_MODEL=mistral-large-latest

# Legacy compatibility switch (optional)
USE_OLLAMA=false

# MilvusDB
MILVUS_HOST=localhost
MILVUS_PORT=19530

# Risk Thresholds (0.0-1.0)
RISK_LOW_THRESHOLD=0.3
RISK_HIGH_THRESHOLD=0.7

# Frontend URL (for CORS)
FRONTEND_URL=http://localhost:5173

# App
SECRET_KEY=change-this-to-a-long-random-string-in-production
DEBUG=true

# Observability (SigNoz via OpenTelemetry)
OTEL_ENABLED=true
OTEL_SERVICE_NAME=pipegenie-backend
OTEL_EXPORTER_OTLP_ENDPOINT=http://127.0.0.1:4318/v1/traces
OTEL_EXPORTER_OTLP_INSECURE=true
OTEL_RESOURCE_ATTRIBUTES=service.namespace=pipegenie,deployment.environment=dev
18 changes: 18 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM python:3.11-slim

WORKDIR /app

# Install system deps for milvus client, docker SDK
RUN apt-get update && apt-get install -y \
build-essential \
curl \
&& rm -rf /var/lib/apt/lists/*

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

EXPOSE 8000

CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "8000"]
18 changes: 18 additions & 0 deletions backend/Dockerfile.tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM python:3.11-slim

WORKDIR /workspace

RUN apt-get update && apt-get install -y \
build-essential \
curl \
&& rm -rf /var/lib/apt/lists/*

COPY requirements.txt /workspace/backend/requirements.txt
RUN pip install --no-cache-dir -r /workspace/backend/requirements.txt

COPY . /workspace/backend

ENV PYTHONPATH=/workspace
ENV MONGODB_URL=mongodb://localhost:27017

CMD ["python", "-m", "pytest", "-q", "backend/tests/test_risk_evaluator.py"]
Empty file added backend/__init__.py
Empty file.
Empty file added backend/agents/__init__.py
Empty file.
Loading