def packagedin(abspath): """Return the package name that contains the asset `abspath`.""" from pluggdapps import papackages # Keep this line, don't shuffle around !! locations = {pinfo['location']: p for p, pinfo in papackages.items()} prefix = longest_prefix(locations.keys(), abspath) return locations[prefix] if prefix else None
def packagedin( abspath ): """Return the package name that contains the asset `abspath`.""" from pluggdapps import papackages # Keep this line, don't shuffle around !! locations = { pinfo['location'] : p for p, pinfo in papackages.items() } prefix = longest_prefix( locations.keys(), abspath ) return locations[prefix] if prefix else None
def ttlfiles( self ): """Return a list of ttlfile related to this environment.""" from pluggdapps import papackages ttlfiles = h.flatten( [ list( map( h.abspath_from_asset_spec, n.get('ttlplugins', []) )) for nm, n in papackages.items() ] ) return ttlfiles + self.pa._monitoredfiles
def ttlfiles(self): """Return a list of ttlfile related to this environment.""" from pluggdapps import papackages ttlfiles = h.flatten([ list(map(h.abspath_from_asset_spec, n.get('ttlplugins', []))) for nm, n in papackages.items() ]) return ttlfiles + self.pa._monitoredfiles