Feat/part2 LMS Integration and Nudge Engine#10
Open
SuryaPratapIIIT wants to merge 3 commits into
Open
Conversation
- Setup FastAPI app, routers, and health checks - Add Pydantic domain schemas and env configuration - Build LMS mock adapter and nudge engine skeleton - Add Pytest suite with 86% coverage and CI workflow - Add Dockerfile and docker-compose
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LMS Integration & Nudging Engine for TAP Multilingual Voice Agent
Summary
This PR introduces LMS integration and a rule-based nudging engine to enhance learner engagement. The system now fetches learner context from TAP LMS and generates personalized nudge plans to determine when and how to engage students effectively.
✨ Key Changes
Added FrappeLMSAdapter using httpx
Integrated TAP LMS REST APIs:
get_learner_profile
get_learner_activity
log_engagement
Implemented rule-based decision logic for:
Call Reason & Nudge Type (Inactivity, Pending Assignments, Milestones)
Next Task Recommendation
Urgency Levels (Low / Medium / High)
Personalized Messaging (Student + Parent)
GET /api/v1/nudge/{learner_id}/context
→ Fetch raw learner activity from LMS
GET /api/v1/nudge/{learner_id}/plan
→ Generate structured nudge plan for orchestration
🧪 Testing & Quality
Added/updated tests in tests/test_nudge_engine.py
✅ 45 tests passing
📊 Test coverage: 82.28%
🧹 Linting & formatting via Ruff
⚙️ How to Test
Run server
uvicorn app.main:app --reload
Open API docs
http://localhost:8000/docs
Run tests
pytest tests/ -v
Use sample learner IDs:
learner_001
learner_002
learner_003
✅ Checklist
Modular architecture followed
No hardcoded secrets
Unit tests added
Linting & formatting applied
💡 Notes for Reviewers
Focus areas:
FrappeLMSAdapter API interactions
Rule evaluation logic in NudgeEngine
API response structure for /plan endpoint