Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AST Parsing robustness #30

Open
2 tasks
charles-turner-1 opened this issue Mar 14, 2025 · 0 comments
Open
2 tasks

AST Parsing robustness #30

charles-turner-1 opened this issue Mar 14, 2025 · 0 comments

Comments

@charles-turner-1
Copy link
Collaborator

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()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant