Skip to content

Commit

Permalink
Deploying to gh-pages from @ afdc5b9 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
hrshdhgd committed Feb 9, 2024
1 parent e613d00 commit 18f0794
Show file tree
Hide file tree
Showing 13 changed files with 345 additions and 20 deletions.
10 changes: 10 additions & 0 deletions _sources/codergpt.commenter.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
codergpt.commenter package
==========================

Module contents
---------------

.. automodule:: codergpt.commenter
:members:
:undoc-members:
:show-inheritance:
11 changes: 11 additions & 0 deletions _sources/codergpt.explainer.rst.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
codergpt.explainer package
==========================

Submodules
----------

codergpt.explainer.explainer module
-----------------------------------

.. automodule:: codergpt.explainer.explainer
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

Expand Down
1 change: 1 addition & 0 deletions _sources/codergpt.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Subpackages
.. toctree::
:maxdepth: 4

codergpt.commenter
codergpt.explainer
codergpt.optimizer
codergpt.test_writer
Expand Down
134 changes: 134 additions & 0 deletions codergpt.commenter.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="./">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>codergpt.commenter package &mdash; CoderGPT 0.0.0 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />


<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->

<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=7026087e"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="codergpt.explainer package" href="codergpt.explainer.html" />
<link rel="prev" title="codergpt package" href="codergpt.html" />
</head>

<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >



<a href="index.html" class="icon icon-home">
CoderGPT
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="modules.html">codergpt</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="codergpt.html">codergpt package</a><ul class="current">
<li class="toctree-l3 current"><a class="reference internal" href="codergpt.html#subpackages">Subpackages</a><ul class="current">
<li class="toctree-l4 current"><a class="current reference internal" href="#">codergpt.commenter package</a></li>
<li class="toctree-l4"><a class="reference internal" href="codergpt.explainer.html">codergpt.explainer package</a></li>
<li class="toctree-l4"><a class="reference internal" href="codergpt.optimizer.html">codergpt.optimizer package</a></li>
<li class="toctree-l4"><a class="reference internal" href="codergpt.test_writer.html">codergpt.test_writer package</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="codergpt.html#submodules">Submodules</a></li>
<li class="toctree-l3"><a class="reference internal" href="codergpt.html#codergpt-cli-module">codergpt.cli module</a></li>
<li class="toctree-l3"><a class="reference internal" href="codergpt.html#module-codergpt.constants">codergpt.constants module</a></li>
<li class="toctree-l3"><a class="reference internal" href="codergpt.html#module-codergpt.main">codergpt.main module</a></li>
<li class="toctree-l3"><a class="reference internal" href="codergpt.html#module-codergpt">Module contents</a></li>
</ul>
</li>
</ul>
</li>
</ul>

</div>
</div>
</nav>

<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">CoderGPT</a>
</nav>

<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="modules.html">codergpt</a></li>
<li class="breadcrumb-item"><a href="codergpt.html">codergpt package</a></li>
<li class="breadcrumb-item active">codergpt.commenter package</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/codergpt.commenter.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">

<section id="codergpt-commenter-package">
<h1>codergpt.commenter package<a class="headerlink" href="#codergpt-commenter-package" title="Link to this heading"></a></h1>
<section id="module-codergpt.commenter">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-codergpt.commenter" title="Link to this heading"></a></h2>
<p>Commenter module for the package.</p>
</section>
</section>


</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="codergpt.html" class="btn btn-neutral float-left" title="codergpt package" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="codergpt.explainer.html" class="btn btn-neutral float-right" title="codergpt.explainer package" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>

<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2024, Harshad Hegde &lt;[email protected]&gt;.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.


</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>

</body>
</html>
88 changes: 85 additions & 3 deletions codergpt.explainer.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="codergpt.optimizer package" href="codergpt.optimizer.html" />
<link rel="prev" title="codergpt package" href="codergpt.html" />
<link rel="prev" title="codergpt.commenter package" href="codergpt.commenter.html" />
</head>

<body class="wy-body-for-nav">
Expand All @@ -49,13 +49,14 @@
<li class="toctree-l1 current"><a class="reference internal" href="modules.html">codergpt</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="codergpt.html">codergpt package</a><ul class="current">
<li class="toctree-l3 current"><a class="reference internal" href="codergpt.html#subpackages">Subpackages</a><ul class="current">
<li class="toctree-l4"><a class="reference internal" href="codergpt.commenter.html">codergpt.commenter package</a></li>
<li class="toctree-l4 current"><a class="current reference internal" href="#">codergpt.explainer package</a></li>
<li class="toctree-l4"><a class="reference internal" href="codergpt.optimizer.html">codergpt.optimizer package</a></li>
<li class="toctree-l4"><a class="reference internal" href="codergpt.test_writer.html">codergpt.test_writer package</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="codergpt.html#submodules">Submodules</a></li>
<li class="toctree-l3"><a class="reference internal" href="codergpt.html#module-codergpt.cli">codergpt.cli module</a></li>
<li class="toctree-l3"><a class="reference internal" href="codergpt.html#codergpt-cli-module">codergpt.cli module</a></li>
<li class="toctree-l3"><a class="reference internal" href="codergpt.html#module-codergpt.constants">codergpt.constants module</a></li>
<li class="toctree-l3"><a class="reference internal" href="codergpt.html#module-codergpt.main">codergpt.main module</a></li>
<li class="toctree-l3"><a class="reference internal" href="codergpt.html#module-codergpt">Module contents</a></li>
Expand Down Expand Up @@ -93,6 +94,87 @@

<section id="codergpt-explainer-package">
<h1>codergpt.explainer package<a class="headerlink" href="#codergpt-explainer-package" title="Link to this heading"></a></h1>
<section id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Link to this heading"></a></h2>
</section>
<section id="module-codergpt.explainer.explainer">
<span id="codergpt-explainer-explainer-module"></span><h2>codergpt.explainer.explainer module<a class="headerlink" href="#module-codergpt.explainer.explainer" title="Link to this heading"></a></h2>
<p>Explainer Module.</p>
<dl class="py class">
<dt class="sig sig-object py" id="codergpt.explainer.explainer.CodeExplainer">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">codergpt.explainer.explainer.</span></span><span class="sig-name descname"><span class="pre">CodeExplainer</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">chain</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#codergpt.explainer.explainer.CodeExplainer" title="Link to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Code Explainer class that extracts and explains code from a given file.</p>
<dl class="py method">
<dt class="sig sig-object py" id="codergpt.explainer.explainer.CodeExplainer.explain">
<span class="sig-name descname"><span class="pre">explain</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">classname</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#codergpt.explainer.explainer.CodeExplainer.explain" title="Link to this definition"></a></dt>
<dd><p>Explain the contents of the code file by invoking the runnable chain.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>path</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">Path</span></code>]</span>) – The path to the code file to be explained.</p></li>
<li><p><strong>function</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>]</span>) – The name of the function to explain. Default is None.</p></li>
<li><p><strong>classname</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>]</span>) – The name of the class to explain. Default is None.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="codergpt.explainer.explainer.CodeExplainer.get_function_code">
<span class="sig-name descname"><span class="pre">get_function_code</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">filename</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">function_name</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">class_name</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#codergpt.explainer.explainer.CodeExplainer.get_function_code" title="Link to this definition"></a></dt>
<dd><p>Extract and return the source code of the specified function or class from a file.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>filename</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></span>) – The path to the file containing the code.</p></li>
<li><p><strong>function_name</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>]</span>) – The name of the function to extract code for. Default is None.</p></li>
<li><p><strong>class_name</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>]</span>) – The name of the class to extract code for. Default is None.</p></li>
</ul>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>]</span></p>
</dd>
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>The extracted source code of the specified function or class, if found.</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="codergpt.explainer.explainer.ExpressionEvaluator">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">codergpt.explainer.explainer.</span></span><span class="sig-name descname"><span class="pre">ExpressionEvaluator</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">source_code</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">function_name</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">class_name</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#codergpt.explainer.explainer.ExpressionEvaluator" title="Link to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">NodeVisitor</span></code></p>
<p>Evaluate the code expression and extract the source code of the specified function or class.</p>
<dl class="py method">
<dt class="sig sig-object py" id="codergpt.explainer.explainer.ExpressionEvaluator.visit_ClassDef">
<span class="sig-name descname"><span class="pre">visit_ClassDef</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">node</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#codergpt.explainer.explainer.ExpressionEvaluator.visit_ClassDef" title="Link to this definition"></a></dt>
<dd><p>Visit a ClassDef (class definition) node in the AST.</p>
<p>If the class name matches the target class name, it extracts the source segment.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>node</strong> (<em>ast.ClassDef</em>) – The node representing a class definition in the AST.</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="codergpt.explainer.explainer.ExpressionEvaluator.visit_FunctionDef">
<span class="sig-name descname"><span class="pre">visit_FunctionDef</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">node</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#codergpt.explainer.explainer.ExpressionEvaluator.visit_FunctionDef" title="Link to this definition"></a></dt>
<dd><p>Visit a FunctionDef (function definition) node in the AST.</p>
<p>If the function name matches the target function name, it extracts the source segment.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>node</strong> (<em>ast.FunctionDef</em>) – The node representing a function definition in the AST.</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

</section>
<section id="module-codergpt.explainer">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-codergpt.explainer" title="Link to this heading"></a></h2>
<p>Code explanation module.</p>
Expand All @@ -103,7 +185,7 @@ <h1>codergpt.explainer package<a class="headerlink" href="#codergpt-explainer-pa
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="codergpt.html" class="btn btn-neutral float-left" title="codergpt package" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="codergpt.commenter.html" class="btn btn-neutral float-left" title="codergpt.commenter package" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="codergpt.optimizer.html" class="btn btn-neutral float-right" title="codergpt.optimizer package" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>

Expand Down
Loading

0 comments on commit 18f0794

Please sign in to comment.