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

Handle pydantic ValidationError reading .env #4456

Merged
merged 4 commits into from
Mar 10, 2023
Merged

Conversation

montezdesousa
Copy link
Contributor

@montezdesousa montezdesousa commented Mar 10, 2023

Description

Write wrong types for .env variables with values that can't be casted by pydantic:

  • PLOT_WIDTH and REQUEST_TIMEOUT have PositiveInt type

Screenshot 2023-03-10 at 17 49 57

Output:
Screenshot 2023-03-10 at 17 55 02

  • Summary of the change / bug fix.
  • Link # issue, if applicable.
  • Screenshot of the feature or the bug before/after fix, if applicable.
  • Relevant motivation and context.
  • List any dependencies that are required for this change.

How has this been tested?

  • Please describe the tests that you ran to verify your changes.
  • Provide instructions so we can reproduce.
  • Please also list any relevant details for your test configuration.
  • Make sure affected commands still run in terminal
  • Ensure the SDK still works
  • Check any related reports

Checklist:

Others

  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.

@montezdesousa montezdesousa added the bug Fix bug label Mar 10, 2023
@reviewpad reviewpad bot added the feat XS Extra small feature label Mar 10, 2023
@codecov
Copy link

codecov bot commented Mar 10, 2023

Codecov Report

❗ No coverage uploaded for pull request base (develop@fea616e). Click here to learn what that means.
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #4456   +/-   ##
==========================================
  Coverage           ?   54.72%           
==========================================
  Files              ?      596           
  Lines              ?    53638           
  Branches           ?        0           
==========================================
  Hits               ?    29354           
  Misses             ?    24284           
  Partials           ?        0           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Chavithra Chavithra added this pull request to the merge queue Mar 10, 2023
Merged via the queue into develop with commit bea21df Mar 10, 2023
@montezdesousa montezdesousa deleted the hotfix/handle_bad_env branch March 13, 2023 15:53
jmaslek pushed a commit that referenced this pull request Apr 13, 2023
* move tradier to data providers

* handle env load errors

* improve message

* detail model in message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fix bug feat XS Extra small feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants