-
Notifications
You must be signed in to change notification settings - Fork 5
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: metadata will render recipe with context #41
feat: metadata will render recipe with context #41
Conversation
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.
Does this reflect the same API that CondaMetaData
has? Or would you access the name
and version
differently?
name = _get_recipe_metadata(self.meta, "name") | ||
|
||
if not name: | ||
sys.exit(f"Error: package/name missing in: {self.meta_path!r}") |
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.
Please just raise
and let the user determine whether or not the application should exit or not!
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.
This wasn't my implementation - I tried to reuse the same approach as conda_build does - so I decided to not move from sys.exit. Let me know if you think that it's worth to change it
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.
changed.
version = _get_recipe_metadata(self.meta, "version") | ||
|
||
if not version: | ||
sys.exit(f"Error: package/version missing in: {self.meta_path!r}") |
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.
Same here.
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.
^ same here
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.
changed
it's the same API - I just override it because we extract them from recipe/package depending on |
This PR aims to give
Metadata
ability to render recipe using context values.It will be used by conda-smithy to ask metadata.name() and metadata.version()