-
Notifications
You must be signed in to change notification settings - Fork 4
Fix lint flow #86
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
base: master
Are you sure you want to change the base?
Fix lint flow #86
Conversation
95853d1 to
e3a9746
Compare
|
It looks like the current fixes allow us to run the linting tools... however the reporting is stubbed out which means the results are not displayed in the terminal. |
It seems there sim flow specific assumptions in the deploy object base class, as well as the launcher base class. This issue is a lot broader than the regressions fixed in this commit. The code should be refactored to separate out the sim specific parts from the generic DVSim mechanism. Signed-off-by: James McCorrie <[email protected]>
e3a9746 to
2238d9b
Compare
|
Reports partially restored. |
Improve the clarity on what is simulation flow specific and what is common. This makes way to fix the linting and formal flows, and creates more clarity on what is required to be implemented to add a new flow. Signed-off-by: James McCorrie <[email protected]>
Signed-off-by: James McCorrie <[email protected]>
d6ada35 to
017f5d1
Compare
| self.sim_cfg = sim_cfg | ||
| self.flow = sim_cfg.name | ||
|
|
||
| if not hasattr(self.sim_cfg, "variant"): |
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.
Is variant used anywhere outside of deploy.py? If not, maybe a nicer hack would be to use things like this?
self._variant_suffix = f"_{self.sim_cfg.variant}" if self.sim_cfg.getattr("variant") else ""
That way, we don't touch the contents of the sim_cfg object.
| self.job_runtime.set(self.job_runtime_secs, "s") | ||
| try: | ||
| time, unit = plugin.get_job_runtime(log_text=lines) | ||
| self.job_runtime.set(time, unit) |
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'd probably suggest tweaking this code so that we set up a local time and unit variables on any of the three branches (including the exception below) and then only call self.job_runtime.set in one place?
| for link in self.links: | ||
| rm_path(self.links[link]) | ||
| pathlib.Path(self.links[link]).mkdir(parents=True) | ||
| Path(self.links[link]).mkdir(parents=True) |
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.
Looks sensible. Since you're touching the line anyway, would it make sense to make a path variable from the string in this loop and use it explicitly for rm_path as well?
This PR addresses the regressions in the lint flow. All of the refactoring until now has been simulation focused, unfortunately this has resulted in some regressions in other flows such as linting.
The immediate goal is to restore the functionality of these other flows.