Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bugfix] - Lower case validator in standard models #6172

Merged
merged 6 commits into from
Mar 8, 2024

Conversation

montezdesousa
Copy link
Contributor

@montezdesousa montezdesousa commented Mar 6, 2024

  1. Why?

    • Allow users to send anycase inputs to case insensitive fields, like sort: Literal["asc", "desc"] should support "Asc"
  2. What?

    • Create to_lower validator to include standard model fields that can handle this feature
    • Renamed some upper_symbol validators to to_upper for consistency across files and future use cases besides symbol
  3. Impact:

    • If there are provider models that don't support lower case fields they will break, so I made sure only included literals or obvious non breaking fields like sort or period
  4. Testing Done:

    • Unittests

    • Gradually this should be extended to provider fields, but will keep this contained for this PR

@github-actions github-actions bot added bug Fix bug platform OpenBB Platform v4 PRs for v4 labels Mar 6, 2024
@montezdesousa montezdesousa marked this pull request as ready for review March 7, 2024 18:29
@montezdesousa montezdesousa added this pull request to the merge queue Mar 8, 2024
Merged via the queue into develop with commit 8f3d332 Mar 8, 2024
40 of 48 checks passed
@piiq piiq deleted the bugfix/lower_case_fields branch March 13, 2024 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fix bug platform OpenBB Platform v4 PRs for v4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants