-
Notifications
You must be signed in to change notification settings - Fork 33
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
Switch environment variables to .env
, and make direnv
optional
#28
Comments
Interesting! Reading the documentation, calling However, this is parsing is a bit difficult to do (see the Windows issue), and definitely not scalable (to a certain degree). I wonder instead if we should revise how we deal with environment variables. Maybe we have a @exfalsoquodlibet - tagging you for reference. Opinions welcome |
I think I'm going to go ahead and implement the above - this will be a breaking change. Main reasons are that it'll be easier for Windows users, PyCharm users, and any Unix users without Things to do (in case anyone gets there before I do!):
|
.env
, and make direnv
optional
Made an initial start on this in the |
Rebased the above branch up to version 1.2.2, but don't have time to finish this! Any help would be much appreciated. |
So what needs doing on this? I'm a bit lost :P |
@AndreasThinks I think all this needs are changes to the documentation, i.e.:
Might be some other bits, but should all be documentation-based. Fair warning, might need a rebase onto the latest @AndreasThinks - if you're happy to volunteer to write the docs, I can assist with the rebasing if you don't have the right privileges for this repo! |
@ESKYoung let me go try and muck in! So is "best-practice" with the current model for windows users to load the .secret and .env files using their relative path? I haven't done much contributing to projects on Github before and not read the contributing docs in detail... so not quite sure about how rebasing works...I was just going to do a fork with the some new docs and submit a pull request later! |
@AndreasThinks - with the changes I've suggest, yes it'll be loading it in. Relative path will be more maintainable, especially if there are collaborators in the project. I believe @Jacobb164 has made some changes to the branch now, that may cover most (if not all) the remaining tasks! Will leave it in their capable hands! 😄 |
Completed and merged |
I haven't tested this out myself so unsure if it will work but it sounds like you can replace the line in the
.envrc
file here withdotenv
.direnv/direnv#284 (comment)
Adds an extra dependency but you'll need this dependency anyways if you want to use the
.envrc
framework within PyCharm.The text was updated successfully, but these errors were encountered: