Skip to content

[codex] Unify chart standards and add B3 monthly index data#16

Merged
robertoecf merged 2 commits into
mainfrom
codex/chart-contract-b3-monthly
May 12, 2026
Merged

[codex] Unify chart standards and add B3 monthly index data#16
robertoecf merged 2 commits into
mainfrom
codex/chart-contract-b3-monthly

Conversation

@robertoecf
Copy link
Copy Markdown
Owner

Summary

  • Unifies the repository chart contract around the Chart Lab visual/informational structure while keeping renderer choice flexible.
  • Adds B3 IndexStatisticsProxy monthly index evolution support for Ibovespa/B3 index charts via source wrapper, REST route, CLI command, docs, and mocked tests.
  • Updates Chart Lab metadata/technical line, color mapping, primary-source naming, and adds an Ibovespa monthly preset.

Root cause / context

Agents had conflicting guidance between AGENTS.md, docs/CHART_STANDARDS.md, and the live Chart Lab implementation: old chart docs used different colors, incomplete mandatory metadata, and ambiguous renderer guidance. Also, simple Selic vs Ibovespa prompts lacked a repo-exposed B3 monthly index wrapper.

Validation

  • .venv/bin/ruff format --check src/ tests/ scripts/
  • .venv/bin/ruff check src/ tests/ scripts/
  • .venv/bin/python -m mypy src/findata
  • .venv/bin/python -m pytest tests/ -q (230 passed, 16 deselected)
  • Live smoke: .venv/bin/findata b3 index-monthly IBOV --start 2026-01-01 --end 2026-05-11

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 12, 2026

Warning

Rate limit exceeded

@robertoecf has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 58 minutes and 10 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 703f498a-0cc6-4c1f-8b0f-1e76b2c9d7f8

📥 Commits

Reviewing files that changed from the base of the PR and between b244e50 and 5dcfdac.

📒 Files selected for processing (13)
  • AGENTS.md
  • README.md
  • docs/CHART_STANDARDS.md
  • docs/SOURCES_AND_ENDPOINTS.md
  • src/findata/api/app.py
  • src/findata/api/routers/b3.py
  • src/findata/cli.py
  • src/findata/sources/b3/__init__.py
  • src/findata/sources/b3/indices.py
  • src/findata/web/static/chart-explorer.js
  • src/findata/web/templates/charts.html
  • tests/test_api.py
  • tests/test_b3_cotahist_indices.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/chart-contract-b3-monthly

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@robertoecf robertoecf marked this pull request as ready for review May 12, 2026 00:34
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request establishes a comprehensive standard for financial chart generation within the project, introducing the 'Chart Lab' as the canonical reference for visual and informational structure. It updates documentation to mandate a 'minimum information contract'—including extraction timestamps, audit data paths, and specific color tokens—to ensure all charts are reproducible and auditable. On the implementation side, a new API endpoint and CLI command have been added to fetch monthly closing levels for B3 indices (e.g., IBOV) using the IndexStatisticsProxy. The web-based chart explorer was also updated with new presets and enhanced technical metadata in the footer. Feedback was provided regarding a potential edge-case crash in the date calculation logic for historical windows.

Comment thread src/findata/sources/b3/indices.py
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@robertoecf robertoecf merged commit 10f2845 into main May 12, 2026
1 of 5 checks passed
@robertoecf robertoecf deleted the codex/chart-contract-b3-monthly branch May 12, 2026 00:36
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