Skip to content

Conversation

@PttCodingMan
Copy link
Member

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.py to 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 versions holds a single version string now. Consider renaming it to remote_version for clarity.
            versions = response.text.split('=')[1].strip().strip('"')

src/api_ptt.py:101

  • Changing index default from 0 to None alters the API contract. Ensure downstream logic handles None correctly 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__":
Copy link

Copilot AI Jul 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@PttCodingMan PttCodingMan merged commit 5162d58 into main Jul 15, 2025
1 check passed
@PttCodingMan PttCodingMan deleted the feat/support-docker branch July 15, 2025 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants