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

💡 Future direction of the registration syntax #71

Closed
liamhuber opened this issue Nov 7, 2023 · 1 comment
Closed

💡 Future direction of the registration syntax #71

liamhuber opened this issue Nov 7, 2023 · 1 comment

Comments

@liamhuber
Copy link
Member

In the pyiron meeting notes for 2023.11.06, @JNmpi writes

Another idea/suggestion concerns registering nodes. Similar like for PYTHONPATH it would be nice to have a way to set it in advance, e.g.:

   wf.node_library_path = 'pyiron_workflow.node_library'

or

   Workflow.node_library_path = 'pyiron_workflow.node_library'

Registering nodes should then be as easy as:

  wf.register('atomistics', 'plotting')

If the node modules are in subdirectories the following construct should work:

  wf.register('atomistics.structure', 'plotting')

Alternatively, also:

 wf.create.atomistic.structure.Bulk('Al')

Of these issues, I actually think nested namespaces on the creator (implicit in the last two examples) is actually the more pressing matter.

For registering modules as node packages, I'm fine with this syntax, but (a) I'm not confident that registration by module will be what we settle on so I don't want to invest much in it just yet, and (b) we don't yet(!!!) have enough different packages for the extra convenience to be a big deal.

So I think these are good ideas, but should wait until we've knocked off some of the more pressing issues in #68.

@liamhuber liamhuber changed the title Future direction of the registration syntax 💡 Future direction of the registration syntax Jan 12, 2024
@liamhuber
Copy link
Member Author

We'll need to see what sort of tools are helpful when it comes to really embracing FAIR, but for the time being I am leaning more and more to just importing and using nodes like any other object and not bothering with too much registration. Of course we'd still have the standard node package available right on the workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant