aiidateam / aiida-core

The official repository for the AiiDA code
https://aiida-core.readthedocs.io
Other
436 stars 191 forks source link

`Transport` & `Engine`: factor out `getcwd()` & `chdir()` for compatibility with upcoming async transport #6593

Closed khsrali closed 4 weeks ago

khsrali commented 4 weeks ago

Transport.getcwd() & Transport.chdir() methods used to making life easier by allowing basically all Transport 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 the Transport, (to avoid opening many channels, etc.)