The metric packages may not be able to be installed in the same virtual environment as the ref. We need a mechanism of creating proxy metrics/providers when we can't import the instance of the metric directly.
Perhaps we need a mechanism to serialise the provider and metric definitions. Probably YAML formatted. This could be added to a pre-commit hook to ensure that the definitions and the serialised output remain in sync.
The file would then be checked into the repo.
It should include version information about the provider
Definition of "done"
[ ] Add cattrs or some other way of serialising a provider and it's metrics
[ ] Add a CLI endpoint to serialise the results
[ ] Add a proxy metric (same metadata, but a dummy run function)
[ ] Build a provider from this metric information
Additional context
CMEC does something similar with it's metric definitions
This might be more difficult with Constraints. I don't think we can support arbitrary functions instead we must use a set of constraints provided by ref-core
The problem
The metric packages may not be able to be installed in the same virtual environment as the ref. We need a mechanism of creating proxy metrics/providers when we can't import the instance of the metric directly.
Perhaps we need a mechanism to serialise the provider and metric definitions. Probably YAML formatted. This could be added to a pre-commit hook to ensure that the definitions and the serialised output remain in sync.
The file would then be checked into the repo.
It should include version information about the provider
Definition of "done"
Additional context
CMEC does something similar with it's metric definitions