Skip to content

October 14, 2024

Struggling today with the conventions that I should follow in a couple areas of design.

First Question

First, as I was prototyping the Plot type Runnables, I realized that it may be easier to name the table defining each Runnable by the Runnable's type rather than its name:

[[plot]]
name = "test plot"
Rather than
["test plot"]
type = "process"

At first I shied away from the [[plot]] syntax, until I realized that it does in fact translate into JSON just fine. It has the benefit of only having the runnable's name located in one place. Plot type Runnables need multiple subtables, e.g.:

["test plot"]
type = "plot"

["test plot".axes.ax1]
field = value
In this example, the "test plot" name must be repeated twice. If I use the [[plot]] syntax, I can avoid this repetition. Is it less readable? I'm not sure. I'll have to think about it.
[[plot]]
name = "test plot"

[[plot.ax1]]
field = value

Second Question

The other question is what exactly to do with any extraneous attributes that are provided in the Runnable's table. I've decided that they will be added to the node's attributes so they're visible as would be expected, but these attributes will not be used in any way by the Runnable. Maybe as more functionality is added with other packages, I'll get a sense of what to do with these attributes. For now, I'll just ignore them.