def test(pype, keyword, id): """ Run test suite. If --pype is not specified, tests are run against pype-setup. """ if pype: PypeLauncher().run_pype_tests(keyword, id) else: PypeLauncher().run_pype_setup_tests(keyword, id)
def coverage(pype): """ Generate code coverage report. If --pype is not specified, tests are run against pype-setup. """ if pype: PypeLauncher().pype_setup_coverage("pype") else: PypeLauncher().pype_setup_coverage("pypeapp")
def launch(app, project, asset, task, ftrack_server, ftrack_user, ftrack_key, tools, arguments, user): """ Launch registered application name in Pype context. You can define applications in pype-config toml files. Project, asset name and task name must be provided (even if they are not used by app itself). Optionally you can specify ftrack credentials if needed. ARGUMENTS are passed to launched application. """ if ftrack_server: os.environ["FTRACK_SERVER"] = ftrack_server if ftrack_server: os.environ["FTRACK_API_USER"] = ftrack_user if ftrack_server: os.environ["FTRACK_API_KEY"] = ftrack_key if user: os.environ["PYPE_USERNAME"] = user # test required if not project or not asset or not task: print("!!! Missing required arguments") return PypeLauncher().run_application(app, project, asset, task, tools, arguments)
def validate(): """ This command will validate deployment. It needs git installation. """ PypeLauncher().validate()
def eventserver(debug, ftrack_url, ftrack_user, ftrack_api_key, ftrack_events_path, no_stored_credentials, store_credentials, legacy, clockify_api_key, clockify_workspace): """ This command launches ftrack event server. This should be ideally used by system service (such us systemd or upstart on linux and window service). You have to set either proper environment variables to provide URL and credentials or use option to specify them. If you use --store_credentials provided credentials will be stored for later use. """ if debug: os.environ['PYPE_DEBUG'] = "3" # map eventserver options # TODO: switch eventserver to click, normalize option names args = [] if ftrack_url: args.append('-ftrackurl') args.append(ftrack_url) if ftrack_user: args.append('-ftrackuser') args.append(ftrack_user) if ftrack_api_key: args.append('-ftrackapikey') args.append(ftrack_api_key) if ftrack_events_path: args.append('-ftrackeventpaths') args.append(ftrack_events_path) if no_stored_credentials: args.append('-noloadcred') if store_credentials: args.append('-storecred') if legacy: args.append('-legacy') if clockify_api_key: args.append('-clockifyapikey') args.append(clockify_api_key) if clockify_workspace: args.append('-clockifyworkspace') args.append(clockify_workspace) PypeLauncher().launch_eventservercli(args)
def publish(gui, debug, paths): """ Starts CLI publishing. Publish collects json from paths provided as an argument. More than one path is allowed. """ if debug: os.environ['PYPE_DEBUG'] = '3' PypeLauncher().publish(gui, list(paths))
def tray(debug): """ Launch pype tray. Default action of pype command is to launch tray widget to control basic aspects of pype. See documentation for more information. Running pype with `--debug` will result in lot of information useful for debugging to be shown in console. """ PypeLauncher().launch_tray(debug)
def deploy(force): """ Deploy repositories to `repos`. Repositories are defined in `deploy` folder in json files and can be overriden by studio specific configuration. Just create `deploy/studio/deploy.json` and it will take precedence over factory configuration. It needs git installation. """ PypeLauncher().deploy(force)
def install(offline, force): """ This will install pype virtual env. Install destination is `PYPE_ENV`, defaulting to `c:\\Users\\Public\\pype_env2` on Windows and `/opt/pype/pype_env2` on linux. Can be overriden by setting `PYPE_ENV`. Offline installation will not download packages from internet but will look for them in `vendor/packages`. Those can be downloaded by `download` command for every platform needed (pip will download packages only for current platform). """ # offline is ignored as it is used only by shell script during bootstrap PypeLauncher().install(force)
def texturecopy(debug, project, asset, path): """ Copy specified textures to provided asset path. It validates if project and asset exists. Then it will use speedcopy to copy all textures found in all directories under --path to destination folder, determined by template texture in anatomy. I will use source filename and automatically rise version number on directory. Result will be copied without directory structure so it will be flat then. Nothing is written to database. """ if debug: os.environ['PYPE_DEBUG'] = '3' PypeLauncher().texture_copy(project, asset, path)
def validate_config(): """ This will validate all json configuration files for errors. """ PypeLauncher().validate_jsons()
def make_docs(): """ This will generate documentation with Sphinx into `docs/build` """ PypeLauncher().make_docs()
def mongodb(): """ This will launch local mongodb server. Useful for development. """ PypeLauncher().launch_local_mongodb()
def shell(): """ This will exit to shell but with all basic environment set """ PypeLauncher().run_shell()
def settings(develop): """ This will launch local mongodb server. Useful for development. """ PypeLauncher().launch_settings_gui(develop)