Skip to content

Develop#77

Merged
BytecodeBrewer merged 32 commits into
mainfrom
develop
Jul 7, 2026
Merged

Develop#77
BytecodeBrewer merged 32 commits into
mainfrom
develop

Conversation

@BytecodeBrewer

@BytecodeBrewer BytecodeBrewer commented Jul 7, 2026

Copy link
Copy Markdown
Owner

What changed?

  • develop is synced with main

Related issue

Tests

  • I ran pytest
  • Existing tests pass
  • I added or updated tests where necessary
  • Not needed because this only affects documentation or repository setup

Checklist

  • The change is focused
  • No secrets or API keys are included
  • Documentation was updated if needed
  • CI is expected to pass

Notes

@BytecodeBrewer BytecodeBrewer merged commit 6a016d0 into main Jul 7, 2026
6 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8e563e771f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/argus/gui/app.py
import pandas as pd
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
from argus.analytics.charts.trend_chart import create_trendchart
from argus.services.market_data_service import prepare_trend_analysis

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Import trend analysis from the new service

market_data_service only exports get_market_data; the prepare_trend_analysis function added in this commit lives in argus.services.trend_analysis_service. Importing argus.gui.app now raises ImportError, and main.py imports this module at startup, so the GUI cannot launch in any environment until this import is corrected.

Useful? React with 👍 / 👎.

Comment thread src/argus/gui/app.py
Comment on lines +89 to +90
df = pd.DataFrame()
fig = prepare_trend_analysis(df)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Pass a MarketDataRequest into trend analysis

After the import is corrected, clicking the Trend button still calls the new prepare_trend_analysis API with only an empty DataFrame, but the service signature is prepare_trend_analysis(db, request). This path will raise TypeError instead of fetching market data, so construct and pass the database path plus a MarketDataRequest rather than the placeholder DataFrame.

Useful? React with 👍 / 👎.

Comment on lines +32 to +33
df = response.bars.copy()
df = add_daily_percentage_change(df)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Map bars to the columns used by trend metrics

Successful get_market_data responses now carry the normalized price-bar schema (timestamp, close, etc.), but the existing metric/chart helpers still read df['rate'] and later df['date']. Any successful trend analysis therefore raises KeyError before charting; map close/timestamp to the expected names or update the metrics and chart to consume the new schema before calling them.

Useful? React with 👍 / 👎.

Comment on lines +281 to +283
WHERE data_sources.name = ?
AND instruments.symbol = ?
AND price_bars.timestamp BETWEEN ? AND ?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include timeframe in cached bar lookups

The cache lookup filters only source, instrument, and date range, while get_market_data treats any non-empty result as a storage hit. If daily bars were cached and a later request asks for 1h or 15m over the same dates, this query returns the daily rows and skips the client fetch, producing results at the wrong granularity; persist and filter the requested timeframe or bypass the cache when it differs.

Useful? React with 👍 / 👎.

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