Python Smart AutomationWelcome to Python Smart Automation, an open-source VS Code extension that allows you to choose an LLM (Large Language Model) to automatically generate comments and docstrings for your Python code.
Reopening the Smart Automation SidebarIf the sidebar is closed, you can reopen it by clicking the "Open Smart Automation Sidebar" button. This button, represented by an eye icon, is located in the bottom-left corner of the VS Code window. Supported ModelsRemote Models:
Local Models:
ConfigurationYou can configure the extension to use a specific model by setting the relevant properties in your VS Code settings. Configuring VS Code SettingsVS Code settings are managed through a Using OpenAI ModelsTo use an OpenAI model, set the following properties:
Some properties have default values and do not need to be set explicitly but can be adjusted as desired:
Note: Since DeepSeek uses the OpenAI SDK, DeepSeek models can also be used. Using Hugging Face ModelsTo use a Hugging Face model, set the following properties:
Some properties have default values and do not need to be set explicitly but can be adjusted as desired:
Using Ollama Local ModelsTo use a local model with Ollama, set the following properties:
Additional Notes on Ollama:
Automatic Comment GenerationThe extension automatically generates comments for the currently open Python file every 10 seconds if the file has any changes. You can also manually trigger comment generation by pressing the "Generate Documentation" button. To change the execution interval, modify the For example, to set the interval to 10 seconds (10000 milliseconds):
Keeping Existing Comments UnchangedIf you want to preserve your existing comments, include specific keywords in them, such as:
LLM Response ValidationSince LLM-generated responses might contain errors, you can enable response validation. Keep in mind that validation may take a little extra time.
Set this property to LicenseCopyright (c) 2025 Ata Ul Haye. All rights reserved. This project is licensed under the MIT License. Get Started
Download VS Code and Find the Extension on Marketplace
Report Bugs & Feature RequestsIf you encounter any bugs or have feature requests, please email us at aahmad@daenet.com. Enjoy coding with Python Smart Automation! RoadmapWe started this project for a class at our university and this roadmap served as a guide for us to keep an overview of what we already accomplished and what needed to be done until the deadline. This included also organizational steps and tasks for testing and evaluation. It is unclear at the time what will happen with this project after we finished the class, but we decided to shift the focus of this roadmap to show what has been implemented in which order and afterwards which features could be implemented in the future.
EvaluationTODO here we can post evaluation results Project OverviewTitle: Smartautomation Start Date: November 16, 2024 End Date: February 28, 2025 Supervisor: Visvanathan Ramesh Minimal viable productThe VS Code extension Smartautomation generates automatically comment suggestions for python code in a seperate view and the user can decide to accept them into his/her project or not. The user can select python files and press a button to have these files commented. Estimated Timeline
Actual Workflow
RequirementsFeatures
Graphical User Interface
Configuration SupportEnable users to customize their environment settings through a settings JSON file. This includes options such as defining keyboard shortcuts and specifying the AI model endpoint, providing flexibility to adapt the extension to individual preferences. Non-functional requirementsPerformance: Ensure the extension is lightweight and does not significantly impact VS Code's performance or responsiveness. Compatibility: Support for multiple operating systems, including Windows, macOS, and Linux. This given by default, since VS Code is compatible with every os. Scalability: Initially focused on supporting Python, this project is designed with scalability in mind, allowing for future expansion to accommodate additional programming languages. LicenseThis project is licensed under the MIT license. |