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

dotenv compatibility #3092

Merged
merged 1 commit into from
Nov 29, 2023
Merged

dotenv compatibility #3092

merged 1 commit into from
Nov 29, 2023

Conversation

jdangerx
Copy link
Member

@jdangerx jdangerx commented Nov 28, 2023

When I tried to run make docs-build, I would get a validation error from PudlPaths():

exception: 1 validation error for PudlPaths                                                                                                       
dagster_home                                                                                                                    
  Extra inputs are not permitted [type=extra_forbidden, input_value='/Users/dazhong-catalyst/work/dagster_home', input_type=str]
    For further information visit https://errors.pydantic.dev/2.5/v/extra_forbidden

This happened because my pudl/.env file contains:

PUDL_OUTPUT=/Users/dazhong-catalyst/pudl_workspace/output
PUDL_INPUT=/Users/dazhong-catalyst/pudl_workspace/data
DAGSTER_HOME=/Users/dazhong-catalyst/work/dagster_home

At the bottom of the dotenv section of the Pydantic docs, they suggest

For compatibility with pydantic 1.x BaseSettings you should use extra=ignore:

So I did that.

Then I tried running make docs-build and it didn't throw that error anymore. Huzzah.

@jdangerx jdangerx changed the base branch from main to dev November 28, 2023 20:13
Copy link

codecov bot commented Nov 28, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9b8cfb2) 88.7% compared to head (45d9356) 88.7%.
Report is 1 commits behind head on dev.

Additional details and impacted files
@@          Coverage Diff          @@
##             dev   #3092   +/-   ##
=====================================
  Coverage   88.7%   88.7%           
=====================================
  Files         89      89           
  Lines      11018   11018           
=====================================
+ Hits        9778    9780    +2     
+ Misses      1240    1238    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jdangerx jdangerx merged commit 4fc35e7 into dev Nov 29, 2023
12 checks passed
@jdangerx jdangerx deleted the dotenv-compat branch November 29, 2023 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants