-
Notifications
You must be signed in to change notification settings - Fork 27
1001-migrate-memu-server #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
e773f5c
feat: migrate to memu-server with complete setup
SparkZou f909115
fix: correct GitHub Actions workflow to use uv run
SparkZou 2468143
refactor: improve configuration security and add enhanced linting
SparkZou a267df6
feat: add automated Alembic migration validation
SparkZou 3a9ba57
feat: add configuration file credential scanning
SparkZou 6d85ca6
feat: enable import sorting and modernize type annotations
SparkZou 11ed6ae
feat: add test coverage checks and env validation tests
SparkZou a7e377d
fix: use uv sync for PEP 735 dependency groups
SparkZou 5dc6edf
fix: replace hardcoded credentials with env vars in docker-compose
SparkZou 8b02d16
fix: correct markdown code fence formatting in README
SparkZou af3f0ed
fix: remove hardcoded database credentials from Python code
SparkZou File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # =================================== | ||
| # Database Configuration | ||
| # =================================== | ||
| # For docker-compose | ||
| POSTGRES_USER=memu_user | ||
| POSTGRES_PASSWORD=memu_pass | ||
| POSTGRES_DB=memu_db | ||
|
|
||
| # For application | ||
| DATABASE_HOST=localhost | ||
| DATABASE_PORT=54320 | ||
| DATABASE_USER=memu_user | ||
| DATABASE_PASSWORD=memu_pass | ||
| DATABASE_NAME=memu_db | ||
|
|
||
| # =================================== | ||
| # Temporal Configuration | ||
| # =================================== | ||
| TEMPORAL_HOST=localhost | ||
| TEMPORAL_PORT=17233 | ||
| TEMPORAL_NAMESPACE=default | ||
|
|
||
| # =================================== | ||
| # LLM Configuration | ||
| # =================================== | ||
| OPENAI_API_KEY=your_openai_api_key_here | ||
| OPENAI_BASE_URL=https://api.openai.com/v1 | ||
| DEFAULT_LLM_MODEL=gpt-4o-mini | ||
|
|
||
| # =================================== | ||
| # Embedding Configuration | ||
| # =================================== | ||
| EMBEDDING_API_KEY=your_embedding_api_key_here | ||
| EMBEDDING_BASE_URL=https://api.voyageai.com/v1 | ||
| EMBEDDING_MODEL=voyage-3.5-lite | ||
|
|
||
| # =================================== | ||
| # Storage Configuration | ||
| # =================================== | ||
| STORAGE_PATH=/var/data/memu-server |
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| name: Code Quality | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main, develop, 'feature/**' ] | ||
| pull_request: | ||
| branches: [ main, develop ] | ||
|
|
||
| jobs: | ||
| quality-check: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: ["3.13"] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
|
|
||
| - name: Install uv | ||
| run: | | ||
| curl -LsSf https://astral.sh/uv/install.sh | sh | ||
| echo "$HOME/.local/bin" >> $GITHUB_PATH | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| uv venv | ||
| uv sync | ||
|
|
||
| - name: Check code formatting | ||
| run: | | ||
| uv run ruff format --check . | ||
|
|
||
| - name: Lint code | ||
| run: | | ||
| uv run ruff check . | ||
|
|
||
| - name: Run tests | ||
| run: | | ||
| uv run pytest -v --cov=app --cov-report=xml --cov-report=term | ||
|
|
||
| - name: Upload coverage reports | ||
| if: matrix.python-version == '3.13' | ||
| uses: codecov/codecov-action@v4 | ||
| with: | ||
| file: ./coverage.xml | ||
| fail_ci_if_error: false | ||
| env: | ||
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CI workflow runs tests (line 43) but doesn't set up the required environment variables (OPENAI_API_KEY, DATABASE_URL) that are validated in app/main.py. The tests will fail during CI because the app module import will raise a RuntimeError when these environment variables are missing. Add environment variable configuration to the workflow or mock them in the test setup.