Skip to content

How to represent underlying python scripts to define processes #246

@samwaseda

Description

@samwaseda

I don't really know what is the current status of the workflow ontology, but @joergwa and I are currently working on the workflow recipe, and were dealing with the python scripts that define workflow nodes/processes. I refer to this development for those who don't know at all what was happening by now (note: the linked page deals with the executed workflows, but here I would like to also talk about workflow recipes).

In our current development, a workflow node is defined by a python function, which is in turn defined in a python script. The node my_node is typically imported and used in a workflow in the following way:

from pyiron_workflow import Workflow

from some_package.some_path import my_node

wf = Workflow("some_workflow")
wf.node = my_node(some_input_information)
...

At this point, you can see that there are two important pieces of information: import path (some_package.some_path) and the function name (my_node). On top of this, in many cases there is a version attached to the package, i.e. in this case to some_package1. This is so far essential information without which the workflow basically loses its meaning because we wouldn't be able to uniquely identify the underlying function.

Now on top of this it might be important to add some metadata, such as:

  • Software tools used inside (Abaqus, VASP etc.)
  • Creator information (name, email address etc.?)
  • License
  • Algorithm
  • ...

While it would be nice to have this information as well, it's not crucial to do so, because once we can identify the function, we can probably recover this information via semantikon.

@joergwa and I agreed the the recipe itself should be defined as a class, because it still has to be instantiated, but we think the underlying python functions can be individuals, because they are "the same" wherever they are loaded, but so far there is no forbidding argument to make them classes if that's required.

Footnotes

  1. it does not really matter whether we consider it as the version of the package or the version of the function, because they should share it anyway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions