-
Notifications
You must be signed in to change notification settings - Fork 0
ci: Enhance CI #422
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
ci: Enhance CI #422
Conversation
Introduces a check to compare the current Git ref name with the package version defined in `pyproject.toml`. Skips the `uv version` command, auto-commit, and tag update steps if the Git ref name already matches the `pyproject.toml` version. This avoids unnecessary modifications to the repository and redundant tag pushes when the version is already correctly set.
|
Review these changes at https://app.gitnotebooks.com/AlphaSphereDotAI/chattr/pull/422 |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Reviewer's GuideThis PR significantly enhances the CI/CD pipelines and refactors the core application setup, improving error handling, configurability, and developer ergonomics across the builder, settings, Dockerfile, workflows, and project scaffolding. Sequence diagram for improved error handling in App.create()sequenceDiagram
participant App
participant MCPClient
participant Logger
App->>Logger: Set settings
App->>MCPClient: Read MCP config file
alt File read error
MCPClient-->>Logger: OSError
Logger-->>App: Log warning
else JSON parse error
MCPClient-->>Logger: ValueError/TypeError
Logger-->>App: Log warning
else Other error
MCPClient-->>Logger: Exception
Logger-->>App: Log warning
end
App->>App: Setup LLM
App->>App: Bind tools
App->>App: Setup memory
App->>App: Setup graph
App-->>App: Return instance
Entity relationship diagram for new/modified settings and directory structureerDiagram
DIRECTORY_SETTINGS ||--o| LOG_DIRECTORY : contains
DIRECTORY_SETTINGS ||--o| ASSETS_DIRECTORY : contains
ASSETS_DIRECTORY ||--o| AUDIO_DIRECTORY : contains
ASSETS_DIRECTORY ||--o| PROMPTS_DIRECTORY : contains
MCP_SETTINGS ||--|{ MCP_CONFIG_FILE : references
MODEL_SETTINGS {
url AnyUrl
name string
api_key SecretStr
temperature float
}
DIRECTORY_SETTINGS {
base DirectoryPath
assets DirectoryPath
log DirectoryPath
audio DirectoryPath
prompts DirectoryPath
}
MCP_SETTINGS {
path FilePath
}
Class diagram for refactored App and Settings classesclassDiagram
class App {
+Settings settings
+ChatOpenAI _llm
+Runnable _model
+list[BaseTool] _tools
+Memory _memory
+CompiledStateGraph _graph
+async create(settings: Settings) Self
+_setup_graph() CompiledStateGraph
+_setup_llm() ChatOpenAI
+async _setup_memory() Memory
+async _setup_tools(_mcp_client: MultiServerMCPClient) list[BaseTool]
+draw_graph() None
+gui() Blocks
+async generate_response(message: str, history: list[ChatMessage]) AsyncGenerator[tuple[str, list[ChatMessage], Path|None, Path|None]]
+_is_url(value: str|None) bool
+_download_file(url: HttpUrl, path: Path) None
}
class Settings {
+MemorySettings memory
+VectorDatabaseSettings vector_database
+MCPSettings mcp
+DirectorySettings directory
+ModelSettings model
+logger
}
class MemorySettings {
+collection_name: str
+embedding_dims: int
}
class VectorDatabaseSettings {
+url: AnyUrl
+name: str
}
class MCPSettings {
+path: FilePath
+create_init_mcp() Self
+is_valid() Self
}
class DirectorySettings {
+base: DirectoryPath
+assets: DirectoryPath
+log: DirectoryPath
+audio: DirectoryPath
+prompts: DirectoryPath
+create_missing_dirs() Self
}
class ModelSettings {
+url: AnyUrl
+name: str
+api_key: SecretStr
+temperature: float
+check_api_key_exist() Self
}
App --> Settings
Settings --> MemorySettings
Settings --> VectorDatabaseSettings
Settings --> MCPSettings
Settings --> DirectorySettings
Settings --> ModelSettings
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Summary of ChangesHello @MH0386, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the project's continuous integration and development experience by migrating from Highlights
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
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.
|
Here's the code health analysis summary for commits Analysis Summary
|
|
🧪 CI InsightsHere's what we observed from your CI run for bb19a43. 🟢 All jobs passed!But CI Insights is watching 👀 |
🔍 Vulnerabilities of
|
| digest | sha256:608d16d653d3cfc33c8175ed83ddace15b8cf281fce8d7514b0de6112ba14057 |
| vulnerabilities | |
| platform | linux/amd64 |
| size | 325 MB |
| packages | 500 |
# Dockerfile (30:30)
COPY --from=builder --chown=nonroot:nonroot --chmod=555 /home/nonroot/.local/ /home/nonroot/.local/
Description
| ||||||||||||
# Dockerfile (30:30)
COPY --from=builder --chown=nonroot:nonroot --chmod=555 /home/nonroot/.local/ /home/nonroot/.local/
Description
| ||||||||||||
# Dockerfile (30:30)
COPY --from=builder --chown=nonroot:nonroot --chmod=555 /home/nonroot/.local/ /home/nonroot/.local/
Description
|
|
Thank you for your contribution @MH0386! Your pull request has been merged. |



Summary by Sourcery
Enhance CI workflows and refactor core application startup and configuration to improve flexibility, error handling, and developer experience
New Features:
Enhancements:
Build:
CI:
Documentation:
Tests: