Add an option to collect definition provenance from other modules other than the main script.
Currently, we capture only the content hash of the main script as definition provenance. The other local modules are captured as deployment provenance. So, we do not capture definition provenance from them that are useful for execution provenance (such as global variables names)
We could expand FunctionDef table to not only store function definitions, but also classes and files, since they have the same attributes: trial_id, id, name, code_hash.
We could also add an extra attribute: parent.
This way, the following code would generate 4 definition objects
# some_file.py
class SomeClass(object):
def some_method(self):
def some_function():
pass
Add an option to collect definition provenance from other modules other than the main script.
Currently, we capture only the content hash of the main script as definition provenance. The other local modules are captured as deployment provenance. So, we do not capture definition provenance from them that are useful for execution provenance (such as global variables names)
We could expand FunctionDef table to not only store function definitions, but also classes and files, since they have the same attributes: trial_id, id, name, code_hash. We could also add an extra attribute: parent. This way, the following code would generate 4 definition objects
An extra attribute, qualname, could be provided for qualified name reference, according to https://www.python.org/dev/peps/pep-3155/
Definition objects:
Note that the qualname is not fully qualified, so we don't have the filename on it.