proboscis / pinjected

MIT License
11 stars 0 forks source link

Make create_configuration hookable to support multiple runtime configurations #2

Closed proboscis closed 1 year ago

proboscis commented 1 year ago

Currently we have either viz/run for the options to run Injected. viz -> show dependency graph on a browser run -> runs it locally.

However, there are cases where a user wants to customize how an Injected should be treated.

  1. Make create_configurations return generic run configuration:
    • Currently, create_configurations returns a json of IdeaConfigurations
  2. Make create_configurations look for hooking designs, or retrieve hooks from a design 2.1 Use a special name such as default_design_paths 2.2 look for a special dependency injection variable name such as runtime (this looks better)
  3. Make the 'viz' feature a runtime option
proboscis commented 1 year ago
  1. We can look for "__runconfig_...." variables in a design at default design paths.
  2. We can look for a injected variable that creates configurations for idea
  3. For each script file there must be overriding options as an entry point. This means that we should look for a design rather than a "default_design_paths" So let's introduce "__metadesign__":Design and deprecate "\_default_designpaths_\"
proboscis commented 1 year ago

The protocol for __metadesign_\: 'overriding' the parent by default. So, if you have a meta_design in a root of a module, it will be used, and it can be overridden in child modules by defining meta_design

proboscis commented 1 year ago

implemented __meta_design__ and added 'IdeaConfigCreator' type. now we can bind custom_idea_config_creator with type IdeaConfigCreator to be invoked by config creator.

proboscis commented 1 year ago

Implemented with branch #2