Skip to content

Miragon/robocorp-certification

Repository files navigation

Contributors Forks Stargazers Issues MIT License


About The Project

This is the repository that contains the robots for the different levels of certification.

Getting started

In the tutorials it is recommended to use Visual Studio Code as the IDE. But it is possible to use any other IDE (e.g. PyCharm). These IDEs lacks some of the practical commands of Visual Studio Code, but you can use the rcc command line tool to do this.

  1. RCC
  2. Conda
  3. PyCharm

RCC

In the following sections you will find some useful tips on how to set up and use rcc.

Installation

# MacOS
brew install robocorp/tools/rcc

Autocompletion in ZSH

  1. If the environment variable FPATH does not hold any value add one

    1. Create a new folder in your home directory

      mkdir ~/.zfunc
    2. Open ~/.zshrc in your favorite editor and add the following line

      fpath=(~/.zfunc $fpath)
      
  2. Create the autocompletion script

    rcc completion > ~/.zfunc/_rcc
  3. Make the script executable

    chmod +x ~/.zfunc/_rcc
  4. Reload your shell

    exec zsh

Create a new robot project

Enter the following command in the terminal and follow the instructions.

rcc create

Upload a robot to Control Room

  1. Ensure you have access to the workspace

    1. Open the Control Center
    2. Select your Workspace (top left corner)
    3. Go to User Settings (top right corner)
    4. Go to Access Credentials and add your credentials
  2. Add your credentials to the rcc config

    # Get the Workspace ID
    rcc cloud workspace
    # This will add the credentials to your default account
    rcc configure credentials <YOUR_CREDENTIALS>
    # This will add the credentials to a specific account or will create a new one
    rcc configure -a <YOUR_ACCOUNT> credentials <YOUR_CREDENTIALS>

    Note: You can find the file with the configuration at $ROBOCORP_HOME/rcc.yml (default: ~/.robocorp/rcc.yml)

  3. Create a new robot in your workspace

    rcc cloud new -r <YOUR_DESIRED_TASK_NAME> -w <WORKSPACE_ID>
  4. Push your local robot to Control Room

    # Get the Task ID
    rcc cloud workspace -w <WORKSPACE_ID>
    rcc cloud push -r <TASK_ID> -w <WORKSPACE_ID>

Conda

Installation

# MacOS
brew install miniconda
conda init "$(basename "${SHELL}")"

Create a new environment

If you used rcc to create a new robot project, you can use the conda.yaml file to create a new environment.

conda env create -f conda.yaml -n <your-conda-env>

PyCharm

Setup conda as the Python Interpreter

Open your robot project in PyCharm and add new Python Interpreter

  1. PyCharm > Settings
  2. Project: <your-project-name> > Python Interpreter
  3. Add Interpreter > Add Local Interpreter...
  4. Select Conda Environment > Existing environment
  5. Select <your-conda-env> as the existing environment

Setup Run Configurations

  1. Install EnvFile plugin for using JSON files instead of .env files

    ℹ️ Dependent on the template you used while creating the project with rcc there might already be some environment variables under /devdata. These environment variables are stored in a JSON file.

  2. Add a Run Configuration

    ⚠️ You can find the necessary information for the Run Configurations in the robot.yaml file created by rcc.

    ℹ️ You can find my Run Configurations in .run in the respective project folders.

    Example of a Run Configuration
    Example of a Run Configuration

(back to top)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages