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

feat: initial minimal virtual package support #36

Merged
merged 4 commits into from
May 31, 2023

Conversation

ruben-arts
Copy link
Contributor

  • Add a minimal version of the virtual packages (excluding the Cuda one)
  • Add a check to find if the current platform is at least matching the minimal packages for the platform

Copy link
Contributor

@baszalmstra baszalmstra left a comment

Choose a reason for hiding this comment

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

Looks pretty good! I only have a few small notes.

src/environment.rs Outdated Show resolved Hide resolved
src/virtual_packages.rs Outdated Show resolved Hide resolved
virtual_packages
}

pub fn verify_current_platform_has_minimal_virtual_package_requirements(
Copy link
Contributor

Choose a reason for hiding this comment

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

Function is named a bit weird. It implies it will check the current platform but you actually pass in the platform.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also its missings docs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is now checking the current platform itself and added some docs

Comment on lines 5 to 8
/// Define a reasonable modern set of virtual packages that should be safe enough to assume.
/// On design this is in sync with the conda-lock set of default packages.
/// https://github.com/conda/conda-lock/blob/3d36688278ebf4f65281de0846701d61d6017ed2/conda_lock/virtual_package.py#L175
pub fn get_minimal_virtual_packages(platform: Platform) -> Vec<VirtualPackage> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Function comments should always be written in the imperative form. e.g. "Returns a reasonable modern set of ..." instead of "Return a reasonable set ..."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it looks better now

@baszalmstra baszalmstra merged commit de15ffc into main May 31, 2023
@wolfv wolfv deleted the feature/minimal_virtual_package_support branch May 31, 2023 07:03
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.

None yet

2 participants