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

Make input/output accessible by label #108

Closed
liamhuber opened this issue Nov 8, 2022 · 0 comments · Fixed by #118
Closed

Make input/output accessible by label #108

liamhuber opened this issue Nov 8, 2022 · 0 comments · Fixed by #118
Assignees
Labels
feature request request partner of "enhancement"

Comments

@liamhuber
Copy link
Member

From our discussion in #102

Programming the nodes with constructs like self.inputs[1] is inconvenient and error prone. It would be nicer to allow constructs with the actual input name, i.e. self.input.alat of self.input['alat']. Being able to provide actual names makes the code much easier to read, avoids errors when introducing new inputs/outputs since it does not require reindexing.

I'm 100% on board with this. Right now the inputs and outputs are just lists, but I should be able to override this with a list-like class that has a modified __getattr__ so it first checks if any of its elements has a label corresponding to the requested key.

@liamhuber liamhuber added the enhancement New feature; can be answer partner of "feature request" label Nov 8, 2022
@liamhuber liamhuber self-assigned this Nov 8, 2022
@liamhuber liamhuber added feature request request partner of "enhancement" and removed enhancement New feature; can be answer partner of "feature request" labels Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request request partner of "enhancement"
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant