Asset module¶
In the process of transitioning to the concept of an “asset” for use within the project module.
-
class
vsuite.asset.
Asset
(name, relpath, file_expression, project_path, data_dir='.vsuite')¶ Represent a category of vsuite assets
Parameters: - name (str) – name of the asset (e.g. “bibliographies”)
- relpath (str) – path to assset directory relative to project_path
- file_expression (str) – expression to match asset files, parsed by glob.glob
- project_path (str) – path to project or other reference directory
- data_dir (str) – directory within
project_path
to hold data files (.vsuite
, leave unless you know what you’re doing)
-
abspath
()¶ Get absolute path to asset
Parameters: project_path (str) – absolute path to project Returns: absolute path to asset Return type: str
-
abspaths
()¶ Paths of available assets
Get absolute paths of asset files in first level of asset directory
Returns: file paths Return type: tuple
-
copy_to
(dest_asset)¶ Copy asset files from self to another asset
Parameters: dest_asset (vsuite.asset.Asset) – asset to receive files
-
files
()¶ Available asset files
Get asset filenames in first level of asset directory
Returns: asset filenames Return type: tuple
-
print_files
()¶ Print asset files, newline delimitedfile names
-
relpath_pwd
()¶ Get path to asset relative to current directory
Parameters: project_dir (str) – absolute path to project directory Returns: relative path to asset Return type: str