-
Notifications
You must be signed in to change notification settings - Fork 194
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
Refactor the code by introducing the concept of an Environment
#585
Comments
What is the use case for this? I'm accustomed to thinking of pixi in the per-folder environment sense: is this for build matrices? |
@rahuldave, you should checkout the linked project. We're building a multi env feature. This is for projects that like to specify and lock multiple versions of environments in one project. |
Thank you! The PR explains it really well. Essentially a version x platform x special cases ( cuda/cpu/gpu ) matrix which may or may not map to a gha matrix. This is true for builds too, not just testing, so for example if I am looking to use hatchling with pixi ( or a conda builder). So I suppose a builder can be activated in a post install script and be used. But of-course this requires a script to translate to a pyproject.toml to be activated on a per-environment basis or more generally a per environment task ability. |
Feel free to add your example use case to that pr! Assuming you mean to say that you want to create a |
Yes. Just like we use gha matrices to test we can use them to build right? And one way to do that is to explicitly create a CI build environment..what you said..for each combo. ( and a CD deploy for production systems but those are not libraries and I digress, although pixi in production systems is a great idea ). But my thought is we'll need to build out the task specs a bit ( for which current issues exist) so that tasks can be parametric over environments and don't exponentially increase... |
Yeah that will be a next step! Keep following the projects and you will be up to date! |
Hello - I'm new to pixi (as of about an hour ago) - loving it so far! 🙂 If there are to be environments, might there be scope for some basic metadata, such as the date created / brief description? Coming from conda, one thing that would occasionally come up after a while on a machine was finding myself with a mess of similar environments where I didn't recall exactly which one was for which particular use. Having the local creation date added automatically and the chance to store a quick summary would be handy. It's obviously possible to write this stuff up somewhere else, but it tends to get separated / lost, so maybe a way to put it in the environment settings might work. What do you think @ruben-arts ? |
Hey @nmstoker, Good to hear that you like it! All these environments will be built from the If you want to learn more about the proposed design checkout this document:https://prefix-dev.github.io/pixi/design_proposals/multi_environment_proposal/ I hope this explains why we wouldn't need the metadata. Please let me know if I'm misunderstanding your request! |
Yes, sounds like comments should work as a way to track that stuff. had been thinking it would be handy to have info like that show up along with the listing of environments but I guess manual comments are freer and not that much effort to go check by hand (ie opening the pixi.toml file you mention) Thanks for getting back. I look forward to seeing how things progress. |
…ironment (#711) This is the first implementation of multi-env which will update the lock-file for all environments. There are some notable improvements that can be made in terms of usability from code. I will do that in another PR this PR should initially be enough to start testing multi-env! closes #585
We want to refactor the code to include the notion of an environment to prepare for multiple environments. An environments provides dependencies (per platform?), the virtual packages (e.g. system requirements) and activation scripts. We need to refactor the code (where appropriate) to use an
Environment
instead of aProject
.The first step is to have a
Project::default() -> Environment
function that returns the "default/main" environment and use that throughout the rest of the code.Install the environment to
.pixi/envs/<name>
instead of the current.pixi/env
folder.The text was updated successfully, but these errors were encountered: