sphuber / aiida-shell

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

`ShellJob`: Allow entry point strings for the `parser` input #49

Closed sphuber closed 1 year ago

sphuber commented 1 year ago

Although allowing to pass a parser function directly to the parser input is convenient during prototyping where the parser can be defined and used inline, at some point, parsers may become stable and reusable in multiple places. In these cases, it makes sense to register them with an entry point and pass that instead.

The parser input of the ShellJob now also accepts EntryPointData nodes, in addition to PickledData nodes. The serializer will automatically try to detect whether the passed value is a callable or a string representing a complete entry point.