Refactor project structure "api"

This commit is contained in:
2025-10-09 14:25:58 +02:00
parent 517842c834
commit 07b2588656
35 changed files with 48 additions and 47 deletions

View File

@@ -1,7 +1,7 @@
import pytest
from app.agents import AppModels
from app.agents.predictor import PREDICTOR_INSTRUCTIONS, PredictorInput, PredictorOutput, PredictorStyle
from app.base.markets import ProductInfo
from app.api.base.markets import ProductInfo
def unified_checks(model: AppModels, input: PredictorInput) -> None:
llm = model.get_agent(PREDICTOR_INSTRUCTIONS, output_schema=PredictorOutput) # type: ignore[arg-type]

View File

@@ -1,5 +1,5 @@
import pytest
from app.markets.binance import BinanceWrapper
from app.api.markets.binance import BinanceWrapper
@pytest.mark.market
@pytest.mark.api

View File

@@ -1,6 +1,6 @@
import os
import pytest
from app.markets import CoinBaseWrapper
from app.api.markets import CoinBaseWrapper
@pytest.mark.market
@pytest.mark.api

View File

@@ -1,6 +1,6 @@
import os
import pytest
from app.markets import CryptoCompareWrapper
from app.api.markets import CryptoCompareWrapper
@pytest.mark.market
@pytest.mark.api

View File

@@ -1,6 +1,6 @@
import os
import pytest
from app.news import CryptoPanicWrapper
from app.api.news import CryptoPanicWrapper
@pytest.mark.limited

View File

@@ -1,5 +1,5 @@
import pytest
from app.news import DuckDuckGoWrapper
from app.api.news import DuckDuckGoWrapper
@pytest.mark.news

View File

@@ -1,5 +1,5 @@
import pytest
from app.news import GoogleNewsWrapper
from app.api.news import GoogleNewsWrapper
@pytest.mark.news

View File

@@ -1,6 +1,6 @@
import os
import pytest
from app.news import NewsApiWrapper
from app.api.news import NewsApiWrapper
@pytest.mark.news

View File

@@ -1,6 +1,6 @@
import os
import pytest
from app.social.reddit import MAX_COMMENTS, RedditWrapper
from app.api.social.reddit import MAX_COMMENTS, RedditWrapper
@pytest.mark.social
@pytest.mark.api

View File

@@ -1,5 +1,5 @@
import pytest
from app.markets import YFinanceWrapper
from app.api.markets import YFinanceWrapper
@pytest.mark.market
@pytest.mark.api

View File

@@ -1,5 +1,5 @@
import pytest
from app.markets import MarketAPIsTool
from app.api.markets import MarketAPIsTool
@pytest.mark.tools

View File

@@ -1,5 +1,5 @@
import pytest
from app.news import NewsAPIsTool
from app.api.news import NewsAPIsTool
@pytest.mark.tools

View File

@@ -1,5 +1,5 @@
import pytest
from app.social import SocialAPIsTool
from app.api.social import SocialAPIsTool
@pytest.mark.tools
@@ -24,7 +24,7 @@ class TestSocialAPIsTool:
result = tool.wrapper_handler.try_call_all(lambda w: w.get_top_crypto_posts(limit=2))
assert isinstance(result, dict)
assert len(result.keys()) > 0
for provider, posts in result.items():
for _provider, posts in result.items():
for post in posts:
assert post.title is not None
assert post.time is not None

View File

@@ -1,6 +1,6 @@
import pytest
from datetime import datetime
from app.base.markets import ProductInfo, Price
from app.api.base.markets import ProductInfo, Price
from app.utils.market_aggregation import aggregate_history_prices, aggregate_product_info