Skip to content

Commit

Permalink
Deploying to gh-pages from @ d1cf1cc 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
hrshdhgd committed Feb 9, 2024
1 parent de60a5c commit b15b78f
Show file tree
Hide file tree
Showing 14 changed files with 598 additions and 63 deletions.
11 changes: 11 additions & 0 deletions _sources/codergpt.commenter.rst.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
codergpt.commenter package
==========================

Submodules
----------

codergpt.commenter.commenter module
-----------------------------------

.. automodule:: codergpt.commenter.commenter
: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 @@ -11,6 +11,7 @@ Subpackages
codergpt.explainer
codergpt.optimizer
codergpt.test_writer
codergpt.utils

Submodules
----------
Expand Down
21 changes: 21 additions & 0 deletions _sources/codergpt.utils.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
codergpt.utils package
======================

Submodules
----------

codergpt.utils.expression\_evaluator module
-------------------------------------------

.. automodule:: codergpt.utils.expression_evaluator
:members:
:undoc-members:
:show-inheritance:

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

.. automodule:: codergpt.utils
:members:
:undoc-members:
:show-inheritance:
52 changes: 52 additions & 0 deletions codergpt.commenter.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
<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>
<li class="toctree-l4"><a class="reference internal" href="codergpt.utils.html">codergpt.utils package</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="codergpt.html#submodules">Submodules</a></li>
Expand Down Expand Up @@ -94,9 +95,60 @@

<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="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Link to this heading"></a></h2>
</section>
<section id="module-codergpt.commenter.commenter">
<span id="codergpt-commenter-commenter-module"></span><h2>codergpt.commenter.commenter module<a class="headerlink" href="#module-codergpt.commenter.commenter" title="Link to this heading"></a></h2>
<p>Commenter Module.</p>
<dl class="py class">
<dt class="sig sig-object py" id="codergpt.commenter.commenter.CodeCommenter">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">codergpt.commenter.commenter.</span></span><span class="sig-name descname"><span class="pre">CodeCommenter</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.commenter.commenter.CodeCommenter" 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.commenter.commenter.CodeCommenter.comment">
<span class="sig-name descname"><span class="pre">comment</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">code</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">filename</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">overwrite</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#codergpt.commenter.commenter.CodeCommenter.comment" title="Link to this definition"></a></dt>
<dd><p>Comment the contents of the code string by invoking the runnable chain and write it to a new 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>code</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></span>) – The string containing the code to be commented.</p></li>
<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 original filename of the code file.</p></li>
<li><p><strong>overwrite</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></span>) – A boolean indicating whether to overwrite the original file. Default is False.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

</dd></dl>

</section>
<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>
<dl class="py class">
<dt class="sig sig-object py" id="codergpt.commenter.CodeCommenter">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">codergpt.commenter.</span></span><span class="sig-name descname"><span class="pre">CodeCommenter</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.commenter.CodeCommenter" 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.commenter.CodeCommenter.comment">
<span class="sig-name descname"><span class="pre">comment</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">code</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">filename</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">overwrite</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#codergpt.commenter.CodeCommenter.comment" title="Link to this definition"></a></dt>
<dd><p>Comment the contents of the code string by invoking the runnable chain and write it to a new 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>code</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></span>) – The string containing the code to be commented.</p></li>
<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 original filename of the code file.</p></li>
<li><p><strong>overwrite</strong> (<span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></span>) – A boolean indicating whether to overwrite the original file. Default is False.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

</dd></dl>

</section>
</section>

Expand Down
51 changes: 5 additions & 46 deletions codergpt.explainer.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
<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>
<li class="toctree-l4"><a class="reference internal" href="codergpt.utils.html">codergpt.utils package</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="codergpt.html#submodules">Submodules</a></li>
Expand Down Expand Up @@ -107,40 +108,19 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Link to this headi
<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>
<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">code</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>path</strong> – 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>

</section>
Expand All @@ -154,40 +134,19 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Link to this headi
<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.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.CodeExplainer.explain" title="Link to this definition"></a></dt>
<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">code</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.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>path</strong> – 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.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.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>

</section>
Expand Down
Loading

0 comments on commit b15b78f

Please sign in to comment.