Skip to content

Commit

Permalink
REST API: fix generator of full node namespace (#3516)
Browse files Browse the repository at this point in the history
The hard coded mapping in the automated node namespace generator had
incorrect values for the `node_type` part. The `node_type` for process
nodes will always have a trailing dot and so to match those nodes the
node type part of the `full_type` needs to match it exactly.
  • Loading branch information
elsapassaro authored and sphuber committed Nov 8, 2019
1 parent b93c5e3 commit 4b85d34
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions aiida/restapi/common/identifiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,12 @@ class Namespace(collections.MutableMapping):
# plugins. The `node_type` in that case is fixed and the `process_type` should start with the entry point group
# followed by the plugin name and the wildcard.
process_full_type_mapping = {
'process.calculation.calcjob.': 'process.calculation.calcjob.CalcJobNode|aiida.calculations:{plugin_name}.%',
'process.calculation.calcjob.': 'process.calculation.calcjob.CalcJobNode.|aiida.calculations:{plugin_name}.%',
'process.calculation.calcfunction.':
'process.calculation.calcfunction.CalcFunctionNode|aiida.calculations:{plugin_name}.%',
'process.calculation.calcfunction.CalcFunctionNode.|aiida.calculations:{plugin_name}.%',
'process.workflow.workfunction.':
'process.workflow.workfunction.WorkFunctionNode|aiida.workflows:{plugin_name}.%',
'process.workflow.workchain.': 'process.workflow.workchain.WorkChainNode|aiida.workflows:{plugin_name}.%',
'process.workflow.workfunction.WorkFunctionNode.|aiida.workflows:{plugin_name}.%',
'process.workflow.workchain.': 'process.workflow.workchain.WorkChainNode.|aiida.workflows:{plugin_name}.%',
}

def __str__(self):
Expand Down

0 comments on commit 4b85d34

Please sign in to comment.