sphuber / aiida-shell

AiiDA plugin that makes running shell commands easy.
MIT License
14 stars 7 forks source link

`ShellJob`: Use `SinglefileData.filename` before falling back on key #26

Closed sphuber closed 2 years ago

sphuber commented 2 years ago

Fixes #24

So far the logic for determining the filename used to write the content of the inputs nodes in the running directory to, was to first look if an explicit filename was defined in the filenames input and otherwise to fallback to the key of the node within the nodes dictionary.

Here we change the code to use the filename of the SinglefileData before falling back to the key, if and only if the filename of the node is defined and not SinglefileData.DEFAULT_FILENAME. This last exception is important because if a SinglefileData node is constructed without explicit filename, that value is used, and with this new fule any SinglefileData nodes that were created without explicit filename will end up overwriting each other.