Page cover image

Code Improvement

The code improvement workflow starts with inputting a code snippet, then uses two models to generate improvements: one for making the code more Pythonic and another for identifying and suggesting security improvements. Finally, all improvements are compiled into a Google Doc.

Code Improvement Workflow

Demonstration

Build a Code Review Workflow in Arcee Orchestra

Workflow JSON

JSON for Code Improvement Workflow

To download the workflow, select the JSON file above, then use command/control + S and save with the .json extension.

Input/Output Example

Any python code, such as:

import subprocess
import sys


def install_package(package_name):
  try:
    __import__(package_name)
  except ImportError:
    print(f"{package_name} not found. Installing...")
    subprocess.check_call([sys.executable, "-m", "pip", "install", package_name])


install_package("yfinance")

Last updated