Skip to content

Commit 3bcf5fc

Browse files
committed
fix: address Copilot documentation and CI suggestions
- Add required env vars (OPENAI_API_KEY, DATABASE_URL) to GitHub Actions - Clarify DATABASE_URL priority over individual DB variables in README - Add comment explaining STORAGE_PATH usage - Remove non-existent config/settings.py from project structure - Fixes all remaining Copilot documentation suggestions
1 parent 9d719eb commit 3bcf5fc

4 files changed

Lines changed: 10 additions & 5 deletions

File tree

.github/workflows/code-quality.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ jobs:
4040
uv run ruff check .
4141
4242
- name: Run tests
43+
env:
44+
OPENAI_API_KEY: "test-openai-key"
45+
DATABASE_URL: "sqlite:///:memory:"
4346
run: |
4447
uv run pytest -v --cov=app --cov-report=xml --cov-report=term
4548

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,10 @@ The API will be available at:
101101
Key environment variables in \`.env\`:
102102

103103
```bash
104-
# Database
104+
# Database (DATABASE_URL takes priority if set)
105+
DATABASE_URL=postgresql+psycopg://memu_user:memu_pass@localhost:54320/memu_db
106+
107+
# Alternative: Individual database variables (used by app/database.py)
105108
DATABASE_HOST=localhost
106109
DATABASE_PORT=54320
107110
DATABASE_USER=memu_user
@@ -276,8 +279,6 @@ memU-server/
276279
│ ├── utils/ # Utilities
277280
│ ├── database.py # Database configuration
278281
│ └── main.py # FastAPI application
279-
├── config/
280-
│ └── settings.py # Configuration management
281282
├── tests/ # Test suite
282283
├── alembic/ # Database migrations
283284
├── docker-compose.yml
@@ -349,7 +350,7 @@ See [LICENSE](LICENSE) file for details.
349350

350351
## 🙏 Acknowledgments
351352

352-
- [memu-py](https://github.com/mem0ai/memu-py) - Core memory management engine
353+
- [memu-py](https://github.com/NevaMind-AI/memu-py) - Core memory management engine
353354
- [FastAPI](https://fastapi.tiangolo.com/) - Modern web framework
354355
- [Temporal](https://temporal.io/) - Workflow orchestration
355356
- [pgvector](https://github.com/pgvector/pgvector) - Vector similarity search

app/database.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
f"Database configuration is incomplete. Missing environment variables: {', '.join(missing_vars)}"
3636
)
3737

38-
DATABASE_URL = f"postgresql+psycopg://{db_user}:{db_pass}@{db_host}:{db_port}/{db_name}"
38+
DATABASE_URL = f"postgresql+asyncpg://{db_user}:{db_pass}@{db_host}:{db_port}/{db_name}"
3939

4040
# Create SQLAlchemy async engine
4141
engine = create_async_engine(

app/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
database_config={"url": database_url},
4141
)
4242

43+
# Storage directory for conversation files
4344
storage_dir = Path(os.getenv("STORAGE_PATH", "./data"))
4445
storage_dir.mkdir(parents=True, exist_ok=True)
4546

0 commit comments

Comments
 (0)