Don't load environment.yml as part of its can_handle#15237
Don't load environment.yml as part of its can_handle#15237kenodegard merged 3 commits intoconda:25.9.xfrom
Conversation
| return False | ||
|
|
||
| try: | ||
| self._environment = env.from_file(self.filename) |
There was a problem hiding this comment.
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.
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? |
ryanskeith
left a comment
There was a problem hiding this comment.
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
ryanskeith
left a comment
There was a problem hiding this comment.
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?