diff --git a/_sources/description.rst.txt b/_sources/description.rst.txt index 78b9637..281052d 100644 --- a/_sources/description.rst.txt +++ b/_sources/description.rst.txt @@ -130,20 +130,20 @@ Commands .. code-block:: python - # example.py + # example.py - def calculate_sum(numbers): - result = 0 - for number in numbers: - result += number - return result + def calculate_sum(numbers): + result = 0 + for number in numbers: + result += number + return result - class MathOperations: - def multiply(self, a, b): - answer = 0 - for i in range(b): - answer += a - return answer + class MathOperations: + def multiply(self, a, b): + answer = 0 + for i in range(b): + answer += a + return answer .. code-block:: shell @@ -152,6 +152,9 @@ Commands results in .... .. code-block:: python + + # example.py + """ Optimized and Documented Code. """ @@ -199,6 +202,7 @@ Commands By using these optimizations, we improve the efficiency and readability of the code. """ + Development ----------- diff --git a/description.html b/description.html index 6482c12..0c059c9 100644 --- a/description.html +++ b/description.html @@ -214,6 +214,56 @@

Commands

results in ….

+
# example.py
+
+"""
+Optimized and Documented Code.
+"""
+
+from typing import List
+
+
+def calculate_sum(numbers: List[int]) -> int:
+    """
+    Calculates the sum of a list of numbers.
+
+    Parameters:
+    numbers (List[int]): A list of integers.
+
+    Returns:
+    int: The sum of the numbers.
+
+    """
+    result = sum(numbers)
+    return result
+
+
+class MathOperations:
+    def multiply(self, a: int, b: int) -> int:
+        """
+        Multiplies two numbers.
+
+        Parameters:
+        a (int): The first number.
+        b (int): The second number.
+
+        Returns:
+        int: The result of multiplying a and b.
+
+        """
+        answer = a * b
+        return answer
+
+
+"""
+Optimization:
+
+1. In the 'calculate_sum' function, we can use the built-in 'sum' function to calculate the sum of the numbers in the list. This is more efficient than manually iterating over the list and adding each number to the result.
+2. In the 'multiply' method of the 'MathOperations' class, we can directly multiply the two numbers using the '*' operator. This eliminates the need for a loop and improves performance.
+By using these optimizations, we improve the efficiency and readability of the code.
+"""
+
+
diff --git a/searchindex.js b/searchindex.js index 2b0c9b0..6172c94 100644 --- a/searchindex.js +++ b/searchindex.js @@ -1 +1 @@ -Search.setIndex({"docnames": ["codergpt", "codergpt.commenter", "codergpt.explainer", "codergpt.optimizer", "codergpt.test_writer", "codergpt.utils", "description", "developer", "index", "modules"], "filenames": ["codergpt.rst", "codergpt.commenter.rst", "codergpt.explainer.rst", "codergpt.optimizer.rst", "codergpt.test_writer.rst", "codergpt.utils.rst", "description.rst", "developer.rst", "index.rst", "modules.rst"], "titles": ["codergpt package", "codergpt.commenter package", "codergpt.explainer package", "codergpt.optimizer package", "codergpt.test_writer package", "codergpt.utils package", "CoderGPT", "Developer Documentation", "Welcome to CoderGPT\u2019s documentation!", "codergpt"], "terms": {"comment": [0, 6, 7, 9], "codecomment": [0, 1, 7, 9], "explain": [0, 1, 3, 6, 7, 9], "codeexplain": [0, 2, 7, 9], "optim": [0, 6, 7, 9], "codeoptim": [0, 3, 7, 9], "test_writ": [0, 9], "util": [0, 7, 9], "expression_evalu": [0, 9], "expressionevalu": [0, 5], "visit_classdef": [0, 5], "visit_functiondef": [0, 5], "all": 0, "us": [0, 5, 6, 7], "python": [0, 6, 8], "file": [0, 1, 2, 3, 6, 8], "class": [0, 1, 2, 3, 5, 6, 8], "model": [0, 7], "gpt": 0, "3": 0, "5": 0, "turbo": 0, "base": [0, 1, 2, 3, 5], "object": [0, 1, 2, 3], "path": [0, 2, 3, 6, 7], "overwrit": [0, 1, 3, 6, 7], "fals": [0, 1, 3], "add": [0, 6, 7], "code": [0, 1, 2, 3, 5, 6, 7], "paramet": [0, 1, 2, 3, 5, 6, 7], "union": [0, 7], "str": [0, 1, 2, 3], "The": [0, 1, 2, 3, 5, 6, 7], "bool": [0, 1], "whether": [0, 1], "exist": [0, 6], "default": [0, 1, 2, 3], "i": [0, 1, 2, 3, 7, 8], "function": [0, 2, 3, 5, 6, 7], "none": [0, 1, 2, 3, 5], "classnam": [0, 2, 3, 6, 7], "option": [0, 2, 3, 8], "name": [0, 2, 3, 5, 6], "get_cod": [0, 9], "filenam": [0, 1, 3], "function_nam": [0, 5, 6], "class_nam": [0, 5, 6], "extract": [0, 1, 2, 3, 5], "return": [0, 6], "sourc": [0, 5], "specifi": [0, 5], "from": [0, 1, 2, 3, 6, 7], "contain": [0, 1, 7], "type": [0, 6, 7], "found": 0, "inspect_packag": [0, 7, 9], "inspect": [0, 6, 7], "displai": [0, 6], "map": [0, 6, 7], "languag": [0, 1, 2, 6, 7], "tabl": 0, "directori": 0, "tester": [0, 9], "test": [0, 4, 6, 7], "chain": [0, 1, 2, 3], "given": [0, 1, 2, 3, 6], "string": [0, 1], "invok": [0, 1, 2, 3], "runnabl": [0, 1, 2, 3], "write": [0, 1, 4], "new": [0, 1, 6], "origin": [0, 1], "A": [0, 1], "boolean": [0, 1], "indic": [0, 1], "explan": [2, 6, 7], "evalu": 5, "express": 5, "source_cod": 5, "nodevisitor": 5, "node": 5, "visit": 5, "classdef": 5, "definit": 5, "ast": 5, "If": 5, "match": 5, "target": 5, "segment": 5, "repres": 5, "functiondef": 5, "project": [5, 6, 7], "gener": [6, 7], "modifi": 6, "It": [6, 7], "allow": 6, "enhanc": 6, "ad": [6, 7], "power": [6, 7], "llm": 6, "tthi": 6, "langchain": 6, "To": [6, 7], "clone": 6, "repositori": 6, "requir": [6, 7], "depend": [6, 8], "pip": 6, "most": 6, "recent": 6, "data": 6, "can": 6, "directli": 6, "github": 6, "git": 6, "http": 6, "com": 6, "hrshdhgd": 6, "mode": [6, 7], "poetri": 6, "follow": [6, 7], "cd": 6, "run": [6, 7], "syntax": 6, "arg": [6, 7], "v": [6, 7], "verbos": [6, 7], "integ": [6, 7], "set": 6, "level": [6, 7], "0": [6, 7], "1": [6, 7], "2": [6, 7], "q": [6, 7], "quiet": [6, 7], "enabl": 6, "version": [6, 7], "inform": 6, "packag": [6, 7, 8, 9], "exampl": [6, 8], "src": [6, 7], "constant": [6, 7, 9], "py": [6, 7], "__init__": 6, "specif": 6, "within": [6, 7], "thi": [6, 7], "defin": 6, "method": [6, 7], "call": [6, 7], "take": 6, "three": 6, "user": [6, 7], "ha": 6, "choic": 6, "creat": 6, "one": 6, "let": 6, "": 6, "consid": 6, "greet": 6, "def": 6, "f": 6, "hello": 6, "__name__": [6, 7], "__main__": [6, 7], "user_nam": 6, "alic": 6, "print": 6, "result": 6, "messag": 6, "calculate_sum": 6, "number": 6, "mathoper": 6, "multipli": 6, "self": 6, "b": 6, "answer": 6, "rang": 6, "built": [6, 7], "click": [6, 7], "librari": [6, 7], "below": 6, "an": [6, 7], "how": 6, "import": 6, "coder": [6, 7], "argument": [6, 7], "true": 6, "new_command": 6, "logic": 6, "here": 6, "pass": 6, "section": 7, "who": 7, "want": 7, "contribut": 7, "extend": 7, "modul": [7, 8, 9], "provid": 7, "cli": [7, 8, 9], "tool": 7, "facilit": 7, "variou": 7, "oper": 7, "desir": 7, "codergpt_cli": 7, "show": 7, "exit": 7, "content": [7, 9], "friendli": 7, "wai": 7, "interact": 7, "termin": 7, "my_funct": 7, "myclass": 7, "openai_api_kei": 7, "api": 7, "kei": 7, "openai": 7, "servic": 7, "log": 7, "pathlib": 7, "textio": 7, "__version__": 7, "suit": 7, "includ": 7, "perform": 7, "task": 7, "o": 7, "yaml": 7, "langchain_cor": 7, "prompt": 7, "chatprompttempl": 7, "langchain_openai": 7, "chatopenai": 7, "tabul": 7, "extension_map_fil": 7, "gpt_3_5_turbo": 7, "inspection_head": 7, "initi": 7, "Then": 7, "its": 7, "appropri": 7, "extens": 7, "program": 7, "what": 8, "instal": 8, "command": 8, "line": 8, "interfac": 8, "develop": 8, "overview": 8, "usag": 8, "detail": 8, "environ": 8, "variabl": 8, "main": [8, 9], "descript": 8, "index": 8, "search": 8, "page": 8, "subpackag": 9, "submodul": 9}, "objects": {"": [[0, 0, 0, "-", "codergpt"]], "codergpt": [[0, 1, 1, "", "CodeCommenter"], [0, 1, 1, "", "CodeExplainer"], [0, 1, 1, "", "CodeOptimizer"], [0, 1, 1, "", "CoderGPT"], [1, 0, 0, "-", "commenter"], [0, 0, 0, "-", "constants"], [2, 0, 0, "-", "explainer"], [0, 0, 0, "-", "main"], [3, 0, 0, "-", "optimizer"], [4, 0, 0, "-", "test_writer"], [5, 0, 0, "-", "utils"]], "codergpt.CodeCommenter": [[0, 2, 1, "", "comment"]], "codergpt.CodeExplainer": [[0, 2, 1, "", "explain"]], "codergpt.CodeOptimizer": [[0, 2, 1, "", "optimize"]], "codergpt.CoderGPT": [[0, 2, 1, "", "commenter"], [0, 2, 1, "", "explainer"], [0, 2, 1, "", "get_code"], [0, 2, 1, "", "inspect_package"], [0, 2, 1, "", "optimizer"], [0, 2, 1, "", "tester"]], "codergpt.commenter": [[1, 1, 1, "", "CodeCommenter"], [1, 0, 0, "-", "commenter"]], "codergpt.commenter.CodeCommenter": [[1, 2, 1, "", "comment"]], "codergpt.commenter.commenter": [[1, 1, 1, "", "CodeCommenter"]], "codergpt.commenter.commenter.CodeCommenter": [[1, 2, 1, "", "comment"]], "codergpt.explainer": [[2, 1, 1, "", "CodeExplainer"], [2, 0, 0, "-", "explainer"]], "codergpt.explainer.CodeExplainer": [[2, 2, 1, "", "explain"]], "codergpt.explainer.explainer": [[2, 1, 1, "", "CodeExplainer"]], "codergpt.explainer.explainer.CodeExplainer": [[2, 2, 1, "", "explain"]], "codergpt.main": [[0, 1, 1, "", "CoderGPT"]], "codergpt.main.CoderGPT": [[0, 2, 1, "", "commenter"], [0, 2, 1, "", "explainer"], [0, 2, 1, "", "get_code"], [0, 2, 1, "", "inspect_package"], [0, 2, 1, "", "optimizer"], [0, 2, 1, "", "tester"]], "codergpt.optimizer": [[3, 1, 1, "", "CodeOptimizer"], [3, 0, 0, "-", "optimizer"]], "codergpt.optimizer.CodeOptimizer": [[3, 2, 1, "", "optimize"]], "codergpt.optimizer.optimizer": [[3, 1, 1, "", "CodeOptimizer"]], "codergpt.optimizer.optimizer.CodeOptimizer": [[3, 2, 1, "", "optimize"]], "codergpt.utils": [[5, 0, 0, "-", "expression_evaluator"]], "codergpt.utils.expression_evaluator": [[5, 1, 1, "", "ExpressionEvaluator"]], "codergpt.utils.expression_evaluator.ExpressionEvaluator": [[5, 2, 1, "", "visit_ClassDef"], [5, 2, 1, "", "visit_FunctionDef"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"]}, "titleterms": {"codergpt": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "packag": [0, 1, 2, 3, 4, 5], "subpackag": 0, "submodul": [0, 1, 2, 3, 5], "cli": [0, 6], "modul": [0, 1, 2, 3, 4, 5], "constant": 0, "main": [0, 7], "content": [0, 1, 2, 3, 4, 5], "comment": 1, "explain": 2, "optim": 3, "test_writ": 4, "util": 5, "expression_evalu": 5, "what": 6, "i": 6, "instal": 6, "command": [6, 7], "line": [6, 7], "interfac": [6, 7], "option": [6, 7], "develop": [6, 7], "document": [7, 8], "overview": 7, "usag": 7, "detail": 7, "exampl": 7, "environ": 7, "variabl": 7, "depend": 7, "python": 7, "file": 7, "class": 7, "descript": 7, "welcom": 8, "": 8, "get": 8, "start": 8, "indic": 8, "tabl": 8}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 60}, "alltitles": {"codergpt package": [[0, "codergpt-package"]], "Subpackages": [[0, "subpackages"]], "Submodules": [[0, "submodules"], [1, "submodules"], [2, "submodules"], [3, "submodules"], [5, "submodules"]], "codergpt.cli module": [[0, "codergpt-cli-module"]], "codergpt.constants module": [[0, "module-codergpt.constants"]], "codergpt.main module": [[0, "module-codergpt.main"]], "Module contents": [[0, "module-codergpt"], [1, "module-codergpt.commenter"], [2, "module-codergpt.explainer"], [3, "module-codergpt.optimizer"], [4, "module-codergpt.test_writer"], [5, "module-codergpt.utils"]], "codergpt.commenter package": [[1, "codergpt-commenter-package"]], "codergpt.commenter.commenter module": [[1, "module-codergpt.commenter.commenter"]], "codergpt.explainer package": [[2, "codergpt-explainer-package"]], "codergpt.explainer.explainer module": [[2, "module-codergpt.explainer.explainer"]], "codergpt.optimizer package": [[3, "codergpt-optimizer-package"]], "codergpt.optimizer.optimizer module": [[3, "module-codergpt.optimizer.optimizer"]], "codergpt.test_writer package": [[4, "codergpt-test-writer-package"]], "codergpt.utils package": [[5, "codergpt-utils-package"]], "codergpt.utils.expression_evaluator module": [[5, "module-codergpt.utils.expression_evaluator"]], "CoderGPT": [[6, "codergpt"]], "What is it?": [[6, "what-is-it"]], "Installation": [[6, "installation"]], "Command Line Interface (CLI)": [[6, "command-line-interface-cli"]], "Options": [[6, "options"], [7, "options"]], "Commands": [[6, "commands"], [7, "commands"]], "Development": [[6, "development"]], "Developer Documentation": [[7, "developer-documentation"]], "Command Line Interface for CoderGPT": [[7, "command-line-interface-for-codergpt"]], "Overview": [[7, "overview"]], "Usage": [[7, "usage"], [7, "id3"]], "Details": [[7, "details"]], "Examples": [[7, "examples"]], "Environment Variables": [[7, "environment-variables"], [7, "id4"]], "Dependencies": [[7, "dependencies"], [7, "id2"]], "Main Python File": [[7, "main-python-file"]], "Classes": [[7, "classes"]], "Description": [[7, "description"]], "Files": [[7, "files"]], "Welcome to CoderGPT\u2019s documentation!": [[8, "welcome-to-codergpt-s-documentation"]], "Getting Started": [[8, null]], "Indices and tables": [[8, "indices-and-tables"]], "codergpt": [[9, "codergpt"]]}, "indexentries": {"codecommenter (class in codergpt)": [[0, "codergpt.CodeCommenter"]], "codeexplainer (class in codergpt)": [[0, "codergpt.CodeExplainer"]], "codeoptimizer (class in codergpt)": [[0, "codergpt.CodeOptimizer"]], "codergpt (class in codergpt)": [[0, "codergpt.CoderGPT"]], "codergpt (class in codergpt.main)": [[0, "codergpt.main.CoderGPT"]], "codergpt": [[0, "module-codergpt"]], "codergpt.constants": [[0, "module-codergpt.constants"]], "codergpt.main": [[0, "module-codergpt.main"]], "comment() (codergpt.codecommenter method)": [[0, "codergpt.CodeCommenter.comment"]], "commenter() (codergpt.codergpt method)": [[0, "codergpt.CoderGPT.commenter"]], "commenter() (codergpt.main.codergpt method)": [[0, "codergpt.main.CoderGPT.commenter"]], "explain() (codergpt.codeexplainer method)": [[0, "codergpt.CodeExplainer.explain"]], "explainer() (codergpt.codergpt method)": [[0, "codergpt.CoderGPT.explainer"]], "explainer() (codergpt.main.codergpt method)": [[0, "codergpt.main.CoderGPT.explainer"]], "get_code() (codergpt.codergpt method)": [[0, "codergpt.CoderGPT.get_code"]], "get_code() (codergpt.main.codergpt method)": [[0, "codergpt.main.CoderGPT.get_code"]], "inspect_package() (codergpt.codergpt method)": [[0, "codergpt.CoderGPT.inspect_package"]], "inspect_package() (codergpt.main.codergpt method)": [[0, "codergpt.main.CoderGPT.inspect_package"]], "module": [[0, "module-codergpt"], [0, "module-codergpt.constants"], [0, "module-codergpt.main"], [1, "module-codergpt.commenter"], [1, "module-codergpt.commenter.commenter"], [2, "module-codergpt.explainer"], [2, "module-codergpt.explainer.explainer"], [3, "module-codergpt.optimizer"], [3, "module-codergpt.optimizer.optimizer"], [4, "module-codergpt.test_writer"], [5, "module-codergpt.utils"], [5, "module-codergpt.utils.expression_evaluator"]], "optimize() (codergpt.codeoptimizer method)": [[0, "codergpt.CodeOptimizer.optimize"]], "optimizer() (codergpt.codergpt method)": [[0, "codergpt.CoderGPT.optimizer"]], "optimizer() (codergpt.main.codergpt method)": [[0, "codergpt.main.CoderGPT.optimizer"]], "tester() (codergpt.codergpt method)": [[0, "codergpt.CoderGPT.tester"]], "tester() (codergpt.main.codergpt method)": [[0, "codergpt.main.CoderGPT.tester"]], "codecommenter (class in codergpt.commenter)": [[1, "codergpt.commenter.CodeCommenter"]], "codecommenter (class in codergpt.commenter.commenter)": [[1, "codergpt.commenter.commenter.CodeCommenter"]], "codergpt.commenter": [[1, "module-codergpt.commenter"]], "codergpt.commenter.commenter": [[1, "module-codergpt.commenter.commenter"]], "comment() (codergpt.commenter.codecommenter method)": [[1, "codergpt.commenter.CodeCommenter.comment"]], "comment() (codergpt.commenter.commenter.codecommenter method)": [[1, "codergpt.commenter.commenter.CodeCommenter.comment"]], "codeexplainer (class in codergpt.explainer)": [[2, "codergpt.explainer.CodeExplainer"]], "codeexplainer (class in codergpt.explainer.explainer)": [[2, "codergpt.explainer.explainer.CodeExplainer"]], "codergpt.explainer": [[2, "module-codergpt.explainer"]], "codergpt.explainer.explainer": [[2, "module-codergpt.explainer.explainer"]], "explain() (codergpt.explainer.codeexplainer method)": [[2, "codergpt.explainer.CodeExplainer.explain"]], "explain() (codergpt.explainer.explainer.codeexplainer method)": [[2, "codergpt.explainer.explainer.CodeExplainer.explain"]], "codeoptimizer (class in codergpt.optimizer)": [[3, "codergpt.optimizer.CodeOptimizer"]], "codeoptimizer (class in codergpt.optimizer.optimizer)": [[3, "codergpt.optimizer.optimizer.CodeOptimizer"]], "codergpt.optimizer": [[3, "module-codergpt.optimizer"]], "codergpt.optimizer.optimizer": [[3, "module-codergpt.optimizer.optimizer"]], "optimize() (codergpt.optimizer.codeoptimizer method)": [[3, "codergpt.optimizer.CodeOptimizer.optimize"]], "optimize() (codergpt.optimizer.optimizer.codeoptimizer method)": [[3, "codergpt.optimizer.optimizer.CodeOptimizer.optimize"]], "codergpt.test_writer": [[4, "module-codergpt.test_writer"]], "expressionevaluator (class in codergpt.utils.expression_evaluator)": [[5, "codergpt.utils.expression_evaluator.ExpressionEvaluator"]], "codergpt.utils": [[5, "module-codergpt.utils"]], "codergpt.utils.expression_evaluator": [[5, "module-codergpt.utils.expression_evaluator"]], "visit_classdef() (codergpt.utils.expression_evaluator.expressionevaluator method)": [[5, "codergpt.utils.expression_evaluator.ExpressionEvaluator.visit_ClassDef"]], "visit_functiondef() (codergpt.utils.expression_evaluator.expressionevaluator method)": [[5, "codergpt.utils.expression_evaluator.ExpressionEvaluator.visit_FunctionDef"]]}}) \ No newline at end of file +Search.setIndex({"docnames": ["codergpt", "codergpt.commenter", "codergpt.explainer", "codergpt.optimizer", "codergpt.test_writer", "codergpt.utils", "description", "developer", "index", "modules"], "filenames": ["codergpt.rst", "codergpt.commenter.rst", "codergpt.explainer.rst", "codergpt.optimizer.rst", "codergpt.test_writer.rst", "codergpt.utils.rst", "description.rst", "developer.rst", "index.rst", "modules.rst"], "titles": ["codergpt package", "codergpt.commenter package", "codergpt.explainer package", "codergpt.optimizer package", "codergpt.test_writer package", "codergpt.utils package", "CoderGPT", "Developer Documentation", "Welcome to CoderGPT\u2019s documentation!", "codergpt"], "terms": {"comment": [0, 6, 7, 9], "codecomment": [0, 1, 7, 9], "explain": [0, 1, 3, 6, 7, 9], "codeexplain": [0, 2, 7, 9], "optim": [0, 6, 7, 9], "codeoptim": [0, 3, 7, 9], "test_writ": [0, 9], "util": [0, 7, 9], "expression_evalu": [0, 9], "expressionevalu": [0, 5], "visit_classdef": [0, 5], "visit_functiondef": [0, 5], "all": 0, "us": [0, 5, 6, 7], "python": [0, 6, 8], "file": [0, 1, 2, 3, 6, 8], "class": [0, 1, 2, 3, 5, 6, 8], "model": [0, 7], "gpt": 0, "3": 0, "5": 0, "turbo": 0, "base": [0, 1, 2, 3, 5], "object": [0, 1, 2, 3], "path": [0, 2, 3, 6, 7], "overwrit": [0, 1, 3, 6, 7], "fals": [0, 1, 3], "add": [0, 6, 7], "code": [0, 1, 2, 3, 5, 6, 7], "paramet": [0, 1, 2, 3, 5, 6, 7], "union": [0, 7], "str": [0, 1, 2, 3], "The": [0, 1, 2, 3, 5, 6, 7], "bool": [0, 1], "whether": [0, 1], "exist": [0, 6], "default": [0, 1, 2, 3], "i": [0, 1, 2, 3, 7, 8], "function": [0, 2, 3, 5, 6, 7], "none": [0, 1, 2, 3, 5], "classnam": [0, 2, 3, 6, 7], "option": [0, 2, 3, 8], "name": [0, 2, 3, 5, 6], "get_cod": [0, 9], "filenam": [0, 1, 3], "function_nam": [0, 5, 6], "class_nam": [0, 5, 6], "extract": [0, 1, 2, 3, 5], "return": [0, 6], "sourc": [0, 5], "specifi": [0, 5], "from": [0, 1, 2, 3, 6, 7], "contain": [0, 1, 7], "type": [0, 6, 7], "found": 0, "inspect_packag": [0, 7, 9], "inspect": [0, 6, 7], "displai": [0, 6], "map": [0, 6, 7], "languag": [0, 1, 2, 6, 7], "tabl": 0, "directori": 0, "tester": [0, 9], "test": [0, 4, 6, 7], "chain": [0, 1, 2, 3], "given": [0, 1, 2, 3, 6], "string": [0, 1], "invok": [0, 1, 2, 3], "runnabl": [0, 1, 2, 3], "write": [0, 1, 4], "new": [0, 1, 6], "origin": [0, 1], "A": [0, 1, 6], "boolean": [0, 1], "indic": [0, 1], "explan": [2, 6, 7], "evalu": 5, "express": 5, "source_cod": 5, "nodevisitor": 5, "node": 5, "visit": 5, "classdef": 5, "definit": 5, "ast": 5, "If": 5, "match": 5, "target": 5, "segment": 5, "repres": 5, "functiondef": 5, "project": [5, 6, 7], "gener": [6, 7], "modifi": 6, "It": [6, 7], "allow": 6, "enhanc": 6, "ad": [6, 7], "power": [6, 7], "llm": 6, "tthi": 6, "langchain": 6, "To": [6, 7], "clone": 6, "repositori": 6, "requir": [6, 7], "depend": [6, 8], "pip": 6, "most": 6, "recent": 6, "data": 6, "can": 6, "directli": 6, "github": 6, "git": 6, "http": 6, "com": 6, "hrshdhgd": 6, "mode": [6, 7], "poetri": 6, "follow": [6, 7], "cd": 6, "run": [6, 7], "syntax": 6, "arg": [6, 7], "v": [6, 7], "verbos": [6, 7], "integ": [6, 7], "set": 6, "level": [6, 7], "0": [6, 7], "1": [6, 7], "2": [6, 7], "q": [6, 7], "quiet": [6, 7], "enabl": 6, "version": [6, 7], "inform": 6, "packag": [6, 7, 8, 9], "exampl": [6, 8], "src": [6, 7], "constant": [6, 7, 9], "py": [6, 7], "__init__": 6, "specif": 6, "within": [6, 7], "thi": [6, 7], "defin": 6, "method": [6, 7], "call": [6, 7], "take": 6, "three": 6, "user": [6, 7], "ha": 6, "choic": 6, "creat": 6, "one": 6, "let": 6, "": 6, "consid": 6, "greet": 6, "def": 6, "f": 6, "hello": 6, "__name__": [6, 7], "__main__": [6, 7], "user_nam": 6, "alic": 6, "print": 6, "result": 6, "messag": 6, "calculate_sum": 6, "number": 6, "mathoper": 6, "multipli": 6, "self": 6, "b": 6, "answer": 6, "rang": 6, "document": 6, "import": 6, "list": 6, "int": 6, "calcul": 6, "sum": 6, "two": 6, "first": 6, "second": 6, "In": 6, "we": 6, "built": [6, 7], "more": 6, "effici": 6, "than": 6, "manual": 6, "iter": 6, "over": 6, "each": 6, "oper": [6, 7], "elimin": 6, "need": 6, "loop": 6, "improv": 6, "perform": [6, 7], "By": 6, "readabl": 6, "click": [6, 7], "librari": [6, 7], "below": 6, "an": [6, 7], "how": 6, "coder": [6, 7], "argument": [6, 7], "true": 6, "new_command": 6, "logic": 6, "here": 6, "pass": 6, "section": 7, "who": 7, "want": 7, "contribut": 7, "extend": 7, "modul": [7, 8, 9], "provid": 7, "cli": [7, 8, 9], "tool": 7, "facilit": 7, "variou": 7, "desir": 7, "codergpt_cli": 7, "show": 7, "exit": 7, "content": [7, 9], "friendli": 7, "wai": 7, "interact": 7, "termin": 7, "my_funct": 7, "myclass": 7, "openai_api_kei": 7, "api": 7, "kei": 7, "openai": 7, "servic": 7, "log": 7, "pathlib": 7, "textio": 7, "__version__": 7, "suit": 7, "includ": 7, "task": 7, "o": 7, "yaml": 7, "langchain_cor": 7, "prompt": 7, "chatprompttempl": 7, "langchain_openai": 7, "chatopenai": 7, "tabul": 7, "extension_map_fil": 7, "gpt_3_5_turbo": 7, "inspection_head": 7, "initi": 7, "Then": 7, "its": 7, "appropri": 7, "extens": 7, "program": 7, "what": 8, "instal": 8, "command": 8, "line": 8, "interfac": 8, "develop": 8, "overview": 8, "usag": 8, "detail": 8, "environ": 8, "variabl": 8, "main": [8, 9], "descript": 8, "index": 8, "search": 8, "page": 8, "subpackag": 9, "submodul": 9}, "objects": {"": [[0, 0, 0, "-", "codergpt"]], "codergpt": [[0, 1, 1, "", "CodeCommenter"], [0, 1, 1, "", "CodeExplainer"], [0, 1, 1, "", "CodeOptimizer"], [0, 1, 1, "", "CoderGPT"], [1, 0, 0, "-", "commenter"], [0, 0, 0, "-", "constants"], [2, 0, 0, "-", "explainer"], [0, 0, 0, "-", "main"], [3, 0, 0, "-", "optimizer"], [4, 0, 0, "-", "test_writer"], [5, 0, 0, "-", "utils"]], "codergpt.CodeCommenter": [[0, 2, 1, "", "comment"]], "codergpt.CodeExplainer": [[0, 2, 1, "", "explain"]], "codergpt.CodeOptimizer": [[0, 2, 1, "", "optimize"]], "codergpt.CoderGPT": [[0, 2, 1, "", "commenter"], [0, 2, 1, "", "explainer"], [0, 2, 1, "", "get_code"], [0, 2, 1, "", "inspect_package"], [0, 2, 1, "", "optimizer"], [0, 2, 1, "", "tester"]], "codergpt.commenter": [[1, 1, 1, "", "CodeCommenter"], [1, 0, 0, "-", "commenter"]], "codergpt.commenter.CodeCommenter": [[1, 2, 1, "", "comment"]], "codergpt.commenter.commenter": [[1, 1, 1, "", "CodeCommenter"]], "codergpt.commenter.commenter.CodeCommenter": [[1, 2, 1, "", "comment"]], "codergpt.explainer": [[2, 1, 1, "", "CodeExplainer"], [2, 0, 0, "-", "explainer"]], "codergpt.explainer.CodeExplainer": [[2, 2, 1, "", "explain"]], "codergpt.explainer.explainer": [[2, 1, 1, "", "CodeExplainer"]], "codergpt.explainer.explainer.CodeExplainer": [[2, 2, 1, "", "explain"]], "codergpt.main": [[0, 1, 1, "", "CoderGPT"]], "codergpt.main.CoderGPT": [[0, 2, 1, "", "commenter"], [0, 2, 1, "", "explainer"], [0, 2, 1, "", "get_code"], [0, 2, 1, "", "inspect_package"], [0, 2, 1, "", "optimizer"], [0, 2, 1, "", "tester"]], "codergpt.optimizer": [[3, 1, 1, "", "CodeOptimizer"], [3, 0, 0, "-", "optimizer"]], "codergpt.optimizer.CodeOptimizer": [[3, 2, 1, "", "optimize"]], "codergpt.optimizer.optimizer": [[3, 1, 1, "", "CodeOptimizer"]], "codergpt.optimizer.optimizer.CodeOptimizer": [[3, 2, 1, "", "optimize"]], "codergpt.utils": [[5, 0, 0, "-", "expression_evaluator"]], "codergpt.utils.expression_evaluator": [[5, 1, 1, "", "ExpressionEvaluator"]], "codergpt.utils.expression_evaluator.ExpressionEvaluator": [[5, 2, 1, "", "visit_ClassDef"], [5, 2, 1, "", "visit_FunctionDef"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"]}, "titleterms": {"codergpt": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "packag": [0, 1, 2, 3, 4, 5], "subpackag": 0, "submodul": [0, 1, 2, 3, 5], "cli": [0, 6], "modul": [0, 1, 2, 3, 4, 5], "constant": 0, "main": [0, 7], "content": [0, 1, 2, 3, 4, 5], "comment": 1, "explain": 2, "optim": 3, "test_writ": 4, "util": 5, "expression_evalu": 5, "what": 6, "i": 6, "instal": 6, "command": [6, 7], "line": [6, 7], "interfac": [6, 7], "option": [6, 7], "develop": [6, 7], "document": [7, 8], "overview": 7, "usag": 7, "detail": 7, "exampl": 7, "environ": 7, "variabl": 7, "depend": 7, "python": 7, "file": 7, "class": 7, "descript": 7, "welcom": 8, "": 8, "get": 8, "start": 8, "indic": 8, "tabl": 8}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 60}, "alltitles": {"codergpt package": [[0, "codergpt-package"]], "Subpackages": [[0, "subpackages"]], "Submodules": [[0, "submodules"], [1, "submodules"], [2, "submodules"], [3, "submodules"], [5, "submodules"]], "codergpt.cli module": [[0, "codergpt-cli-module"]], "codergpt.constants module": [[0, "module-codergpt.constants"]], "codergpt.main module": [[0, "module-codergpt.main"]], "Module contents": [[0, "module-codergpt"], [1, "module-codergpt.commenter"], [2, "module-codergpt.explainer"], [3, "module-codergpt.optimizer"], [4, "module-codergpt.test_writer"], [5, "module-codergpt.utils"]], "codergpt.commenter package": [[1, "codergpt-commenter-package"]], "codergpt.commenter.commenter module": [[1, "module-codergpt.commenter.commenter"]], "codergpt.explainer package": [[2, "codergpt-explainer-package"]], "codergpt.explainer.explainer module": [[2, "module-codergpt.explainer.explainer"]], "codergpt.optimizer package": [[3, "codergpt-optimizer-package"]], "codergpt.optimizer.optimizer module": [[3, "module-codergpt.optimizer.optimizer"]], "codergpt.test_writer package": [[4, "codergpt-test-writer-package"]], "codergpt.utils package": [[5, "codergpt-utils-package"]], "codergpt.utils.expression_evaluator module": [[5, "module-codergpt.utils.expression_evaluator"]], "CoderGPT": [[6, "codergpt"]], "What is it?": [[6, "what-is-it"]], "Installation": [[6, "installation"]], "Command Line Interface (CLI)": [[6, "command-line-interface-cli"]], "Options": [[6, "options"], [7, "options"]], "Commands": [[6, "commands"], [7, "commands"]], "Development": [[6, "development"]], "Developer Documentation": [[7, "developer-documentation"]], "Command Line Interface for CoderGPT": [[7, "command-line-interface-for-codergpt"]], "Overview": [[7, "overview"]], "Usage": [[7, "usage"], [7, "id3"]], "Details": [[7, "details"]], "Examples": [[7, "examples"]], "Environment Variables": [[7, "environment-variables"], [7, "id4"]], "Dependencies": [[7, "dependencies"], [7, "id2"]], "Main Python File": [[7, "main-python-file"]], "Classes": [[7, "classes"]], "Description": [[7, "description"]], "Files": [[7, "files"]], "Welcome to CoderGPT\u2019s documentation!": [[8, "welcome-to-codergpt-s-documentation"]], "Getting Started": [[8, null]], "Indices and tables": [[8, "indices-and-tables"]], "codergpt": [[9, "codergpt"]]}, "indexentries": {"codecommenter (class in codergpt)": [[0, "codergpt.CodeCommenter"]], "codeexplainer (class in codergpt)": [[0, "codergpt.CodeExplainer"]], "codeoptimizer (class in codergpt)": [[0, "codergpt.CodeOptimizer"]], "codergpt (class in codergpt)": [[0, "codergpt.CoderGPT"]], "codergpt (class in codergpt.main)": [[0, "codergpt.main.CoderGPT"]], "codergpt": [[0, "module-codergpt"]], "codergpt.constants": [[0, "module-codergpt.constants"]], "codergpt.main": [[0, "module-codergpt.main"]], "comment() (codergpt.codecommenter method)": [[0, "codergpt.CodeCommenter.comment"]], "commenter() (codergpt.codergpt method)": [[0, "codergpt.CoderGPT.commenter"]], "commenter() (codergpt.main.codergpt method)": [[0, "codergpt.main.CoderGPT.commenter"]], "explain() (codergpt.codeexplainer method)": [[0, "codergpt.CodeExplainer.explain"]], "explainer() (codergpt.codergpt method)": [[0, "codergpt.CoderGPT.explainer"]], "explainer() (codergpt.main.codergpt method)": [[0, "codergpt.main.CoderGPT.explainer"]], "get_code() (codergpt.codergpt method)": [[0, "codergpt.CoderGPT.get_code"]], "get_code() (codergpt.main.codergpt method)": [[0, "codergpt.main.CoderGPT.get_code"]], "inspect_package() (codergpt.codergpt method)": [[0, "codergpt.CoderGPT.inspect_package"]], "inspect_package() (codergpt.main.codergpt method)": [[0, "codergpt.main.CoderGPT.inspect_package"]], "module": [[0, "module-codergpt"], [0, "module-codergpt.constants"], [0, "module-codergpt.main"], [1, "module-codergpt.commenter"], [1, "module-codergpt.commenter.commenter"], [2, "module-codergpt.explainer"], [2, "module-codergpt.explainer.explainer"], [3, "module-codergpt.optimizer"], [3, "module-codergpt.optimizer.optimizer"], [4, "module-codergpt.test_writer"], [5, "module-codergpt.utils"], [5, "module-codergpt.utils.expression_evaluator"]], "optimize() (codergpt.codeoptimizer method)": [[0, "codergpt.CodeOptimizer.optimize"]], "optimizer() (codergpt.codergpt method)": [[0, "codergpt.CoderGPT.optimizer"]], "optimizer() (codergpt.main.codergpt method)": [[0, "codergpt.main.CoderGPT.optimizer"]], "tester() (codergpt.codergpt method)": [[0, "codergpt.CoderGPT.tester"]], "tester() (codergpt.main.codergpt method)": [[0, "codergpt.main.CoderGPT.tester"]], "codecommenter (class in codergpt.commenter)": [[1, "codergpt.commenter.CodeCommenter"]], "codecommenter (class in codergpt.commenter.commenter)": [[1, "codergpt.commenter.commenter.CodeCommenter"]], "codergpt.commenter": [[1, "module-codergpt.commenter"]], "codergpt.commenter.commenter": [[1, "module-codergpt.commenter.commenter"]], "comment() (codergpt.commenter.codecommenter method)": [[1, "codergpt.commenter.CodeCommenter.comment"]], "comment() (codergpt.commenter.commenter.codecommenter method)": [[1, "codergpt.commenter.commenter.CodeCommenter.comment"]], "codeexplainer (class in codergpt.explainer)": [[2, "codergpt.explainer.CodeExplainer"]], "codeexplainer (class in codergpt.explainer.explainer)": [[2, "codergpt.explainer.explainer.CodeExplainer"]], "codergpt.explainer": [[2, "module-codergpt.explainer"]], "codergpt.explainer.explainer": [[2, "module-codergpt.explainer.explainer"]], "explain() (codergpt.explainer.codeexplainer method)": [[2, "codergpt.explainer.CodeExplainer.explain"]], "explain() (codergpt.explainer.explainer.codeexplainer method)": [[2, "codergpt.explainer.explainer.CodeExplainer.explain"]], "codeoptimizer (class in codergpt.optimizer)": [[3, "codergpt.optimizer.CodeOptimizer"]], "codeoptimizer (class in codergpt.optimizer.optimizer)": [[3, "codergpt.optimizer.optimizer.CodeOptimizer"]], "codergpt.optimizer": [[3, "module-codergpt.optimizer"]], "codergpt.optimizer.optimizer": [[3, "module-codergpt.optimizer.optimizer"]], "optimize() (codergpt.optimizer.codeoptimizer method)": [[3, "codergpt.optimizer.CodeOptimizer.optimize"]], "optimize() (codergpt.optimizer.optimizer.codeoptimizer method)": [[3, "codergpt.optimizer.optimizer.CodeOptimizer.optimize"]], "codergpt.test_writer": [[4, "module-codergpt.test_writer"]], "expressionevaluator (class in codergpt.utils.expression_evaluator)": [[5, "codergpt.utils.expression_evaluator.ExpressionEvaluator"]], "codergpt.utils": [[5, "module-codergpt.utils"]], "codergpt.utils.expression_evaluator": [[5, "module-codergpt.utils.expression_evaluator"]], "visit_classdef() (codergpt.utils.expression_evaluator.expressionevaluator method)": [[5, "codergpt.utils.expression_evaluator.ExpressionEvaluator.visit_ClassDef"]], "visit_functiondef() (codergpt.utils.expression_evaluator.expressionevaluator method)": [[5, "codergpt.utils.expression_evaluator.ExpressionEvaluator.visit_FunctionDef"]]}}) \ No newline at end of file