-
Notifications
You must be signed in to change notification settings - Fork 104
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
Allow channel::package in package specifications #207
Conversation
✅ Deploy Preview for conda-lock ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add some docs to the new code
edit1: tried to use the web editor to add some docs. looks like that failed. lemme try again
edit2: ok successfully pushed to your branch using the web editor 🎉
if package_channel: | ||
channel_str = package_channel.canonical_name | ||
else: | ||
channel_str = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this else block is unnecessary given that ms.get('channel')
will return None. But I guess if ms['channel'] is anything falsy ("", false, etc.) then this forces channel_str to be None. so maybe this is fine? idk. probably better to be defensive here and leave the code as is, instead of deleting the else block
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I trust the behavior of matchspec about as far as i can throw it, so keeping it explicit here
|
||
|
||
def conda_spec_to_versioned_dep(spec: str, category: str) -> VersionedDependency: | ||
from ..vendor.conda.models.match_spec import MatchSpec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you add a docstring to this function?
@@ -0,0 +1,7 @@ | |||
channels: | |||
- rapidsai | |||
- nvidia |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
anything special about rapidsai and nvidia here? or could these be any channels. might be kind to future maintenance to leave a note about why you picked these two channels
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
web editor was confusing. i was trying to leave my changes as a thing for you to approve. this PR looks fine as is, i just had some minor things to point out
This closes #188
This should allow us to be able to safely specify the channel as part of a lock spec.
Since this is a strict superset of the lockfile format we're choosing to not to increment the version number of a the lockfile spec here.