-
Notifications
You must be signed in to change notification settings - Fork 192
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
Transport
& Engine
: factor out getcwd()
& chdir()
for compatibility with upcoming async transport
#6594
Transport
& Engine
: factor out getcwd()
& chdir()
for compatibility with upcoming async transport
#6594
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6594 +/- ##
==========================================
+ Coverage 77.51% 77.90% +0.40%
==========================================
Files 560 567 +7
Lines 41444 42147 +703
==========================================
+ Hits 32120 32830 +710
+ Misses 9324 9317 -7 ☔ View full report in Codecov by Sentry. |
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.
Thanks, @khsrali! I think it's definitely an improvement not to rely on getcwd
and chdir
anymore. Quite a lot of changes to unpack. Given that all tests are passing, I assume it works, so I'd approve. Though, maybe we can discuss the StrPath
class again in person, I don't think I fully understand its use.
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.
Thanks, @khsrali! I think it's definitely an improvement not to rely on getcwd
and chdir
anymore. Quite a lot of changes to unpack. Given that all tests are passing, I assume it works, so I'd approve. Though, maybe we can discuss the StrPath
class again in person, I don't think I fully understand its use.
I did a quick look on the PR, I have the same question on this. Would be nice to just use |
Thanks a lot @GeigerJ2 for the review. Please check the new changes.
Yes! as we discussed, I mainly suggested that for aesthetic reasons, I didn't want to call for Anyways, now I changed to |
Reminder for me:
|
@GeigerJ2 can you have a final look at this? |
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.
Nice, pathlib
for the win. Thanks for adapting the code, @khsrali. Just let's fix the fixtures, then I'll approve!
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.
Nice, pathlib
for the win. Thanks for adapting the code, @khsrali. Just let's fix the fixtures, then I'll approve!
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.
fml lgtm!
Transport.getcwd()
&Transport.chdir()
methods used to making life easier by allowing basically allTransport
methods to function with relative paths.However, for upcoming async changes, this was problematic, as several calculations ended up writing and fetching from wrong directories.
This PR, gets ride of the habit of setting working directory for an entire instance of
Transport
class in engine.Only because in
aiida-core
several calculations use a same instance of theTransport
, (to avoid opening many channels, etc.)