-
Notifications
You must be signed in to change notification settings - Fork 2k
Don't load environment.yml as part of its can_handle #15237
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
Don't load environment.yml as part of its can_handle #15237
Conversation
| return False | ||
|
|
||
| try: | ||
| self._environment = env.from_file(self.filename) |
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.
The environment.yml plugin is able to handle any yaml file thrown at it. As long as the file can be read and parsed to yaml, it's good to go. The work in #15139 will update the environment spec api to read and cache the file contents.
| def env(self) -> Environment: | ||
| if not self._environment: | ||
| self.can_handle() | ||
| self._environment = env.from_file(self.filename) |
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.
now we can load the environment when the user asks for the environment to be loaded.
fb22b7a to
a7b7cac
Compare
e91ea77 to
74eb022
Compare
CodSpeed Instrumentation Performance ReportMerging #15237 will not alter performanceComparing Summary
Footnotes |
|
What is its can_handle? |
|
is this intended to be a followup to #15120? |
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.
Overall I love the break up operations so more addins can be performed.
I am worried about some of the validations. I also think we might want to decide if the plugin's repsonsibility is to also check system file like errors (like missing file) or if that is another processes job.
|
@ryanskeith it looks like all this review has more to do with #15120. I'll apply the changes there. Lemme filp this one into draft mode so it's more clear that this is a follow up PR. |
74eb022 to
6370759
Compare
Co-authored-by: Jannis Leidel <[email protected]>
202dac8 to
a7fae14
Compare
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.
These look great. Thank you for the work.
The base branch was changed.
Description
Previously, the environment.yml plugin would produce duplicate errors for invalid keys. For example, consider the environment.yml:
would produce:
This change makes the message only appear once:
Checklist - did you ...
newsdirectory (using the template) for the next release's release notes?