-
Notifications
You must be signed in to change notification settings - Fork 95
Open
Description
Currently a lot of the outputs have output_
as a prefix in their port names, e.g.:
aiida-quantumespresso/src/aiida_quantumespresso/calculations/pw.py
Lines 76 to 85 in 3578a9d
spec.output('output_parameters', valid_type=orm.Dict, | |
help='The `output_parameters` output node of the successful calculation.') | |
spec.output('output_structure', valid_type=orm.StructureData, required=False, | |
help='The `output_structure` output node of the successful calculation if present.') | |
spec.output('output_trajectory', valid_type=orm.TrajectoryData, required=False) | |
spec.output('output_band', valid_type=orm.BandsData, required=False, | |
help='The `output_band` output node of the successful calculation if present.') | |
spec.output('output_kpoints', valid_type=orm.KpointsData, required=False) | |
spec.output('output_atomic_occupations', valid_type=orm.Dict, required=False) | |
spec.default_output_node = 'output_parameters' |
This is a bit redundant. It means we have to type e.g.:
pw_calc.outputs.output_parameters
Instead of just having
pw_calc.outputs.parameters
I think the second is:
- More intuitive.
- Shorter and hence more readable. It's still perfectly clear but there is no distracting duplicate
ouput
. - Faster to tab complete. I can just do
pw_calc.p
+ Tab and get the output I want.
So I vote we remove all these output_
prefixes everywhere. Clearly this would be a backwards-incompatible change. @sphuber do you see an elegant deprecation pathway, e.g. keeping both output ports and raising a warning if the deprecated one is accessed?