Skip to content

Set a provider's ohlc_mode in the config file - #154

Merged
stefan-jansen merged 5 commits into
ml4t:mainfrom
0x0f0f0f:feat/ohlc-mode-config
Nov 24, 2026
Merged

stefan-jansen merged 5 commits into
ml4t:mainfrom
0x0f0f0f:feat/ohlc-mode-config

Conversation

@0x0f0f0f

@0x0f0f0f 0x0f0f0f commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Closes #149.

Provider configuration accepts extra.ohlc_mode: strict, drop, or warn. ProviderManager removes this validation setting before constructing the provider, validates it, then applies it to the validation mixin. Omitting the option preserves strict validation. The configuration guide documents the setting.

The real update-all workflow now also exits unsuccessfully when any configured download fails, instead of printing a successful completion and returning zero. Other symbols can still finish. Missing symbol files and invalid dataset symbol configuration count as failures.

Verification at fdf5135e19b24d7dfcff05a9778b3619d9919d34:

  • Real YAML -> CLI -> Alpaca transformation -> on-disk storage regressions: on original main, 3 failed and 1 passed. Warn retains adjusted rows, drop removes the invalid row, strict rejects it, and an invalid setting fails before transport.
  • The two CLI failure cases separately failed on 1d76bf1 because rejected downloads returned exit zero. They pass with the exit-status repair.
  • Final config, CLI and DataManager unit checks: 61 passed with ResourceWarning treated as an error.
  • Ruff lint/format, ty and commit hooks passed.
  • Hosted complete-environment, installed-package, docs and ecosystem checks must pass on this exact final head before merge. The existing lockfile audit dependency is owned by fix(ci): restore documentation and dependency audit gates #147.

The original contributor commit cd82031 is preserved. Tests use deterministic HTTP responses through the actual public pipeline and storage, without live credentials. The original submission disclosed Claude Code assistance; maintainer regression tests and the CLI repair also used an AI coding agent.

0x0f0f0f and others added 4 commits November 21, 2026 15:37
Adjusted bars break low <= close <= high by rounding errors: Yahoo's
dividend-adjusted SPY by float noise, Alpaca's adjusted closes of serial
reverse-splitters by whole dollars. Strict validation then rejects the
whole download. ohlc_mode was settable only on a provider instance.
@stefan-jansen
stefan-jansen marked this pull request as ready for review November 24, 2026 20:16
@stefan-jansen
stefan-jansen merged commit 473f81c into ml4t:main Nov 24, 2026
33 checks passed
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.

[Feature]: Set a provider's ohlc_mode in the config file

2 participants