def setUp(self): self.doc = ds.compile_dir_structure( { 'collections' : {"datatype":["caches","scenes","images"], 'assettype':['character','prop','vehicle','set']}, 'rules' : { 'ROOT' : [ ['BranchLevel', {'rules':['assets','shots']}], ], 'shots' : [ ['ParameterizedLevel', { "key":'datatype', "collection":"datatype", 'user':'******', 'group':'root', 'permissions':'rwxr-xr-x'}], ['ParameterizedLevel', { "key":'show'}], ['ParameterizedLevel', { "key":'sequence'}], ['ParameterizedLevel', { "key":'shot', 'bookmarks':['shotroot']}], ['ParameterizedLevel', { "key":'user', 'bookmarks':['workarea'], 'user':'******', 'group':'shotdept', 'permissions':'rwxr-x---' }] ], 'assets' :[ ['FixedLevel', {"name":'assets', 'user':'******', 'group':'root', 'permissions':'rwxr-xr-x'}], ['ParameterizedLevel', { "key":'show', 'group':'assetdept'}], ['ParameterizedLevel', { "key":'assettype', 'collection':'assettype'}], ['ParameterizedLevel', { "key":'assetname', 'bookmarks':['assetroot'] }], ['ParameterizedLevel', { "key":'user', 'bookmarks':['workarea'], 'user':'******', 'permissions':'rwxr-x---' }] ] } } ) self.d = localclient.LocalClient( self.doc, "/tmp/dirbtest1/projects" )
def setUp(self): self.dirlist = ( '/tmp/dirbtest1/projects/', '/tmp/dirbtest1/projects/show', '/tmp/dirbtest1/projects/show/asset', '/tmp/dirbtest1/projects/show/asset/vehicle', '/tmp/dirbtest1/projects/show/asset/vehicle/car1', '/tmp/dirbtest1/projects/show/asset/vehicle/car1/lighting', '/tmp/dirbtest1/projects/show/asset/vehicle/car1/dontfind', '/tmp/dirbtest1/projects/show/sequence', '/tmp/dirbtest1/projects/show/sequence/aa', '/tmp/dirbtest1/projects/show/sequence/aa/xx', '/tmp/dirbtest1/projects/show/sequence/bb', '/tmp/dirbtest1/projects/show/sequence/bb/xx', '/tmp/dirbtest1/projects/show/sequence/bb/xx/animation', '/tmp/dirbtest1/projects/show/sequence/bb/xx/lighting', '/tmp/dirbtest1/projects/show/sequence/bb/xx/dontfind', '/tmp/dirbtest1/projects/show/sequence/bb/yy', '/tmp/dirbtest1/projects/show/sequence/bb/zz', '/tmp/dirbtest1/projects/show/sequence/cc' ) self.doc = ds.compile_dir_structure( { 'collections' : {"department":["animation","lighting"], "app":['katana','maya']}, 'rules' : { 'ROOT' : [ ['ParameterizedLevel', { "bookmarks":["showroot"], "key":'show'}], ['BranchLevel', {"rules":["sequence","asset"]}], ], 'sequence' :[ ['FixedLevel', {"name":'sequence'}], ['ParameterizedLevel', { "key":'sequence'}], ['ParameterizedLevel', { "key":'shot', "bookmarks":['shotroot']}], ['ParameterizedLevel', { "key":'dept', "collection":"department", 'bookmarks':['workarea']}] ], 'asset' : [ ['FixedLevel', {"name":'asset'}], ['ParameterizedLevel', { "key":'assettype'}], ['ParameterizedLevel', { "key":'asset', 'bookmarks':['assetroot']}], ['ParameterizedLevel', { "key":'dept', "collection":"department", 'bookmarks':['workarea']}] ] } } ) self.d = localclient.LocalClient( self.doc, "/tmp/dirbtest1/projects" ) for d in self.dirlist: if not os.path.isdir( d ): os.makedirs( d )
def setUp(self): self.doc = ds.compile_dir_structure( { 'collections' : {"datatype":["caches","scenes","images"], 'assettype':['chr','prp','veh','set']}, 'rules' : { 'ROOT' : [ ['ParameterizedLevel', { "key":'show'}], ['BranchLevel', {'rules':['assets','shots']}], ], 'shots' : [ ['ParameterizedLevel', { "key":'datatype', "collection":"datatype", "treeattributes":{'subtree':'shots'}}], ['FormattedLevel', { 'format': "seq_{}", "keys":['sequence'], 'bookmarks':['sequenceroot']}], ['FormattedLevel', { 'format': "shot_{}", "keys":['shot'] , 'bookmarks':['shotroot']}], ['ParameterizedLevel', { "key":'user', 'bookmarks':['workarea'] }] ], 'assets' :[ ['FixedLevel', {"name":'assets', 'treeattributes':{'subtree':'assets'}}], ['FormattedLevel', { 'format':'{}_{}', 'keys':['assettype','assetname'], 'bookmarks':['assetroot'], 'collections':{ 'assettype':'assettype'} } ], ['ParameterizedLevel', { "key":'user', 'bookmarks':['workarea'], }] ] } } ) self.rootdir = "/tmp/dirbtest3/projects" self.d = localclient.LocalClient( self.doc, self.rootdir ) self.dirlist = ( "diehard/caches/seq_0001/shot_0003/johnm/", "diehard/caches/seq_0001/shot_0007/johnm/", "diehard/scenes/seq_0001/shot_0003/johnm/", "diehard/scenes/seq_0002/shot_0012/hansg/", "diehard/images/seq_0001/shot_0003/johnm/", "diehard/dontfind/seq_0001/shot_0003/johnm/", "diehard/assets/chr_partypal/johnm/", "diehard/assets/chr_eurotrash/hansg/", "diehard/assets/prp_ducttape/johnm", "diehard/assets/veh_gunship/johnson", "diehard/assets/dont_find/johnm" ) for d in self.dirlist: if not os.path.isdir( os.path.join( self.rootdir, d) ): os.makedirs( os.path.join( self.rootdir, d) )
def setUp(self): self.dirlist = ( 'show/veh_car1/lighting', 'show/chr_bob/lighting', 'show/dontfind_blank/lighting', 'show/100x140/animation', 'show/100x140/lighting', 'show/100x140/dontfind', 'show/110x360/lighting', 'show/110x360/animation', 'show/110x570/animation', 'show/350x220/animation' ) self.doc = ds.compile_dir_structure( { 'collections' : {"department":["animation","lighting"], 'assettype':['veh','chr','set','prp']}, 'rules' : { 'ROOT' : [ ['ParameterizedLevel', { "bookmarks":["showroot"], "key":'show'}], ['BranchLevel', {"rules":["sequence","asset"]}], ], 'sequence' :[ ['FormattedLevel', { 'format': "{}x{}", "keys":['sequence','shot'] , 'treeattributes':{'areatype':'shots'}}], ['ParameterizedLevel', { "key":'dept', "collection":"department", 'bookmarks':['workarea']}] ], 'asset' : [ ['FormattedLevel', { 'format': "{}_{}", "keys":['assettype','assetname'] , 'collections':{'assettype':'assettype'}, 'bookmarks':['assetroot'], 'treeattributes':{'areatype':'assets'}}], ['ParameterizedLevel', { "key":'dept', "collection":"department", 'bookmarks':['workarea']}] ] } } ) self.rootdir = "/tmp/dirbtest4/projects" self.d = localclient.LocalClient( self.doc, self.rootdir ) for d in self.dirlist: fulldir = os.path.join( self.rootdir, d ) if not os.path.isdir( fulldir ): os.makedirs( fulldir )