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

Truly global .env configuration. #171

Open
Luttik opened this issue Jan 27, 2022 · 5 comments
Open

Truly global .env configuration. #171

Luttik opened this issue Jan 27, 2022 · 5 comments

Comments

@Luttik
Copy link

Luttik commented Jan 27, 2022

It seems to me that in virtually every situation you want to load the .env file if it is available in the working directory or project root. I'd love to have support for this in a way that just enables this cross-project and cross-pycharm-feature.

Especially for those who manage many projects the best workflow you can currently have (as far as I know) is the following

  • for each new project
  • For each run configuration template that you plan to use (which can easily be 5+)
  • edit the run configuration by 1. going to the envfile tab 2. enabling envfile 3. click +. 4. Navigate to the correct folder. 5 Select the .env file

After this you still have to manually load the .env config for some pycharm elements like the terminal.

I think that this concept of a cross-project default configuration can easily prevent 100 clicks for every new project in just the setup.

Additionally letting people pick the .env file using a path in plaintext rather than a file picker would also drastically lower the time it takes to do the setup.

@marjeta42
Copy link

Yes! If I right-click on a unittest module, class, or function and run/debug it, it automatically creates a new run configuration. if it doesn't exist yet. So, I can easily have 20 different run configurations.

This requested feature is really a deal-breaker for me.

At this point, it seems the simplest way is to edit the activate script in the virtual environment. It's an ugly way to do it, but it works.

@lzorzer
Copy link

lzorzer commented Mar 8, 2022

Hello,
Same here, we have many many java projects, and it's tiresome for each one to specify the file.
If you have a .env at the root level of your project, it could be automatically loaded without any risks I think, like NPM does.
Thanks

@luiscoms
Copy link

Agreed, load default dot env file at root directory is very useful feature

@luiscoms
Copy link

I guess that is related to #31

@datatalking
Copy link

So who is working on this or what is involved in moving the ball forward? I can help write tests, documentation or code but this would be helpful in the management many projects.

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

No branches or pull requests

5 participants