repoNameToPrefix

lsst.validate.drp.util.repoNameToPrefix(repo)

Generate a base prefix for plots based on the repo name.

Examples

>>> repoNameToPrefix('a/b/c')
'a_b_c'
>>> repoNameToPrefix('/bar/foo/')
'bar_foo'
>>> repoNameToPrefix('CFHT/output')
'CFHT_output'
>>> repoNameToPrefix('./CFHT/output')
'CFHT_output'
>>> repoNameToPrefix('.a/CFHT/output')
'a_CFHT_output'
>>> repoNameToPrefix('bar/foo.json')
'bar_foo'