Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds Docker support by providing a Dockerfile, updating documentation and CI workflow for container builds, and refactoring version retrieval logic.
- Remove Python-dotenv usage in server startup
- Refactor
auto_version.pyto fetch versions from GitHub and simplify CI steps - Add Dockerfile and update GitHub Actions to build and push container images
Reviewed Changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/mcp_server.py | Removed dotenv import and .env loading |
| src/auto_version.py | Replaced PyPI API checks with raw GitHub fetch |
| src/api_ptt.py | Changed get_post parameter index default to None |
| src/_version.py | Bumped version from 0.2.0 to 0.3.0 |
| setup.py | Deleted setup script (packaging moved?) |
| README_ENG.md, README.md | Updated Quick Start to include Docker instructions |
| Dockerfile | Added container build instructions |
| .github/workflows/deploy.yml | Modified CI to build and push Docker images |
Comments suppressed due to low confidence (5)
src/auto_version.py:20
- [nitpick] The variable
versionsholds a single version string now. Consider renaming it toremote_versionfor clarity.
versions = response.text.split('=')[1].strip().strip('"')
src/api_ptt.py:101
- Changing
indexdefault from0toNonealters the API contract. Ensure downstream logic handlesNonecorrectly or update docs to reflect this behavior change.
index: Optional[int] = None,
Dockerfile:17
- [nitpick] Consider adding an
EXPOSE <port>instruction (if the server listens on a TCP port) and running as a non-root user for better security practice.
CMD ["python", "src/mcp_server.py"]
| print(remote_version) | ||
|
|
||
|
|
||
| if __name__ == "__main__": |
There was a problem hiding this comment.
The script guard is present but main() isn’t called inside it, so invoking python src/auto_version.py won’t execute any logic. Please add a call to main() under this guard.
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.
No description provided.