Refactor project structure to organize APIs #24

Merged
Berack96 merged 4 commits from api-modules into main 2025-10-11 21:36:13 +02:00
Berack96 commented 2025-10-09 14:27:34 +02:00 (Migrated from github.com)

Restructure the project to place all external APIs under a dedicated "api" directory, improving code organization and clarity. This change enhances maintainability and accessibility of the API-related components.

Restructure the project to place all external APIs under a dedicated "api" directory, improving code organization and clarity. This change enhances maintainability and accessibility of the API-related components.
copilot-pull-request-reviewer[bot] (Migrated from github.com) reviewed 2025-10-09 14:27:50 +02:00
copilot-pull-request-reviewer[bot] (Migrated from github.com) left a comment

Pull Request Overview

This PR restructures the project to organize all external APIs under a dedicated app/api directory, moving the existing modules from their previous locations (e.g., app.markets, app.news, app.social) to the new structure (app.api.markets, app.api.news, app.api.social).

  • Updated all import statements across test files and source code to reflect the new API directory structure
  • Renamed an unused variable in test code to follow Python naming conventions
  • Updated project documentation to reflect the new directory structure

Reviewed Changes

Copilot reviewed 31 out of 35 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/utils/test_market_aggregator.py Updated import path for ProductInfo and Price classes
tests/tools/test_socials_tool.py Updated import path for SocialAPIsTool and renamed unused variable
tests/tools/test_news_tool.py Updated import path for NewsAPIsTool
tests/tools/test_market_tool.py Updated import path for MarketAPIsTool
tests/api/*.py Updated import paths for all API wrapper classes
tests/agents/test_predictor.py Updated import path for ProductInfo
src/app/utils/market_aggregation.py Updated import paths for market data types
src/app/api/*/*.py Updated internal imports to reflect new directory structure
src/app/agents/*.py Updated import paths for API tools and market types
README.md Updated documentation to reflect new directory structure and command syntax

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

## Pull Request Overview This PR restructures the project to organize all external APIs under a dedicated `app/api` directory, moving the existing modules from their previous locations (e.g., `app.markets`, `app.news`, `app.social`) to the new structure (`app.api.markets`, `app.api.news`, `app.api.social`). - Updated all import statements across test files and source code to reflect the new API directory structure - Renamed an unused variable in test code to follow Python naming conventions - Updated project documentation to reflect the new directory structure ### Reviewed Changes Copilot reviewed 31 out of 35 changed files in this pull request and generated no comments. <details> <summary>Show a summary per file</summary> | File | Description | | ---- | ----------- | | tests/utils/test_market_aggregator.py | Updated import path for ProductInfo and Price classes | | tests/tools/test_socials_tool.py | Updated import path for SocialAPIsTool and renamed unused variable | | tests/tools/test_news_tool.py | Updated import path for NewsAPIsTool | | tests/tools/test_market_tool.py | Updated import path for MarketAPIsTool | | tests/api/*.py | Updated import paths for all API wrapper classes | | tests/agents/test_predictor.py | Updated import path for ProductInfo | | src/app/utils/market_aggregation.py | Updated import paths for market data types | | src/app/api/*/\*.py | Updated internal imports to reflect new directory structure | | src/app/agents/*.py | Updated import paths for API tools and market types | | README.md | Updated documentation to reflect new directory structure and command syntax | </details> --- <sub>**Tip:** Customize your code reviews with copilot-instructions.md. <a href="/Berack96/upo-appAI/new/main/.github?filename=copilot-instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Create the file</a> or <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">learn how to get started</a>.</sub>
copilot-pull-request-reviewer[bot] (Migrated from github.com) reviewed 2025-10-09 23:37:38 +02:00
copilot-pull-request-reviewer[bot] (Migrated from github.com) left a comment

Pull Request Overview

Copilot reviewed 34 out of 39 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

## Pull Request Overview Copilot reviewed 34 out of 39 changed files in this pull request and generated 1 comment. --- <sub>**Tip:** Customize your code reviews with copilot-instructions.md. <a href="/Berack96/upo-appAI/new/main/.github?filename=copilot-instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Create the file</a> or <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">learn how to get started</a>.</sub>
@@ -88,3 +88,3 @@
```sh
uv run python src/app
uv run src/app
```
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2025-10-09 23:37:38 +02:00

The updated command uv run src/app may not work correctly. The previous command uv run python src/app explicitly specifies the Python interpreter, which is typically required for running Python modules. Verify that this simplified command works in your environment.

uv run python src/app
The updated command `uv run src/app` may not work correctly. The previous command `uv run python src/app` explicitly specifies the Python interpreter, which is typically required for running Python modules. Verify that this simplified command works in your environment. ```suggestion uv run python src/app ```
Sign in to join this conversation.