-
Notifications
You must be signed in to change notification settings - Fork 256
feat: deps cleanup, format→audio_format rename, argparse CLI, CI pipeline, tests #74
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
Open
alfonsodg
wants to merge
4
commits into
MiniMax-AI:main
Choose a base branch
from
alfonsodg:feat/enhancements-65-67-71
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
a8b83a3
feat: add CLI arguments support
alfonsodg 7dd4efe
Merge remote-tracking branch 'upstream/main'
alfonsodg 63cfabd
fix(server): resolve bugs #61-#69 — timeout, file leak, validation, p…
alfonsodg 489ca5e
feat: enhancements #65 #67 #71 — deps cleanup, format rename, argpars…
alfonsodg 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,27 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [main] | ||
|
|
||
| jobs: | ||
| lint-and-test: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: ["3.10", "3.12"] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - name: Install dependencies | ||
| run: pip install -e ".[dev]" | ||
| - name: Lint | ||
| run: ruff check minimax_mcp/ | ||
| - name: Format check | ||
| run: ruff format --check minimax_mcp/ | ||
| - name: Tests | ||
| run: pytest tests/ -v |
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,46 @@ | ||
| # Development Standards | ||
|
|
||
| ## Language and Runtime | ||
|
|
||
| - Python >= 3.10 | ||
| - Package manager: `uv` (preferred) or `pip` | ||
| - Dependencies declared in `pyproject.toml` | ||
|
|
||
| ## Code Quality | ||
|
|
||
| - Linter/formatter: `ruff` | ||
| - Run before commit: `ruff check minimax_mcp/` and `ruff format minimax_mcp/` | ||
| - No shadowing of Python builtins (`format`, `type`, `id`, etc.) | ||
| - All `requests.get()` / HTTP calls must include explicit `timeout` | ||
| - File I/O must use context managers (`with open(...)`) | ||
|
|
||
| ## Testing | ||
|
|
||
| - Framework: `pytest` with `pytest-cov` | ||
| - Test directory: `tests/` | ||
| - Run: `pytest tests/ -v` | ||
| - Coverage report: `pytest --cov=minimax_mcp --cov-report=term-missing` | ||
|
|
||
| ## Git | ||
|
|
||
| - Conventional commits: `<type>(<scope>): <subject>` | ||
| - Types: `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore` | ||
| - Every commit references an issue when applicable | ||
|
|
||
| ## CI/CD | ||
|
|
||
| - GitHub Actions on push/PR to `main` | ||
| - Pipeline: ruff check → ruff format → pytest | ||
| - Matrix: Python 3.10, 3.12 | ||
|
|
||
| ## API Client | ||
|
|
||
| - All API requests go through `MinimaxAPIClient` (`client.py`) | ||
| - Default timeout: `REQUEST_TIMEOUT` (30s) for API calls | ||
| - Default timeout: `DOWNLOAD_TIMEOUT` (120s) for file downloads | ||
| - Input parameters validated before API calls to avoid wasting credits | ||
|
|
||
| ## Constants | ||
|
|
||
| - All defaults and valid ranges defined in `const.py` | ||
| - No magic numbers in tool functions |
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 |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| """Minimax MCP Server package.""" | ||
|
|
||
| __version__ = "0.0.17" | ||
| __version__ = "0.0.18" |
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
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.
VALID_AUDIO_FORMATSis used to validateaudio_format, but it currently excludes"wav"whilemusic_generation's documented supported formats include WAV. This will cause previously-acceptedaudio_format="wav"inputs to start raisingMinimaxRequestError. Either add"wav"to the allowed set (if the API supports it) or tighten the docstring/tool args to match the enforced set, ideally using separate allowed-format sets per endpoint if they differ.