def create_arg_parser(): """ Many of the argument defaults are used as arg_parser makes it easy to use defaults. The user has many options they can select. """ parser = argparse.ArgumentParser(description='Process some inputs') # script to run pytest parser.add_argument("--test", action="store", default="./tests/ci/run_pytest.py", help="location of script to run pytest") # test folder parser.add_argument("--testfolder", action="store", default="./tests/unit", help="folder where tests are stored") # pytest test markers parser.add_argument("--testmarkers", action="store", default="not notebooks and not spark and not gpu", help="pytest markers indicate tests to run") # test summary file parser.add_argument("--junitxml", action="store", default="reports/test-unit.xml", help="file for returned test results") # max num nodes in Azure cluster parser.add_argument("--maxnodes", action="store", default=4, help="specify the maximum number of nodes for the run") # Azure resource group parser.add_argument("--rg", action="store", default="recommender", help="Azure Resource Group") # AzureML workspace Name parser.add_argument("--wsname", action="store", default="RecoWS", help="AzureML workspace name") # AzureML clustername parser.add_argument("--clustername", action="store", default="amlcompute", help="Set name of Azure cluster") # Azure VM size parser.add_argument("--vmsize", action="store", default="STANDARD_D3_V2", help="Set the size of the VM either STANDARD_D3_V2") # cpu or gpu parser.add_argument("--dockerproc", action="store", default="cpu", help="Base image used in docker container") # Azure subscription id, when used in a pipeline, it is stored in keyvault parser.add_argument("--subid", action="store", default="123456", help="Azure Subscription ID") # ./reco.yaml is created in the azure devops pipeline. # Not recommended to change this. parser.add_argument("--condafile", action="store", default="./reco.yaml", help="file with environment variables") # AzureML experiment name parser.add_argument("--expname", action="store", default="persistentAML", help="experiment name on Azure") # Azure datacenter location parser.add_argument("--location", default="EastUS", help="Azure location") # github repo, stored in AzureML experiment for info purposes parser.add_argument("--reponame", action="store", default="--reponame MyGithubRepo", help="GitHub repo being tested") # github branch, stored in AzureML experiment for info purposes parser.add_argument("--branch", action="store", default="--branch MyGithubBranch", help=" Identify the branch test test is run on") # github pull request, stored in AzureML experiment for info purposes parser.add_argument("--pr", action="store", default="--pr PRTestRun", help="If a pr triggered the test, list it here") args = parser.parse_args() return args