Skip to content

Ryven PyPI Package and ryvencore

Compare
Choose a tag to compare
@leon-thomm leon-thomm released this 07 Dec 10:06
· 343 commits to master since this release

This release brings mainly large architectural changes. Ryven is at this point more a platform than just an application. See also the new README for additional info about current state.

main changes

  • Ryven is now a Python package on PyPI, the repository got restructured and cleaned accordingly (big thanks @mmorys)
  • ryvencore is now a fully independent library and has its own repository here
  • removed macros (see below)

removing native macro support for now

While the alpha release of Ryven 3 had native support for macros (/subgraphs/whatever you might call them), I decided to remove them, for the following reasons:

  • Ryven should be thought of rather as a platform which you use to build frameworks of node packages on top. Natively supporting macros, however, significantly complicates the development of all nodes that perform slightly more involved (but not necessarily unreasonable) actions (like analysing the graph), while many node packages might not really require macro support at all.
  • Furthermore, the concept or semantic specification of macros is not obvious, many different approaches might seem reasonable. For example: whenever a macro node instance received data on some input, should all data currently residing on inputs of that instance be propagated into the subgraph? In which order? How can this be done efficiently? How should data propagation work for macros with exec I/O? The answers to those questions strongly depend on the use case.
  • Also, abstraction functionality like macros provided it can totally be implemented purely based on Ryven's nodes system (meaning you can build node packages implementing this functionality). It often makes much more sense to apply this functionality only in an environment (nodes package/s) where a general abstraction system is already defined (for example, a system generating a source code from a graph, see also this example), which will answer all questions including the above for that environment. Then, nodes in that environment can be built with the implemented macro mechanics in mind.

So, I'm not really 'removing' possibilities here, but I think it makes more sense to focus on the nodes for the particular use case and design the system on that level accordingly. I might publish macros with configuration options as nodes package at some point, but it doesn't need to be part of Ryven itself.

translating your v3.0-alpha nodes and projects

To bring your v3.0-alpha node packages to v3.1

  • change from NENV import .../from NWENV import ... to from ryven.NENV import .../from ryven.NWENV import ...
  • change the signature of Node.set_state from def set_state(self, data: dict): to def set_state(self, data: dict, version):
    • add static version fields with values like 'v0.0.1' to your nodes. the version parameter in set_state will reflect the node version under which the loaded node was saved (None if not set), so you can use it to provide backwards compatibility and translate older versions of nodes to new ones to ensure old projects can be loaded

To bring your v3.0-alpha projects to v3.1

  • load the project in Ryven 3.1 (it should then run a function on it that turns macro scripts into normal scripts and removes all macro nodes from flows) and save it again