mirror of
https://github.com/langgenius/dify-plugin-sdks.git
synced 2026-07-21 18:05:30 -04:00
[PR #72] [MERGED] ci(python): Add CI Pipeline for Python SDK #122
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/langgenius/dify-plugin-sdks/pull/72
Author: @QuantumGhost
Created: 3/25/2025
Status: ✅ Merged
Merged: 4/14/2025
Merged by: @Yeuoly
Base:
main← Head:feat/ci📝 Commits (10+)
3f0ca88chore(python): temporarily disableUP007rule in Ruff8eec484ci(python): add lint and test for Python SDKb117b43ci: Add mega-linterd5e5ef1chore(python): Add final newline to markdown filesb819ccffix(python): Fix linter issues by using ruff's auto fix37b5760fix(python): Fix TRY400 linter violations9ba279cfix(python): fix ruff linter violationsd08ded8test(python): Add Test cases for LLM entities21af0c9test(python): Add test forAgentModelConfiga7a9d46chore(python): output diffs in Ruff's format check📊 Changes
42 files changed (+388 additions, -81 deletions)
View changed files
➕
.github/workflows/mega-linter.yaml(+84 -0)➕
.github/workflows/pull-request.yaml(+51 -0)📝
.github/workflows/pypi_publish.yaml(+4 -0)➕
.mega-linter.yml(+23 -0)📝
python/.ruff.toml(+6 -0)📝
python/LICENSE(+1 -1)📝
python/dify_plugin/__init__.py(+14 -14)📝
python/dify_plugin/core/plugin_executor.py(+1 -1)📝
python/dify_plugin/core/plugin_registration.py(+2 -2)📝
python/dify_plugin/core/runtime.py(+1 -1)📝
python/dify_plugin/core/server/__base/request_reader.py(+20 -19)📝
python/dify_plugin/core/server/serverless/request_reader.py(+3 -2)📝
python/dify_plugin/core/server/stdio/request_reader.py(+1 -1)📝
python/dify_plugin/core/server/tcp/request_reader.py(+7 -7)📝
python/dify_plugin/entities/agent.py(+1 -1)📝
python/dify_plugin/entities/endpoint.py(+1 -1)📝
python/dify_plugin/entities/model/llm.py(+2 -0)📝
python/dify_plugin/entities/model/message.py(+1 -1)📝
python/dify_plugin/entities/tool.py(+1 -1)📝
python/dify_plugin/interfaces/agent/__init__.py(+1 -1)...and 22 more files
📄 Description
This PR introduces a CI pipeline for the Python SDK, along with some enhancements and adjustments:
Adjust Ruff Linting Rules
Temporarily disable
UP007due to the significant number of existingviolations in the codebase.
Addressing all occurrences at once would require extensive changes.
Integrate MegaLinter
Configure MegaLinter to validate bash scripts and GitHub Actions
for better code quality and consistency across project-related files.
Add CI Pipeline for Python SDK
Set up a CI pipeline that includes Ruff linting, code formatting checks,
and unit tests to help ensure the Python SDK adheres to consistent coding
standards and remains free from common issues.
Add Additional Tests for Python SDK
Introduce unit tests for
AgentModelConfig,LLMResultChunk, andLLMResultto improve test coverage and ensure future changes to these entities do not
break user code.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.