Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
Restructure Aphra into a core/workflows architecture, implement a pluggable workflow system, update the Gradio demo to fetch models dynamically, and bump version to 2.0.0.
- Move context, LLM client, parsers, registry, and workflow base classes into
aphra/core/ - Add
ArticleWorkflowunderaphra/workflows/and refactortranslate.pyto use the global registry - Enhance
gradio-demo.pywith dynamic model discovery and update docs/configs to reflect the new architecture
Reviewed Changes
Copilot reviewed 20 out of 36 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_utils.py | Updated imports for TranslationContext and load_model_client |
| tests/test_parsers.py | Updated imports for parser functions |
| pyproject.toml | Bumped version to 2.0.0 |
| gradio-demo.py | Added model fetching, default selection logic |
| docs/aphra/translate.html | Cleaned out removed members and added workflow overview |
| docs/aphra/prompts.html | Updated code sample to new prompts/articles path |
| docs/aphra.html | Adjusted submodule list |
| README.md | Expanded architecture and extension sections |
| CONTRIBUTING.md | Updated contribution guidelines for workflows |
| config.example.toml | Updated default model names |
| aphra/workflows/article_workflow.py | New 5-step article workflow implementation |
| aphra/workflows/init.py | Export ArticleWorkflow |
| aphra/core/llm_client.py | Added enable_web_search and web_search_context options |
| aphra/core/context.py | Added metadata and intermediate result storage |
| aphra/core/workflow.py | Introduced AbstractWorkflow base class |
| aphra/core/registry.py | Global workflow registry and lookup |
| aphra/prompts.py | Refactored prompt loading to use importlib.resources |
| aphra/translate.py | Refactored to use core registry and pluggable workflows |
| aphra/core/init.py | Core module exports |
| aphra/init.py | Updated to expose core modules |
Comments suppressed due to low confidence (3)
docs/aphra.html:27
- The submodule list no longer includes links to
llm_clientandparsers, but these are still exported inaphra/__init__.py. Consider restoring those links so the docs reflect the package API.
<li><a href="aphra/translate.html">translate</a></li>
CONTRIBUTING.md:118
- The path
aphra/steps/does not exist—translation steps are organized underaphra/workflows/andaphra/core/. Update or remove this reference to avoid confusion.
- **Steps** (`aphra/steps/`): Individual translation operations that can be composed into workflows.
aphra/prompts.py:17
- The code now expects prompt templates under
prompts/articles/, but the repository doesn't include anaphra/prompts/articlesdirectory. Either move the prompt files into anarticlessubfolder or adjust this path back toprompts/.
ref = resources.files(__package__) / 'prompts' / 'articles' / file_name
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.