Uploaded image for project: 'SimplyE 2.0'
  1. SimplyE 2.0
  2. SIMPLY-1253

Remove importlib trickery in analytics.py

XMLWordPrintable

      core/analytics.py contains some importlib magic that treats the protocol of an ExternalIntegration as a module name, and imports the module. This kind of flexibility isn't actually necessary, since we don't add new analytics modules at runtime – we do it in a new release. So we can get rid of this importlib magic and try something more like what we do with other types of integrations – have a registry that associates a value for ExternalIntegration.protocol with a class, and then do a registry lookup.

      This is a little harder than 'trivial' because we currently have one analytics module in core and one in circulation; we need to make sure that analytics module gets added to the registry before it's looked up.

            adrianaalter Adriana Alter [X] (Inactive)
            leonardrichardson Leonard Richardson [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: