Skip to content

AST Parsing robustness #30

Description

@charles-turner-1

The AST listener uses config.yaml to listen for calls & send telemetry when the right calls are found, eg.

intake:
  catalog:
    - esm_datastore.search
    - DfFileCatalog.search
    - DfFileCatalog.__getitem__
payu: 
  run: 
    - Experiment.run
  restart:
    - Experiment.restart

esm_datastore.search will listen for that function call, and post telemetry to .../intake/catalog

I need to double check that this doesn't depend on how things are imported - eg. will the following be caught correctly:

intake:
  catalog:
    - esm_datastore.search
    - DfFileCatalog.search
    - DfFileCatalog.__getitem__
+  builder:
+    - AccessOm2Builder.build
payu: 
  run: 
    - Experiment.run
  restart:
    - Experiment.restart

Questions to confirm:

  1. Will inheritance break this? Eg. if AccessOm2Builder.build is a method defined on a parent class, is this still going to work?
  2. Will we get issues depending on the import style, eg.
from access_nri_intake import builders
...
builders.AccessOm2Builder.build()

Will this still be caught as if we had performed the following?

from access_nri_intake.builders import AccessOm2Builder
...
AccessOm2Builder.build()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions