diff --git a/.github/workflows/pre-release-robocorp-code.yml b/.github/workflows/pre-release-robocorp-code.yml index e7b5a82a..244a819e 100644 --- a/.github/workflows/pre-release-robocorp-code.yml +++ b/.github/workflows/pre-release-robocorp-code.yml @@ -1,8 +1,8 @@ -on: +on: workflow_dispatch: inputs: version: - description: 'Version' + description: 'Version' required: true name: Pre-release - Sema4.ai Code Extension jobs: @@ -11,114 +11,117 @@ jobs: defaults: run: working-directory: ./sema4ai-code - + strategy: fail-fast: true steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true - name: Setup node uses: actions/setup-node@v4 with: node-version: 20.x - + - name: Yarn install run: yarn install - + - name: Set up Python 3.10 uses: actions/setup-python@v4 with: python-version: "3.10" - + - name: Install deps run: pip install --upgrade pip fire poetry - + - name: Update version run: python -m dev set-version ${{ github.event.inputs.version }} - + - name: Update vscode required version run: python codegen/codegen_package.py env: PYTHONPATH: src - + - name: Vendor sema4ai_ls_core run: python -m dev vendor-robocorp-ls-core - + - name: Fix README references run: python -m dev fix-readme - + - name: Generate LICENSE.md run: python -m dev generate-license-file - + - name: Install locally working-directory: ./sema4ai-code run: poetry install - + - run: npm install -g vsce@2.15.0 - - + + # Platforms: win32-x64, win32-ia32, win32-arm64, linux-x64, linux-arm64, linux-armhf, alpine-x64, alpine-arm64, darwin-x64, darwin-arm64 and web. - + # Deal with Windows -------------- - name: Download rcc for windows run: python -m dev download-rcc win32 - + - run: vsce package --pre-release --target win32-x64 -o sema4ai-code-win32-x64.vsix - uses: actions/upload-artifact@v4 with: name: sema4ai-code-win32-x64.vsix path: ./sema4ai-code/sema4ai-code-win32-x64.vsix - + - name: Publish pre-release to vscode marketplace run: vsce publish --packagePath ./sema4ai-code-win32-x64.vsix -p $VSCODE_VSCE_TOKEN --pre-release env: - VSCE_TOKEN: ${{ secrets.VSCODE_VSCE_TOKEN }} - + VSCODE_VSCE_TOKEN: ${{ secrets.VSCODE_VSCE_TOKEN }} + # Deal with Linux -------------- - name: Download rcc for linux run: python -m dev download-rcc linux - + - run: vsce package --pre-release --target linux-x64 -o sema4ai-code-linux-x64.vsix - uses: actions/upload-artifact@v4 with: name: sema4ai-code-linux-x64.vsix path: ./sema4ai-code/sema4ai-code-linux-x64.vsix - + - name: Publish pre-release to vscode marketplace run: vsce publish --packagePath ./sema4ai-code-linux-x64.vsix -p $VSCODE_VSCE_TOKEN --pre-release env: - VSCE_TOKEN: ${{ secrets.VSCODE_VSCE_TOKEN }} - + VSCODE_VSCE_TOKEN: ${{ secrets.VSCODE_VSCE_TOKEN }} + # Deal with Darwin x64 -------------- - name: Download rcc for darwin run: python -m dev download-rcc darwin - + - run: vsce package --pre-release --target darwin-x64 -o sema4ai-code-darwin-x64.vsix - uses: actions/upload-artifact@v4 with: name: sema4ai-code-darwin-x64.vsix path: ./sema4ai-code/sema4ai-code-darwin-x64.vsix - + - name: Publish pre-release to vscode marketplace run: vsce publish --packagePath ./sema4ai-code-darwin-x64.vsix -p $VSCODE_VSCE_TOKEN --pre-release env: - VSCE_TOKEN: ${{ secrets.VSCODE_VSCE_TOKEN }} - + VSCODE_VSCE_TOKEN: ${{ secrets.VSCODE_VSCE_TOKEN }} + # Deal with Darwin arm64 -------------- - name: Download rcc for darwin run: python -m dev download-rcc darwin - + - run: vsce package --pre-release --target darwin-arm64 -o sema4ai-code-darwin-arm64.vsix - uses: actions/upload-artifact@v4 with: name: sema4ai-code-darwin-arm64.vsix path: ./sema4ai-code/sema4ai-code-darwin-arm64.vsix - + - name: Publish pre-release to vscode marketplace run: vsce publish --packagePath ./sema4ai-code-darwin-arm64.vsix -p $VSCODE_VSCE_TOKEN --pre-release env: - VSCE_TOKEN: ${{ secrets.VSCODE_VSCE_TOKEN }} + VSCODE_VSCE_TOKEN: ${{ secrets.VSCODE_VSCE_TOKEN }} diff --git a/.github/workflows/release-robocorp-code-vscode.yml b/.github/workflows/release-robocorp-code-vscode.yml index ac4ea5bd..ca34097d 100644 --- a/.github/workflows/release-robocorp-code-vscode.yml +++ b/.github/workflows/release-robocorp-code-vscode.yml @@ -11,7 +11,7 @@ jobs: defaults: run: working-directory: ./sema4ai-code - + strategy: fail-fast: true @@ -39,90 +39,90 @@ jobs: working-directory: ./sema4ai-code run: poetry install - run: npm install -g vsce@2.15.0 - + - name: Check tag version run: python -m dev check-tag-version # Deal with Windows -------------- - name: Download rcc for windows run: python -m dev download-rcc win32 - + - run: vsce package --target win32-x64 -o sema4ai-code-win32-x64.vsix - uses: actions/upload-artifact@v4 with: name: sema4ai-code-win32-x64.vsix path: ./sema4ai-code/sema4ai-code-win32-x64.vsix - + - name: Publish pre-release to vscode marketplace run: vsce publish --packagePath ./sema4ai-code-win32-x64.vsix -p $VSCODE_VSCE_TOKEN env: - VSCE_TOKEN: ${{ secrets.VSCODE_VSCE_TOKEN }} - - - name: Publish windows to open vsx marketplace + VSCODE_VSCE_TOKEN: ${{ secrets.VSCODE_VSCE_TOKEN }} + + - name: Publish windows to open vsx marketplace run: npx ovsx publish sema4ai-code-win32-x64.vsix -p $VSCODE_OPEN_VSX_TOKEN env: - OPEN_VSX_TOKEN: ${{ secrets.VSCODE_OPEN_VSX_TOKEN }} - + VSCODE_OPEN_VSX_TOKEN: ${{ secrets.VSCODE_OPEN_VSX_TOKEN }} + # Deal with Linux -------------- - name: Download rcc for linux run: python -m dev download-rcc linux - + - run: vsce package --target linux-x64 -o sema4ai-code-linux-x64.vsix - uses: actions/upload-artifact@v4 with: name: sema4ai-code-linux-x64.vsix path: ./sema4ai-code/sema4ai-code-linux-x64.vsix - + - name: Publish pre-release to vscode marketplace run: vsce publish --packagePath ./sema4ai-code-linux-x64.vsix -p $VSCODE_VSCE_TOKEN env: - VSCE_TOKEN: ${{ secrets.VSCODE_VSCE_TOKEN }} - - - name: Publish linux to open vsx marketplace + VSCODE_VSCE_TOKEN: ${{ secrets.VSCODE_VSCE_TOKEN }} + + - name: Publish linux to open vsx marketplace run: npx ovsx publish sema4ai-code-linux-x64.vsix -p $VSCODE_OPEN_VSX_TOKEN env: - OPEN_VSX_TOKEN: ${{ secrets.VSCODE_OPEN_VSX_TOKEN }} - + VSCODE_OPEN_VSX_TOKEN: ${{ secrets.VSCODE_OPEN_VSX_TOKEN }} + # Deal with Darwin x64 -------------- - name: Download rcc for darwin run: python -m dev download-rcc darwin - + - run: vsce package --target darwin-x64 -o sema4ai-code-darwin-x64.vsix - uses: actions/upload-artifact@v4 with: name: sema4ai-code-darwin-x64.vsix path: ./sema4ai-code/sema4ai-code-darwin-x64.vsix - + - name: Publish pre-release to vscode marketplace run: vsce publish --packagePath ./sema4ai-code-darwin-x64.vsix -p $VSCODE_VSCE_TOKEN env: - VSCE_TOKEN: ${{ secrets.VSCODE_VSCE_TOKEN }} - - - name: Publish darwin to open vsx marketplace + VSCODE_VSCE_TOKEN: ${{ secrets.VSCODE_VSCE_TOKEN }} + + - name: Publish darwin to open vsx marketplace run: npx ovsx publish sema4ai-code-darwin-x64.vsix -p $VSCODE_OPEN_VSX_TOKEN env: - OPEN_VSX_TOKEN: ${{ secrets.VSCODE_OPEN_VSX_TOKEN }} - + VSCODE_OPEN_VSX_TOKEN: ${{ secrets.VSCODE_OPEN_VSX_TOKEN }} + # Deal with Darwin arm64 -------------- - name: Download rcc for darwin run: python -m dev download-rcc darwin - + - run: vsce package --target darwin-arm64 -o sema4ai-code-darwin-arm64.vsix - uses: actions/upload-artifact@v4 with: name: sema4ai-code-darwin-arm64.vsix path: ./sema4ai-code/sema4ai-code-darwin-arm64.vsix - + - name: Publish pre-release to vscode marketplace run: vsce publish --packagePath ./sema4ai-code-darwin-arm64.vsix -p $VSCODE_VSCE_TOKEN env: VSCODE_VSCE_TOKEN: ${{ secrets.VSCODE_VSCE_TOKEN }} - - - name: Publish darwin to open vsx marketplace + + - name: Publish darwin to open vsx marketplace run: npx ovsx publish sema4ai-code-darwin-arm64.vsix -p $VSCODE_OPEN_VSX_TOKEN env: - OPEN_VSX_TOKEN: ${{ secrets.VSCODE_OPEN_VSX_TOKEN }} \ No newline at end of file + VSCODE_OPEN_VSX_TOKEN: ${{ secrets.VSCODE_OPEN_VSX_TOKEN }} \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index f3bf8d0e..00000000 --- a/README.md +++ /dev/null @@ -1,100 +0,0 @@ -This is the repository containing `Sema4.ai Code`: A Visual Studio Code Extension for `AI Actions` and `Robot Tasks` development. - -Note: If you previously used `Robocorp Code`, `Sema4.ai Code` should now be used instead (it should contain most features -for `Robot Tasks` development from `Robocorp Code` along with new features to support the development of AI Actions) - -## Sema4.ai VS Code extension - -The Sema4.ai extension makes it easy to create Python based automation projects and AI Actions. - -It can be used to scale up from simple image fetching or API calling all the way to complex process enterprise automation workflows. - -Main features include: - -- **Create, run and debug AI Actions** - Sema4.ai AI Actions provides end-to-end stack supporting every type of connection between AI and your apps and data. You are in control where to run the code and everything is built for easiness, security, and scalability. - -- **Automatic configuration of dependencies** - Every Python oriented project uses its own lightweight virtual environment and runs in isolation. - -- **Inspector for Web, Windows Application Elements & more** - Pick elements from different mediums and create locators for automation - -- **Create, run and debug projects** - Do these with ease while developing Tasks to automate applications - -- **Deploy projects to Control Room** - Run unattended automation in a safe, reliable and easy to use Cloud Platform. - -> Note: the use of cloud-based orchestration in [Control Room](https://cloud.robocorp.com/) requires a free account. - -![Example of a Robot running with the extension](images/gif_run.gif) - -### Get Started - -1. Download [Sema4.ai VS Code extension - basic tutorial](https://robocorp.com/portal/robot/robocorp/example-vscode-basics), and open it in VS Code. - -2. Open the command palette - (Windows, Linux): `CTRL-SHIFT-P` (macOS): `CMD-SHIFT-P` - -3. Select the command `Sema4.ai: Run Task Package (Robot)` - -![image of command palette](images/command-palette.png) - -4. Select the Task to run (only if the Task Package contains more than one task). - -> Note: You can do the same actions from the side bar after opening the Extension tab in VS Code. - -Find more examples and tutorials at the [Robocorp Portal](https://robocorp.com/robots/). -You can also find helpful videos on the [YouTube Robocorp channel](https://www.youtube.com/watch?v=FaN7IUA8a0w&list=PLfXJKwwF049Dpl35x7i6sTTvIzlUaMChU). - -Full instructions are available at the [Product Manual](https://robocorp.com/docs/product-manuals/sema4ai-code) for the VS Code Extension. - -This is under active development, so please [contact us](https://robocorp.com/contact-us) for issues and feature requests. - -### Requirements - -Supported operating systems: Windows 10, Linux or Mac OS. - -### Installation - -Find the full installation instructions at [https://robocorp.com/docs/visual-studio-code/extension-features](https://robocorp.com/docs/visual-studio-code/extension-features). - -### Configuration - -During the first activation, the extension will download additional dependencies (such as Conda manager) that are required for it to run. - -### Features (1.22.1) - -- Preliminary Support for [Robocorp Action Server](https://github.com/robocorp/robocorp/action_server) (Coding Actions for AIs). - - Packages view supporting Action Packages. - - Create Action Package. - - Run/Debug Action from Action Package. - - Validation for [package.yaml](https://github.com/robocorp/robocorp/blob/master/action_server/docs/guides/01-package-yaml.md). -- Support for [Robo](https://github.com/robocorp/robocorp) (Robocorp's Python Framework for automation). - - Ctrl+Click on terminal for the 'Robocorp html Log` opens external browser. - - Code Lenses to `Run Task` / `Debug Task` for tasks decorated with `@task`. - - `ROBO TASKS OUTPUT` which shows the output of tasks run with `@task`. -- Support for [Work Items](https://robocorp.com/docs/developer-tools/visual-studio-code/extension-features#using-work-items). -- Create a Task Package from a pre-configured template using the `Robocorp: Create Task Package (Robot)` action. -- Upload a Robot to the cloud with the `Robocorp: Upload Task Package (Robot) to Control Room` action. -- Link to the cloud with the `Robocorp: Link to Control Room` action. -- Unlink from the cloud with the `Robocorp: Unlink and remove credentials from Control Room` action. -- Verify Robot for inconsistencies with `Robocorp: Robot Configuration Diagnostics` action. -- Create a terminal with a Robot environment through the `Robocorp: Terminal with Task Package (Robot) environment` action. -- Run a Robot with the `Robocorp: Run Task Package (Robot)` action. -- Debug a Robot with the `Robocorp: Debug Task Package (Robot)` action. - It's possible to debug plain Python tasks using the Python extension or Robot Framework tasks using the Robot Framework Language Server (in which case the task must start with `python -m robot` and finish with the folder/filename to be run). -- When a [robot.yaml](https://robocorp.com/docs/setup/robot-yaml-format) is found, it utilises the related Python environment when running/debugging `.robot` files using the RobotFramework Language Server. -- Set the pythonPath configuration to get code completion in the Python extension through the `Set pythonPath based on robot.yaml` action. -- View, launch and debug Robots from the `Robots` view. -- View and create new [Browser Locators](https://robocorp.com/docs/development-howtos/browser/how-to-find-user-interface-elements-using-locators-in-web-applications) from the `Locators` view. -- View and create new [Image Locators](https://robocorp.com/docs/product-manuals/robocorp-lab/locating-and-targeting-user-interface-elements-in-robocorp-lab) from the `Locators` view. -- When hovering over a `"screenshot"`, `"path"` or `"source"` element in the `locators.json`, a preview is shown. -- Send issue reports with the `Robocorp: Submit issue` action. -- Robocorp Inspector is now integrated within the extension - access it from the side bar or via command palette - -### Developing - -See: [Developing](docs/develop.md) for details on how to develop the `Robocorp Code` extension. - -### Reporting Issues - -Issues may be reported in the [GitHub Issues](https://github.com/Sema4AI/vscode-extension//issues/new/choose). - -Contact us via Slack: [robocorp-developers.slack.com](https://robocorp-developers.slack.com/ssb/redirect) - -## License: Apache 2.0 diff --git a/sema4ai-code/README.md b/sema4ai-code/README.md index 2cd6a737..f3bf8d0e 100644 --- a/sema4ai-code/README.md +++ b/sema4ai-code/README.md @@ -1 +1,100 @@ -This folder contains the sources for `Sema4.ai Code`. \ No newline at end of file +This is the repository containing `Sema4.ai Code`: A Visual Studio Code Extension for `AI Actions` and `Robot Tasks` development. + +Note: If you previously used `Robocorp Code`, `Sema4.ai Code` should now be used instead (it should contain most features +for `Robot Tasks` development from `Robocorp Code` along with new features to support the development of AI Actions) + +## Sema4.ai VS Code extension + +The Sema4.ai extension makes it easy to create Python based automation projects and AI Actions. + +It can be used to scale up from simple image fetching or API calling all the way to complex process enterprise automation workflows. + +Main features include: + +- **Create, run and debug AI Actions** - Sema4.ai AI Actions provides end-to-end stack supporting every type of connection between AI and your apps and data. You are in control where to run the code and everything is built for easiness, security, and scalability. + +- **Automatic configuration of dependencies** - Every Python oriented project uses its own lightweight virtual environment and runs in isolation. + +- **Inspector for Web, Windows Application Elements & more** - Pick elements from different mediums and create locators for automation + +- **Create, run and debug projects** - Do these with ease while developing Tasks to automate applications + +- **Deploy projects to Control Room** - Run unattended automation in a safe, reliable and easy to use Cloud Platform. + +> Note: the use of cloud-based orchestration in [Control Room](https://cloud.robocorp.com/) requires a free account. + +![Example of a Robot running with the extension](images/gif_run.gif) + +### Get Started + +1. Download [Sema4.ai VS Code extension - basic tutorial](https://robocorp.com/portal/robot/robocorp/example-vscode-basics), and open it in VS Code. + +2. Open the command palette - (Windows, Linux): `CTRL-SHIFT-P` (macOS): `CMD-SHIFT-P` + +3. Select the command `Sema4.ai: Run Task Package (Robot)` + +![image of command palette](images/command-palette.png) + +4. Select the Task to run (only if the Task Package contains more than one task). + +> Note: You can do the same actions from the side bar after opening the Extension tab in VS Code. + +Find more examples and tutorials at the [Robocorp Portal](https://robocorp.com/robots/). +You can also find helpful videos on the [YouTube Robocorp channel](https://www.youtube.com/watch?v=FaN7IUA8a0w&list=PLfXJKwwF049Dpl35x7i6sTTvIzlUaMChU). + +Full instructions are available at the [Product Manual](https://robocorp.com/docs/product-manuals/sema4ai-code) for the VS Code Extension. + +This is under active development, so please [contact us](https://robocorp.com/contact-us) for issues and feature requests. + +### Requirements + +Supported operating systems: Windows 10, Linux or Mac OS. + +### Installation + +Find the full installation instructions at [https://robocorp.com/docs/visual-studio-code/extension-features](https://robocorp.com/docs/visual-studio-code/extension-features). + +### Configuration + +During the first activation, the extension will download additional dependencies (such as Conda manager) that are required for it to run. + +### Features (1.22.1) + +- Preliminary Support for [Robocorp Action Server](https://github.com/robocorp/robocorp/action_server) (Coding Actions for AIs). + - Packages view supporting Action Packages. + - Create Action Package. + - Run/Debug Action from Action Package. + - Validation for [package.yaml](https://github.com/robocorp/robocorp/blob/master/action_server/docs/guides/01-package-yaml.md). +- Support for [Robo](https://github.com/robocorp/robocorp) (Robocorp's Python Framework for automation). + - Ctrl+Click on terminal for the 'Robocorp html Log` opens external browser. + - Code Lenses to `Run Task` / `Debug Task` for tasks decorated with `@task`. + - `ROBO TASKS OUTPUT` which shows the output of tasks run with `@task`. +- Support for [Work Items](https://robocorp.com/docs/developer-tools/visual-studio-code/extension-features#using-work-items). +- Create a Task Package from a pre-configured template using the `Robocorp: Create Task Package (Robot)` action. +- Upload a Robot to the cloud with the `Robocorp: Upload Task Package (Robot) to Control Room` action. +- Link to the cloud with the `Robocorp: Link to Control Room` action. +- Unlink from the cloud with the `Robocorp: Unlink and remove credentials from Control Room` action. +- Verify Robot for inconsistencies with `Robocorp: Robot Configuration Diagnostics` action. +- Create a terminal with a Robot environment through the `Robocorp: Terminal with Task Package (Robot) environment` action. +- Run a Robot with the `Robocorp: Run Task Package (Robot)` action. +- Debug a Robot with the `Robocorp: Debug Task Package (Robot)` action. - It's possible to debug plain Python tasks using the Python extension or Robot Framework tasks using the Robot Framework Language Server (in which case the task must start with `python -m robot` and finish with the folder/filename to be run). +- When a [robot.yaml](https://robocorp.com/docs/setup/robot-yaml-format) is found, it utilises the related Python environment when running/debugging `.robot` files using the RobotFramework Language Server. +- Set the pythonPath configuration to get code completion in the Python extension through the `Set pythonPath based on robot.yaml` action. +- View, launch and debug Robots from the `Robots` view. +- View and create new [Browser Locators](https://robocorp.com/docs/development-howtos/browser/how-to-find-user-interface-elements-using-locators-in-web-applications) from the `Locators` view. +- View and create new [Image Locators](https://robocorp.com/docs/product-manuals/robocorp-lab/locating-and-targeting-user-interface-elements-in-robocorp-lab) from the `Locators` view. +- When hovering over a `"screenshot"`, `"path"` or `"source"` element in the `locators.json`, a preview is shown. +- Send issue reports with the `Robocorp: Submit issue` action. +- Robocorp Inspector is now integrated within the extension - access it from the side bar or via command palette + +### Developing + +See: [Developing](docs/develop.md) for details on how to develop the `Robocorp Code` extension. + +### Reporting Issues + +Issues may be reported in the [GitHub Issues](https://github.com/Sema4AI/vscode-extension//issues/new/choose). + +Contact us via Slack: [robocorp-developers.slack.com](https://robocorp-developers.slack.com/ssb/redirect) + +## License: Apache 2.0 diff --git a/sema4ai-code/images/icon.png b/sema4ai-code/images/icon.png index 036a4c82..f83c4aad 100644 Binary files a/sema4ai-code/images/icon.png and b/sema4ai-code/images/icon.png differ