Skip to content

fix: guard zero-target data sampling#96

Open
rupurt wants to merge 1 commit into
TexasCoding:mainfrom
rupurt:codex/guard-zero-target-sampling
Open

fix: guard zero-target data sampling#96
rupurt wants to merge 1 commit into
TexasCoding:mainfrom
rupurt:codex/guard-zero-target-sampling

Conversation

@rupurt

@rupurt rupurt commented Jul 7, 2026

Copy link
Copy Markdown

Summary

  • guard realtime data sampling when max_bars_per_timeframe produces a zero target
  • preserve the latest bar for single-bar buffer limits
  • add a regression test for single-bar sampling

Tests

  • uv run pytest tests/realtime_data_manager/test_memory_management.py
  • uv run pytest tests/realtime_data_manager/test_memory_management.py tests/realtime_data_manager/test_data_processing.py
  • uv run ruff check src/project_x_py/realtime_data_manager/memory_management.py tests/realtime_data_manager/test_memory_management.py
  • uv run mypy src/

Note: full uv run ruff check . still reports pre-existing unrelated lint in scripts and old tests.

rupurt added a commit to rupurt/project-x-py that referenced this pull request Jul 7, 2026
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