pyiron / pyiron_workflow

Graph-and-node based workflows
BSD 3-Clause "New" or "Revised" License
15 stars 1 forks source link

Would be nice: "citations" attribute on nodes #485

Open liamhuber opened 1 month ago

liamhuber commented 1 month ago

Be able to know what to cite when you use a workflow.

To be defined at the class (i.e. decorator) level, so you can ask your workflow what you should cite. Composite nodes then just additionally compile over the set of citations among all children.

How to format these? A URL certainly (for websites), any other helper features for things like BibTex?

Should be easy to slap on top as an extra data field on Node and a loop-and-super on Composite.

XzzX commented 4 days ago

What about in general giving important objects a metadata field for such kind of information?

liamhuber commented 4 days ago

Yes, nesting the citation inside a more general metadata field sounds like a good idea. Node will still need to know about the explicit structure of the metadata (at least to the extent it knows where citations are) so that it can walk the graph and collect a set of all citations using something like Node.get_citations -> set[str], but that doesn't preclude also having metadata the nodes aren't explicitly aware of.