Hla 1124 improve offset zeroing and restoration - #94
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #94 +/- ##
==========================================
- Coverage 51.57% 51.20% -0.37%
==========================================
Files 20 20
Lines 2257 2277 +20
==========================================
+ Hits 1164 1166 +2
- Misses 1093 1111 +18 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
fb30190 to
bddfa1a
Compare
If foldername is somehow None at this point, then we must have failed to create a directory. In this case, using its parent directory as a fallback doesnt make much sense. We have no way of knowing if the parent exists.
bddfa1a to
06d4b5c
Compare
06d4b5c to
3949d0a
Compare
And some comments/docstring improvements.
15e1bcb to
030e84b
Compare
| self.machine = machine | ||
| else: | ||
| self.machine = Machine(extra_config_files, additional_options) | ||
| folder_path = ( |
There was a problem hiding this comment.
If foldername is somehow None at this point, then we must have
failed to create a directory. In this case, using its parent directory as
a fallback doesnt make much sense. We have no way of knowing if the parent
exists.
The above is the git commit message that attempts to explain this change, but I don't quite follow it. It might be easier to go over it in person.
It looks like the code change implies that:
- Previously, it would use self.machine.config["SAVE_LOCATION"] as a fallback
- Now, it uses os.getcwd()
There was a problem hiding this comment.
We improved this and the fallback is now config["SAVE_LOCATION"] again. If this is also undefined or an invalid path, then there will likely be an uncaught exception. But that is out of the scope of this PR
If no folder_path is passed in we now try to get the SAVE_LOCATION variable from a config file/dictionary. To get SAVE_LOCATION we must first create the machine. But to set FULL_SAVE_LOCATION we must first create the save location which requires SAVE_LOCATION. This means we must first create the machine, then the save location and then update the machine with the full save location.
d0a1614 to
32142c0
Compare
Uh oh!
There was an error while loading. Please reload this page.