def create_project(self): print('') print("Let's start by creating a new project that uses the workflow.") self.pause(2) print("We'll use the 'create_orchestra_project' API call.") self.pause(2) print('The API call looks like this:') print(''' create_orchestra_project( 'simple_workflow', # The slug representing our workflow # noqa 'v1', # The version of the workflow to use # noqa 'A test run of our simple workflow', # A description of the new project 10, # A priority level for the project { 'url': 'http://www.jrbotros.com/' # Data required by the workflow: }, ) ''') self.pause(4) print('Make sure you have the example project running in another ' 'window (`python manage.py runserver`).') input('Press enter when you are ready to make the API call, which ' 'will create a new project and print out its id. ') project_id = create_orchestra_project( None, 'simple_workflow', 'v1', 'A test run of our simple workflow', 10, { 'url': 'http://www.jrbotros.com/' }, 'train', ) print('Project with id {} created!'.format(project_id)) self.pause(2) return project_id
def create_project(self): print('') print("Let's start by creating a new project that uses the workflow.") self.pause(2) print("We'll use the 'create_orchestra_project' API call.") self.pause(2) print('The API call looks like this:') print(''' create_orchestra_project( 'simple_workflow', # The slug representing our workflow # noqa 'A test run of our simple workflow', # A description of the new project 10, # A priority level for the project { 'url': 'http://www.jrbotros.com/' # Data required by the workflow: }, ) ''') self.pause(4) print('Make sure you have the example project running in another ' 'window (`python manage.py runserver`).') input('Press enter when you are ready to make the API call, which ' 'will create a new project and print out its id. ') project_id = create_orchestra_project( None, 'simple_workflow', 'A test run of our simple workflow', 10, { 'url': 'http://www.jrbotros.com/' }, 'https://docs.google.com/document/d/1s0IJycNAwHtZfsUwyo6lCJ7kI9pTOZddcaiRDdZUSAs', # noqa 'train', workflow_version_slug='simple_workflow_v1' ) print('Project with id {} created!'.format(project_id)) self.pause(2) return project_id
def create_project(self): project_id = create_orchestra_project( None, 'journalism', 'v1', 'A test run of our journalism workflow', 10, { 'article_draft_template': '1F9ULJ_eoJFz1whqjK2thsC6gJup2f35IsUUpbcizcfA' # noqa }, 'train', ) print('Project with id {} created!'.format(project_id)) return project_id
def create_project(): project_id = create_orchestra_project( None, 'journalism', 'A test run of our journalism workflow', 10, { 'article_draft_template': '1F9ULJ_eoJFz1whqjK2thsC6gJup2f35IsUUpbcizcfA' # noqa }, 'https://docs.google.com/document/d/1s0IJycNAwHtZfsUwyo6lCJ7kI9pTOZddcaiRDdZUSAs', # noqa 'train', ) print('Project with id {} created!'.format(project_id)) return project_id