Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #494 +/- ##
===========================================
- Coverage 76.01% 75.95% -0.06%
===========================================
Files 52 52
Lines 8204 8221 +17
Branches 1361 1366 +5
===========================================
+ Hits 6236 6244 +8
- Misses 1524 1533 +9
Partials 444 444
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
davidwaroquiers
left a comment
There was a problem hiding this comment.
Almost all good to me! You can go ahead after checking if what I reviewed is reasonable :)
| cls = self.__class__ | ||
| if cls._ref_count == 0: | ||
| # No context is currently active: this is (or precedes) the | ||
| # outermost context, so (re)bind to the requested project, | ||
| # discarding any project left over from a previous operation. | ||
| if project is None: | ||
| config_manager: ConfigManager = ConfigManager() | ||
| project = config_manager.get_project(None) | ||
| self._project = project | ||
| cls._project = project | ||
| elif project is not None and project.name != cls._project.name: | ||
| # A context is already open and bound to another project. Sharing | ||
| # host connections across projects is not supported, so refuse | ||
| # instead of silently using the wrong project's workers. | ||
| raise ValueError( | ||
| f"SharedHosts is already active for project '{cls._project.name}' " | ||
| f"and cannot be used for a different project ('{project.name}') " | ||
| "at the same time." | ||
| ) |
There was a problem hiding this comment.
Do we need to have a test for this maybe ?
| for k, v in d.items(): | ||
| if v: | ||
| not_none.append(k) | ||
|
|
||
| if len(not_none) > 1: | ||
| if len(not_none) <= 1: |
There was a problem hiding this comment.
Here it should be < 1 no ? Also, I don't remember if an empty string can be a meaningful value for a given option, in which case the "if v:" should rather be "if v is not None:" (but I have the feeling that an empty string is not a meaningful value/possible thing in the cli ?)
| add2_info = job_controller.get_job_info(add2.uuid) | ||
| assert ( | ||
| len( | ||
| job_controller.delete_jobs( | ||
| job_ids=[(add2.uuid, 1)], delete_output=True, delete_files=True | ||
| ) | ||
| ) | ||
| == 1 | ||
| ) | ||
| with pytest.raises(ValueError, match=".*has no outputs.*"): | ||
| job_controller.jobstore.get_output(add2.uuid) | ||
|
|
||
| assert not os.path.isdir(add2_info.run_dir) |
There was a problem hiding this comment.
Does it need to check that get_output has something before the deletion and the run_dir exists before the deletion ?
Fix for several bugs identified by AI. Mostly harmless (text format or in functions not used anymore) or with impact only in limited corner cases.