robocorp / rcc

Repeatable, movable and isolated Python environments for your automation. 🚀
https://robocorp.com/docs/
Apache License 2.0
461 stars 97 forks source link

RCC Create Extended Robot Framework template #28

Closed antusystem closed 2 years ago

antusystem commented 2 years ago

Hi, I just use rcc to create a robot with Extended Robot Framework template and the text is this:

myubuntu@myubuntu-pc:~/Robots$ rcc create
? Give robot name [my-first-robot]: 

3Templates:
   1: Basic Python template
   2: Extended Robot Framework template
   3: Playwright template
   4: Producer-consumer model template
   5: Standard Robot Framework template

? Choose a template [1]:2

The Extended Robot Framework template robot has been created to: my-first-robot

Get started with following commands:

$ cd my-first-robot
$ rcc run

The thing is that if I do as said and execute cd my-first-robot and then rcc run something like this will appear:

"/mypath/my-first-robot/robot.yaml" as robot.yaml is:
tasks:
  Run all tasks:
    shell: python -m robot --report NONE --outputdir output --logtitle "Task log" tasks.robot

  Run Example task:
    robotTaskName: Example Task

condaConfigFile: conda.yaml
artifactsDir: output
PATH:
  - .
PYTHONPATH:
  - keywords
  - libraries
  - variables

ignoreFiles:
  - .gitignore

Error: Could not resolve task to run. Available tasks are: Run Example task, Run all tasks

So I guess that this can be rewrited. If this is the first time using rcc and/or robotframework for someone, then they will not understand right away the difference between Run Example task and Run all tasks, neither using rcc run -t Run Example task to run the bot. It took me sometime to learn the difference.

Though, I don't know how often someone will use rcc to create a bot instead of using Visual Studio Code or Robocorp Lab.

Also, I don't know if this is the case for the other templates

vjmp commented 2 years ago

If I'll add these two things:

  1. in rcc create alternative example to run robot in form of rcc run --task "<name of task>"
  2. in rcc run error message gives idea of existence of --task option

Is that enough? Or do you have some other idea which would make it more understandable?

As for templates themselves, they are dynamic and out of rcc's control, and they can contain as many tasks as needed to make robot in template as complete as possible.

And one additional note. Robocorp Lab has reached its end-of-life and Automation Studio is coming: https://robocorp.com/docs/developer-tools/automation-studio

antusystem commented 2 years ago

To me, it would be enought something like this:

myubuntu@myubuntu-pc:~/Robots$ rcc create
? Give robot name [my-first-robot]: 

3Templates:
   1: Basic Python template
   2: Extended Robot Framework template
   3: Playwright template
   4: Producer-consumer model template
   5: Standard Robot Framework template

? Choose a template [1]:2

The Extended Robot Framework template robot has been created to: my-first-robot

Get started with following commands:

$ cd my-first-robot
$ rcc run --task "<name of task>"

Your first option. If the Extended Templated always has only the tasks Run all Task and Run Example task then the last line could be:

$ rcc run --task "Run all Task" or rcc run --task Run Example task

The same logic for the other templates in case the tasks in robot.yaml are always the same.