Uploaded image for project: 'AriaTosca'
  1. AriaTosca
  2. ARIA-247

Automatically infer single-package plugins package prefix

    XMLWordPrintableJSON

Details

    • Story
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      When mapping an operation implementation in the service template to some plugin, one would usually map it like so:

      implementation: my_plugin > my_package.my_module.my_function
      

      We could improve on this and possibly help masking the "Python" aspect of this path if the PluginManager class, when loading a plugin, would automatically infer the my_package prefix when it comes to single-package plugins (a common case).

      That would allow for the implementation to also look like this:

      implementation: my_plugin > my_module.my_function
      

      Then, plugin authors could also alias operations entry points in the package's _init_.py file, and thereby allowing the implementation line so simply be:

      implementation: my_plugin > my_function
      

      Which is much neater.

      (Note that supporting both cases, i.e. both inferring and also trying the exact implementation string, may cause ambiguity in some scenarios)

      Attachments

        Activity

          People

            Unassigned Unassigned
            ran Ran Ziv
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: