Skip to content

Proposal: More default custom entry points for scripts #167

@justparking

Description

@justparking

I am proposing Nodel supports more default custom entry points. It is an extension of #126.

The rationale behind this is improved file management when dealing with custom extensions or standard "bolt on" functionality to existing recipes.

As per that issue, nodeConfig.json can hold a list of scripting "dependencies", e.g.

{
    "dependencies": [ "script.py", "custom.py"],
    "remoteBindingValues": {
        "actions": ...
        "events": ...
    },
    "paramValues": ...
}

It defaults to [ "script.py", "custom.py"] if missing but it would be useful if it supported more defaults like these possible options:

  1. It looks up all scripts named custom_XXXX.py (or XXXX_custom.py), e.g.
    • custom_SpecialStatus.py - e.g. add additional status handling
    • custom_IssueTracking.py - e.g. add a custom issue tracking module
    • custom_MySchedule.py - e.g. add some special scheduling

(they'd be executed in natural alphabetical order)

  1. A folder is used, say named custom, to hold a bunch of scripts:
    • custom/specialStatus.py
    • custom/issueTracking.py (*) This could be considered an Ingredient
    • custom/mySchedule.py

(*) While we're at it, it might be a good time to make more use of the term Ingredients where we can keep standardised module/libraries/scripts, etc.

So just like custom_XXXX.py, ingredients (e.g. ingredient_XXXX.py) can be treated in a similar way.

So the rule would be:

  1. load script.py
  2. load all Ingredient scripts.
  3. load all Custom scripts

Metadata

Metadata

Assignees

Labels

enhancementAn improvement to existing functionalitypolishSmall refinements to improve quality or consistencyproposalA feature or update proposal where feedback is sought.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions