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

HOS-93: add support for .env file #4219

Merged
merged 5 commits into from
Oct 22, 2024
Merged

HOS-93: add support for .env file #4219

merged 5 commits into from
Oct 22, 2024

Conversation

Kastier1
Copy link
Contributor

All Submissions:

  • Have you followed the guidelines stated in CONTRIBUTING.md file?
  • Have you checked to ensure there aren't any other open Pull Requests for the desired changed?

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

New Feature Submission:

  • Does your submission pass the tests?
  • Have you linted your code locally prior to submission?

Changes To Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

After these steps, you're ready to open a pull request.

a. Give a descriptive title to your PR.

b. Describe your changes.

c. Put `closes #XXXX` in your comment to auto-close the issue that your PR fixes (if such).

Copy link

linear bot commented Oct 22, 2024

HOS-93 Add .env file

Copy link
Collaborator

@masenf masenf left a comment

Choose a reason for hiding this comment

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

so in this case, if the env_file is specified, then it overrides values defined in the environment already? is there any "automatic" env file? or is it only loaded if the user explicitly sets one?


remove stray print, merge from main, relock dependencies

@Kastier1
Copy link
Contributor Author

There is no automatic env file. If they do no supply one we do nothing. If they do we use those values over what is in their env already.

@Kastier1 Kastier1 requested a review from masenf October 22, 2024 19:05
masenf
masenf previously approved these changes Oct 22, 2024
Copy link
Collaborator

@masenf masenf left a comment

Choose a reason for hiding this comment

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

looks good

reflex/config.py Outdated Show resolved Hide resolved
@Kastier1 Kastier1 merged commit 227fb2c into main Oct 22, 2024
31 checks passed
@benedikt-bartscher
Copy link
Contributor

Could we make the python-dotenv dependency optional?

@Kastier1
Copy link
Contributor Author

Is there any reason in particular to make it optional?

python-dotenv is a small package with no other deps

We are looking into making this optional but was curious as to why you wanted this

Kastier1 added a commit that referenced this pull request Oct 23, 2024
* HOS-93: add support for .env file

* HOS-93: remove stray print

* HOS-93: poetry lock

* HOS-93: update comment

---------

Co-authored-by: simon <simon@reflex.dev>
@benedikt-bartscher
Copy link
Contributor

Just trying to keep the list short in general. You're right, it's a rather small package, but it still needs to be maintained, updated, license reviewed etc. And it could (for some stupid reason) introduce other dependencies in the future.
In general, i prefer to make dependencies optional if they are not tightly coupled with the code.

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.

3 participants