Skip to content

Conversation

@DavidLMS
Copy link
Owner

@DavidLMS DavidLMS commented Jul 1, 2025

No description provided.

@DavidLMS DavidLMS requested a review from Copilot July 1, 2025 23:01

This comment was marked as outdated.

@DavidLMS DavidLMS requested a review from Copilot July 1, 2025 23:17

This comment was marked as outdated.

DavidLMS and others added 3 commits July 2, 2025 01:20
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@DavidLMS DavidLMS requested a review from Copilot July 1, 2025 23:21
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

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 ArticleWorkflow under aphra/workflows/ and refactor translate.py to use the global registry
  • Enhance gradio-demo.py with 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_client and parsers, but these are still exported in aphra/__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 under aphra/workflows/ and aphra/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 an aphra/prompts/articles directory. Either move the prompt files into an articles subfolder or adjust this path back to prompts/.
        ref = resources.files(__package__) / 'prompts' / 'articles' / file_name

@DavidLMS DavidLMS merged commit a1880d9 into main Jul 1, 2025
4 checks passed
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.

1 participant