-
Notifications
You must be signed in to change notification settings - Fork 15
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
Testing a package that depend on CondaPkg.jl creates a new environment every time #129
Comments
My workaround is to edit
I guess a better solution is to resort to the same temp dir for tests. The temp dir should be created the first time the tests are run on a computer, but we shall stay with the same temp folder to avoid unnecessary disk writes. I pinned it down to |
For an unknown reason, the environmental variables are not respected in the very first test after updating deps. This is the full output. Not sure if that's accidental. I can re-check after any deps get updated again.
|
I don't know how to do this sorry, and agree it's quite annoying. I'm a bit surprised that env vars you're setting are not making it into the test env? Personally I run tests using the Julia extension in VS Code, which keeps a persistent test folder around, so you only pay the cost to create the Conda env once per day normally. |
No problem! Thanks for your reply! I ran the same test that contains the following at the top of if gethostname() == "ampere"
ENV["JULIA_CONDAPKG_ENV"] = "/home/hacui/mambaforge/envs/a"
ENV["JULIA_CONDAPKG_OFFLINE"] = true
end These env are not respected, and it again reinstalled all the packages. The second time I ran the test today, the env gets used, so that I am able to use a local version of the Python package. |
Greetings,
Thanks for the very nice package for managing packages!
I'd like to fix the Conda environment when running tests for a package that depends on CondaPkg. Creating a new environment every time seems wasteful (a lot of writes to the drive) when the Python packages are sizable.
Could you suggest a way to work around it?
This is what I tried:
I'm using
PreferenceTools.jl
and have the properenv
set in the main REPL; this is verified to be working. I suspect that the setting does not propagate into the test environment, as everything for testing was compiled from scratch, including a random path to a new conda environment.Thanks in advance!
The text was updated successfully, but these errors were encountered: