Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore support for dynamic nested namespaces in inputs for process functions #5806

Closed
sphuber opened this issue Nov 30, 2022 · 0 comments · Fixed by #5808
Closed

Restore support for dynamic nested namespaces in inputs for process functions #5806

sphuber opened this issue Nov 30, 2022 · 0 comments · Fixed by #5808

Comments

@sphuber
Copy link
Contributor

sphuber commented Nov 30, 2022

Before v2.0 the following was possible:

@workfunction
def function(**kwargs):
    return kwargs

inputs = {
    'nested': {
        'namespace': {
            'int': orm.Int(1).store()
        }
    }
}
results, node = function.run_get_node(**inputs)
assert results == inputs
assert node.get_incoming().nested() == inputs

In v2.0 and up this raises a ValueError:

ValueError: Error occurred validating port 'inputs.level_1': Invalid type <class 'dict'> for dynamic port value: expected <class 'aiida.orm.nodes.data.data.Data'>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant