Skip to content

Implement first storage layer#74

Merged
BytecodeBrewer merged 19 commits into
developfrom
implement-first-storage-layer
Jul 1, 2026
Merged

Implement first storage layer#74
BytecodeBrewer merged 19 commits into
developfrom
implement-first-storage-layer

Conversation

@BytecodeBrewer

Copy link
Copy Markdown
Owner

What changed?

  • add duckdb
  • add tests for the storage layer
  • updated docs files and readme

Related issue

Closes #38

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 b3c20d3 into develop Jul 1, 2026
7 of 8 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: 90e11de118

ℹ️ 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".

id INTEGER PRIMARY KEY DEFAULT nextval('price_bars_id_seq'),
source_id INTEGER NOT NULL,
instrument_id INTEGER NOT NULL,
timestamp DATE NOT NULL,

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 Preserve time precision for price bars

When this storage layer is used for non-daily data, such as the existing yfinance paths that accept "1h" and "15m" intervals, storing timestamp as DATE drops the time component. Because the uniqueness key includes this truncated value and insert_price_bar uses ON CONFLICT DO NOTHING, multiple intraday bars for the same source/instrument/day/timeframe collide and all but the first are silently skipped, corrupting the stored series; use a timestamp-capable type or reject intraday timeframes before insert.

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