Spaces:
Sleeping
MSSE AI Engineering Project
This project is a Retrieval-Augmented Generation (RAG) application that answers questions about a corpus of company policies.
Setup
Clone the repository:
git clone https://github.com/sethmcknight/msse-ai-engineering.git cd msse-ai-engineeringCreate and activate a virtual environment:
python3 -m venv venv source venv/bin/activateInstall the dependencies:
pip install -r requirements.txt
Running the Application (local)
To run the Flask application locally:
export FLASK_APP=app.py
flask run
The app will be available at http://127.0.0.1:5000/ and exposes /health and / endpoints.
Running Tests
To run the test suite:
pytest
Current tests cover the basic application endpoints (/health and /). As we implement more features (ingestion, embeddings, RAG, chat API), we will add tests for those components following TDD.
CI/CD and Deployment
This repository includes a GitHub Actions workflow that runs tests on push and pull requests. After merging to main, the workflow triggers a Render deploy and runs a post-deploy smoke test against /health.
If you are deploying to Render manually:
- Create a Web Service in Render (Environment: Docker).
- Dockerfile Path:
Dockerfile - Build Context:
. - Health Check Path:
/health - Auto-Deploy: Off (recommended if you want GitHub Actions to trigger deploys)
To enable automated deploys from GitHub Actions, set these repository secrets in GitHub:
RENDER_API_KEY— Render API keyRENDER_SERVICE_ID— Render service idRENDER_SERVICE_URL— Render public URL (used for smoke tests)
The workflow will create a small deploy-update-<ts> branch with an updated deployed.md after a successful deploy; that commit is marked with [skip-deploy] so merging it will not trigger another deploy.
Notes
run.shbinds Gunicorn to thePORTenvironment variable so it works on Render.- The Dockerfile copies only runtime files and uses
.dockerignoreto avoid including development artifacts.
Next steps
- Add ingestion, embedding, and RAG components (with tests). See
project-plan.mdfor detailed milestones.
Developer tooling
To keep the codebase formatted and linted automatically, we use pre-commit hooks.
- Create and activate your virtualenv (see Setup above).
- Install developer dependencies:
pip install -r dev-requirements.txt
- Install the hooks (runs once per clone):
pre-commit install
- To run all hooks locally (for example before pushing):
pre-commit run --all-files
CI has a dedicated pre-commit-check job that runs on pull requests and will fail the PR if any hook fails. We also run formatters and tests in the main build job.