-
Notifications
You must be signed in to change notification settings - Fork 6
workflow system working #1
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
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
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
No description provided.