Search is not available for this dataset
repo_id
stringlengths
12
110
file_path
stringlengths
24
164
content
stringlengths
3
89.3M
__index_level_0__
int64
0
0
public_repos/epydoc
public_repos/epydoc/doc/license.html
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <title>Epydoc License</title> <link rel="stylesheet" href="epydoc.css" type="text/css"/> </head> <!-- $Id: license.html 1211 2006-04-10 19:38:37Z edloper $ --> <body> <div class="body"> <h1> Epydoc License </h1> <p>Epydoc is governed by the MIT open-source license:</p> <div class="box"> <p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and any associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p> <p> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. </p> <p> The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software. </p> </div> </div> <table width="100%" class="navbox" cellpadding="1" cellspacing="0"> <tr> <a class="nav" href="index.html"> <td align="center" width="20%" class="nav"> <a class="nav" href="index.html"> Home</a></td></a> <a class="nav" href="installing.html"> <td align="center" width="20%" class="nav"> <a class="nav" href="installing.html"> Installing Epydoc</a></td></a> <a class="nav" href="using.html"> <td align="center" width="20%" class="nav"> <a class="nav" href="using.html"> Using Epydoc</a></td></a> <a class="nav" href="epytext.html"> <td align="center" width="20%" class="nav"> <a class="nav" href="epytext.html"> Epytext</a></td></a> <td align="center" width="20%" class="nav"> <A href="http://sourceforge.net/projects/epydoc"> <IMG src="sflogo.png" width="88" height="26" border="0" alt="SourceForge" align="top"/></A></td> </tr> </table> </body> </html>
0
public_repos/epydoc
public_repos/epydoc/doc/stylesheet.html
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <title>Default Epydoc CSS Stylesheet</title> <link rel="stylesheet" href="epydoc.css" type="text/css"/> </head> <!-- $Id: stylesheet.html 1211 2006-04-10 19:38:37Z edloper $ --> <body> <div class="body"> <h1>Default Epydoc CSS Stylesheet</h1> <p> Note: this is not up-to-date. </p> <div class="screen"><pre> <code class="comment">/* Body color */</code> <code class="function">body </code>{ <code class="field">background</code>: #ffffff; <code class="field">color</code>: #000000; } <code class="comment">/* Tables */</code> <code class="function">table.summary, table.details, table.index </code>{ <code class="field">background</code>: #e8f0f8; <code class="field">color</code>: #000000; } <code class="function">tr.summary, tr.details, tr.index </code>{ <code class="field">background</code>: #70b0f0; <code class="field">color</code>: #000000; <code class="field">text-align</code>: left; <code class="field">font-size</code>: 120%; } <code class="comment">/* Headings */</code> <code class="function">h1.heading </code>{ <code class="field">font-size</code>: +140%; <code class="field">font-style</code>: italic; <code class="field">font-weight</code>: bold; } <code class="function">h2.heading </code>{ <code class="field">font-size</code>: +125%; <code class="field">font-style</code>: italic; <code class="field">font-weight</code>: bold; } <code class="function">h3.heading </code>{ <code class="field">font-size</code>: +110%; <code class="field">font-style</code>: italic; <code class="field">font-weight</code>: normal; } <code class="comment">/* Base tree */</code> <code class="function">pre.base-tree </code>{ <code class="field">font-size</code>: 80%; } <code class="comment">/* Details Sections */</code> <code class="function">table.func-details </code>{ <code class="field">background</code>: #e8f0f8; <code class="field">color</code>: #000000; <code class="field">border</code>: 2px groove #c0d0d0; <code class="field">padding</code>: 0 1em 0 1em; <code class="field">margin</code>: 0.4em 0 0 0; } <code class="function">h3.func-detail </code>{ <code class="field">background</code>: transparent; <code class="field">color</code>: #000000; <code class="field">margin</code>: 0 0 1em 0; } <code class="function">table.var-details </code>{ <code class="field">background</code>: #e8f0f8; <code class="field">color</code>: #000000; <code class="field">border</code>: 2px groove #c0d0d0; <code class="field">padding</code>: 0 1em 0 1em; <code class="field">margin</code>: 0.4em 0 0 0; } <code class="function">h3.var-details </code>{ <code class="field">background</code>: transparent; <code class="field">color</code>: #000000; <code class="field">margin</code>: 0 0 1em 0; } <code class="comment">/* Function signatures */</code> <code class="function">.sig </code>{ <code class="field">background</code>: transparent; <code class="field">color</code>: #000000; <code class="field">font-weight</code>: bold; } <code class="function">.sig-name </code>{ <code class="field">background</code>: transparent; <code class="field">color</code>: #006080; } <code class="function">.sig-arg, .sig-kwarg, .sig-vararg </code>{ <code class="field">background</code>: transparent; <code class="field">color</code>: #008060; } <code class="function">.sig-default </code>{ <code class="field">background</code>: transparent; <code class="field">color</code>: #602000; } <code class="function">.summary-sig </code>{ <code class="field">background</code>: transparent; <code class="field">color</code>: #000000; } <code class="function">.summary-sig-name </code>{ <code class="field">background</code>: transparent; <code class="field">font-weight</code>: bold; } <code class="function">.summary-sig-arg, .summary-sig-kwarg, .summary-sig-vararg </code>{ <code class="field">background</code>: transparent; <code class="field">color</code>: #008060; } <code class="comment">/* Doctest blocks */</code> <code class="function">.pysrc </code>{ <code class="field">background</code>: transparent; <code class="field">color</code>: #000000; } <code class="function">.pyprompt </code>{ <code class="field">background</code>: transparent; <code class="field">color</code>: #003030; <code class="field">font-weight</code>: bold;} <code class="function">.pystring </code>{ <code class="field">background</code>: transparent; <code class="field">color</code>: #006030; } <code class="function">.pycomment </code>{ <code class="field">background</code>: transparent; <code class="field">color</code>: #003060; } <code class="function">.pykeyword </code>{ <code class="field">background</code>: transparent; <code class="field">color</code>: #402000; } <code class="function">.pyoutput </code>{ <code class="field">background</code>: transparent; <code class="field">color</code>: #404040; } <code class="comment">/* Navigation bar */</code> <code class="function">table.navbar </code>{ <code class="field">background</code>: #a0c0ff; <code class="field">color</code>: #000000; <code class="field">border</code>: 2px groove #c0d0d0; } <code class="function">th.navbar </code>{ <code class="field">background</code>: #a0c0ff; <code class="field">color</code>: #6090d0; <code class="field">font-size</code>: 110% } <code class="function">th.navselect </code>{ <code class="field">background</code>: #70b0ff; <code class="field">color</code>: #000000; <code class="field">font-size</code>: 110% } <code class="comment">/* Links */</code> <code class="function">a:link </code>{ <code class="field">background</code>: transparent; <code class="field">color</code>: #0000ff; } <code class="function">a:visited </code>{ <code class="field">background</code>: transparent; <code class="field">color</code>: #204080; } <code class="function">a.navbar:link </code>{ <code class="field">background</code>: transparent; <code class="field">color</code>: #0000ff; <code class="field">text-decoration</code>: none; } <code class="function">a.navbar:visited </code>{ <code class="field">background</code>: transparent; <code class="field">color</code>: #204080; <code class="field">text-decoration</code>: none; } </pre></div> </div> <table width="100%" class="navbox" cellpadding="1" cellspacing="0"> <tr> <a class="nav" href="index.html"> <td align="center" width="20%" class="nav"> <a class="nav" href="index.html"> Home</a></td></a> <a class="nav" href="installing.html"> <td align="center" width="20%" class="nav"> <a class="nav" href="installing.html"> Installing Epydoc</a></td></a> <a class="nav" href="using.html"> <td align="center" width="20%" class="nav"> <a class="nav" href="using.html"> Using Epydoc</a></td></a> <a class="nav" href="epytext.html"> <td align="center" width="20%" class="nav"> <a class="nav" href="epytext.html"> Epytext</a></td></a> <td align="center" width="20%" class="nav"> <A href="http://sourceforge.net/projects/epydoc"> <IMG src="sflogo.png" width="88" height="26" border="0" alt="SourceForge" align="top"/></A></td> </tr> </table> </body> </html>
0
public_repos/epydoc
public_repos/epydoc/doc/custom.css
/* :Author: Edward Loper :Copyright: This stylesheet has been placed in the public domain. Stylesheet for use with Docutils. */ @import url("docutils.css"); /*===================================================================*/ /* Navigation box */ table.navbox { border-right: 1px solid black; border-left: 1px solid black; border-bottom: 1px solid black; } td.nav { border: 2px outset #70b0ff; background: #70b0ff; color: black; font-weight: bold; } td.navselect { background: #4888d8; color: white; } a.nav:link { text-decoration: none; } a.nav:visited { text-decoration: none; } /*======================================================================*/ /* Source code colorization */ pre.py-doctest { padding: .5em; margin: 1em; background: #e8f0f8; color: #000000; border: 1px solid #708890; } table.docutils pre.py-doctest { background: #dce4ec; color: #000000; border: 1px solid #708890; } .py-prompt { color: #005050; font-weight: bold;} .py-string { color: #006030; } .py-comment { color: #003060; } .py-keyword { color: #600000; } .py-output { color: #404040; } .py-name { color: #000050; } .py-name:link { color: #000050; } .py-name:visited { color: #000050; } .py-number { color: #005000; } .py-def-name { color: #000060; font-weight: bold; } .py-base-class { color: #000060; } .py-param { color: #000060; } .py-docstring { color: #006030; } .py-decorator { color: #804020; } /*======================================================================*/ /* Document formatting */ @media screen { body { background: #204060; color: #000000; } div.document { background: white; color: black; padding: 0 1em 0 1em; border: 2px solid black; } } h1.title { font-size: 180%; font-weight: bold; text-align: center; padding: .1em; margin: 0; border-bottom: 2px solid black;} h2.subtitle { font-size: 100%; text-align: center; font-style: italic; font-weight: normal; margin-top: 0; } pre.literal-block { padding: .5em; margin: 1em; background: #e8f0f8; color: #000000; border: 1px solid #708890; } table.docutils { border: 1px solid black; background: #e8f0f8; margin-top: 6px; border-collapse: collapse; } table.docutils th, table.docutils td { border: 1px solid black; padding: 0 .5em 0 .5em; } table.docutils th { background: #70b0ff; } div.epydoc-usage { border: 1px solid #708890; background: #e8f0f8; margin: 1em; padding: 0.5em} table.option-list { background: none !important; border: 0px solid black; } table.option-list td { border: none !important; } div.note { border: 1px solid black; background: #e8f0f8; margin-top: 6px; border-collapse: collapse; padding: 0 10px 10px 10px; } div.note p.admonition-title { background: #a0f0c0; margin: 0 -10px; padding: 6px 6px 3px 6px; border-bottom: 1px solid black; } #the-epytext-markup-language table.docutils { width: 95%; } table.docutils pre { border: 0px solid black; } div.note { } /* For the "Sections" example in the manual */ p.h1 { font-size: 150%; font-weight: bold; } p.h2 { font-size: 125%; font-weight: bold; } table.docinfo { margin: 0 0 0.5em 0; font-size: 90%; } div.abstract { margin: 0; padding: 0.5em 1em; border: 1px solid black; background: #e8f0f8; color: black; } div.abstract p { margin: 0; } div.abstract p.topic-title { display: none; } #contents { background: #e8f0f8; color: black; border: 1px solid #000000; margin: 1em 0 1em 0; padding: 0 10px 0 10px; } #contents p.topic-title { background: #70b0ff; text-align: center; font-weight: bold; font-size: 125%; margin: 0 -10px 0 -10px; padding: 0 10px 0 10px; border-bottom: 1px solid black; } /* <table class="docinfo" frame="void" rules="none"> <col class="docinfo-name" /> <col class="docinfo-content" /> <tbody valign="top"> <tr><th class="docinfo-name">Author:</th> <td><a class="first last reference" href="mailto:edloper&#64;gradient.cis.upenn.edu">Edward Loper</a></td></tr> <tr><th class="docinfo-name">Version:</th> <td>3.0b1</td></tr> </tbody> </table> <div class="abstract topic">*/
0
public_repos/epydoc
public_repos/epydoc/doc/epytextintro.html
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <title>A Brief Introduction to Epytext </title> <link rel="stylesheet" href="epydoc.css" type="text/css"/> </head> <!-- $Id: epytextintro.html 1417 2007-01-17 21:41:59Z edloper $ --> <body> <div class="body"> <h1> A Brief Introduction to Epytext </h1> <p> Epytext is a simple lightweight markup language that lets you add formatting and structure to docstrings. Epydoc uses that formatting and structure to produce nicely formatted API documentation. The following example (which has an unusually high ratio of documentaiton to code) illustrates some of the basic features of epytext: </p> <div class="screen"><pre> <code class="keyword">def</code> <code class="function">x_intercept</code>(m, b): <code class="string">""" Return the x intercept of the line M{y=m*x+b}. The X{x intercept} of a line is the point at which it crosses the x axis (M{y=0}). This function can be used in conjuction with L{z_transform} to find an arbitrary function's zeros. <code class="field">@type m:</code> number <code class="field">@param m:</code> The slope of the line. <code class="field">@type b:</code> number <code class="field">@param b:</code> The y intercept of the line. The X{y intercept} of a line is the point at which it crosses the y axis (M{x=0}). <code class="field">@rtype:</code> number <code class="field">@return:</code> the x intercept of the line M{y=m*x+b}. """</code> <code class="keyword">return</code> -b/m </pre></div> <p> You can compare this function definition with the <a href="examples/epytext_example-module.html#x_intercept" target="_blank">API documentation</a> generated by epydoc. Note that: </p> <ul> <li> Paragraphs are separated by blank lines. </li> <li> Inline markup has the form "<i>x</i><code>{...}</code>", where "<i>x</i>" is a single capital letter. This example uses inline markup to mark mathematical expressions ("<code>M{...}</code>"); terms that should be indexed ("<code>X{...}</code>"); and links to the documentation of other objects ("<code>L{...}</code>"). </li> <li> Descriptions of parameters, return values, and types are marked with "<code>@<i>field</i>:</code>" or "<code>@<i>field</i>&nbsp<i>arg</i>:</code>", where "<code><i>field</i></code>" identifies the kind of description, and "<code><i>arg</i></code>" specifies what object is described. </li> </ul> <p> For more information about the epytext markup language, see the <a href="epytext.html">epytext manual</a>. Epytext is intentionally very lightweight. If you wish to use a more expressive markup language, I recommend <a href="othermarkup.html">reStructuredText</a>. </p> </div> <table width="100%" class="navbox" cellpadding="1" cellspacing="0"> <tr> <a class="nav" href="index.html"> <td align="center" width="20%" class="nav"> <a class="nav" href="index.html"> Home</a></td></a> <a class="nav" href="installing.html"> <td align="center" width="20%" class="nav"> <a class="nav" href="installing.html"> Installing Epydoc</a></td></a> <a class="nav" href="using.html"> <td align="center" width="20%" class="nav"> <a class="nav" href="using.html"> Using Epydoc</a></td></a> <a class="nav" href="epytext.html"> <td align="center" width="20%" class="nav"> <a class="nav" href="epytext.html"> Epytext</a></td></a> <td align="center" width="20%" class="nav"> <A href="http://sourceforge.net/projects/epydoc"> <IMG src="sflogo.png" width="88" height="26" border="0" alt="SourceForge" align="top"/></A></td> </tr> </table> </body> </html>
0
public_repos/epydoc
public_repos/epydoc/doc/index.html
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <title>Epydoc</title> <link rel="stylesheet" href="epydoc.css" type="text/css"/> </head> <!-- $Id: index.html 1687 2008-01-30 03:39:22Z edloper $ --> <body> <div class="body"> <h1>Epydoc</h1> <center><i>Automatic API Documentation Generation for Python</i></center> <table class="transparent" cellpadding="10"> <tr valign="top"><td width="50%" class="transparent"> <!-- ================= Overview ================= --> <div class="box"> <h2 class="box-title">Overview</h2> <p> Epydoc is a tool for generating API documentation for Python modules, based on their docstrings. For an example of epydoc's output, see the API documentation for epydoc itself (<a href="api/">html</a>, <a href="epydoc.pdf">pdf</a>). A lightweight markup language called <a href="epytextintro.html">epytext</a> can be used to format docstrings, and to add information about specific fields, such as parameters and instance variables. Epydoc also understands docstrings written in <a href="http://docutils.sourceforge.net/rst.html">reStructuredText</a>, Javadoc, and plaintext. For a more extensive example of epydoc's output, see the API documentation for <a href="http://epydoc.sourceforge.net/stdlib/">Python 2.5</a>. </p> </div> <!-- ================= Documentation ================= --> <div class="box" id="documentation-box"> <h2 class="box-title">Documentation</h2> <table class="transparent" cellpadding="0"> <tr valign="top"><td class="transparent"> <p class="small-top-margin no-bot-margin" ><b><a href="epydoc.html">Epydoc manual</a></b></p> <ul id="epydoc-manual"> <li> <a href="manual-install.html">Installing Epydoc</a> </li> <li> <a href="manual-usage.html">Using Epydoc</a> </li> <li> <a href="manual-docstring.html">Python Docstrings</a> </li> <li> <a href="manual-epytext.html">The Epytext Markup Language</a> </li> <li> <a href="manual-fields.html">Epydoc Fields</a> </li> <li> <a href="manual-othermarkup.html">reStructuredText and Javadoc</a> </li> <li><a href="manual-reference.html">Reference Documentation</a></li> </ul> </td><td class="transparent"> <p class="small-top-margin no-bot-margin"><b>Related Information</b></p> <ul id="related-information"> <li> <a href="license.html">Open Source License</a></li> <li> <a href="whatsnew.html">Change Log</a></li> <li> <a href="history.html">History</a> </li> <li> <a href="future.html">Future Directions</a> </li> <li> <a href="relatedprojects.html">Related Projects</a> </li> <li> <a href="doctest/index.html">Regression Tests</a> </li> </ul> </td></tr><tr valign="top"><td class="transparent"> <p><b><a href="api/">API Documentation</a></b></p> </td><td class="transparent"> <p><b><a href="faq.html">Frequently Asked Questions</a></b></p> </td></tr></table> </div> <!-- ================= Documentation ================= --> <div class="box" id="feedback-box"> <h2 class="box-title">Feedback</h2> <ul> <li> <a href="http://sourceforge.net/tracker/?func=add&group_id=32455&atid=405618">Report a bug</a> </li> <li> <a href="http://sourceforge.net/tracker/?func=add&group_id=32455&atid=405621">Suggest a feature</a> </li> </ul> </div> <!-- NEXT COLUMN --> </td><td width="50%" class="transparent"> <!-- ================= Latest Release ================= --> <div class="box"> <h2 class="box-title">Latest Release</h2> <p> The latest stable release is <a href="http://sourceforge.net/project/platformdownload.php?group_id=32455" >Epydoc 3.0</a>. If you wish to keep up on the latest developments, you can also get epydoc from the <a href="installing.html#subversion">subversion repository</a>. See <a href="installing.html">Installing Epydoc</a> for more information. </p> </div> <!-- ================= Screenshots ================= --> <div class="box"> <h2 class="box-title">Screenshots</h2> <center> <table class="transparent" cellspacing="10"> <tr> <td class="transparent" valign="top"><a href="api/"><img src="home.thumbnail.png" alt="Generated HTML documentation for epydoc" border="0" height="75"/></a><br /> <!-- Generated HTML documentation for epydoc --> </td> <td class="transparent" valign="top"><a href="api/epydoc.apidoc.VariableDoc-class.html"><img src="uml.thumbnail.png" alt="Example of a UML graph generated by epydoc" border="0" height="75"/></a><br /> <!-- Example of a UML graph generated by epydoc --> </td> <td class="transparent" valign="top"><a href="api/epydoc.apidoc-pysrc.html"><img src="pysrc.thumbnail.png" alt="Example of syntax highlighted source, w/ links to API docs" border="0" height="75"/></a><br /> <!-- Example of syntax highlighted source, w/ links to API docs --> </td> <td class="transparent" valign="top"><a href="http://epydoc.sourceforge.net/stdlib/identifier-index.html"><img src="index.thumbnail.png" alt="Identifier index page for generated Python 2.4 docs" border="0" height="75"/></a><br /> <!-- Identifier index page for generated Python 2.4 docs --> </td> </tr> </table> </center> </div> <!-- ================= News ================= --> <div class="box"> <h2 class="box-title">News</h2> <p><b>Epydoc 3.0 released [January 2008]</b><br /> Epydoc version 3.0 is now available on the <a href="http://sourceforge.net/project/platformdownload.php?group_id=32455" >SourceForge download page</a>. See the <a href="whatsnew.html">What's New</a> page for details. Epydoc is under active development; if you wish to keep up on the latest developments, you can get epydoc from the <a href="installing.html#subversion">subversion repository</a>. If you find any bugs, or have suggestions for improving it, please report them on sourceforge.</p> <p><b>Presentation at PyCon [March 2004]</b><br /> Epydoc was presented at <a href="http://www.python.org/pycon/">PyCon</a> by Edward Loper. <a href="pycon-epydoc.html">Video and audio from the presentation</a> are available for download. </p> </div> </td></tr></table> </div> <table width="100%" class="navbox" cellpadding="1" cellspacing="0"> <tr> <a class="nav" href="index.html"> <td align="center" width="20%" class="navselect" class="nav"> <a class="nav" href="index.html"> Home</a></td></a> <a class="nav" href="installing.html"> <td align="center" width="20%" class="nav"> <a class="nav" href="installing.html"> Installing Epydoc</a></td></a> <a class="nav" href="using.html"> <td align="center" width="20%" class="nav"> <a class="nav" href="using.html"> Using Epydoc</a></td></a> <a class="nav" href="epytext.html"> <td align="center" width="20%" class="nav"> <a class="nav" href="epytext.html"> Epytext</a></td></a> <td align="center" width="20%" class="nav"> <A href="http://sourceforge.net/projects/epydoc"> <IMG src="http://sourceforge.net/sflogo.php?group_id=32455&type=1" width="88" height="26" border="0" alt="SourceForge" align="top"/></A></td> </tr> </table> </body> </html>
0
public_repos/epydoc
public_repos/epydoc/doc/manual-usage.txt
Using Epydoc ============ .. $Id: manual-usage.txt 1554 2007-02-27 03:31:56Z edloper $ Epydoc provides two user interfaces: * The command line interface, which is accessed via a script named ``epydoc`` (or ``epydoc.py`` on Windows) * The graphical interface, which is accessed via a script named ``epydocgui`` (or ``epydoc.pyw`` on Windows). Epydoc can also be accessed programmatically; see ``epydoc's API documentation`` for more information. .. _epydoc's API documentation: http://epydoc.sourceforge.net/api/ The Command Line Interface -------------------------- The ``epydoc`` script extracts API documentation for a set of Python objects, and writes it using a selected output format. Objects can be named using dotted names, module filenames, or package directory names. (On Windows, this script is named ``epydoc.py``.) Command Line Usage (Abbreviated) '''''''''''''''''''''''''''''''' .. parsed-literal:: epydoc [--html|--pdf] [-o *DIR*] [--parse-only|--introspect-only] [-v|-q] [--name *NAME*] [--url *URL*] [--docformat *NAME*] [--graph *GRAPHTYPE*] [--inheritance *STYLE*] [--config *FILE*] *OBJECTS...* *OBJECTS...* A list of the Python objects that should be documented. Objects can be specified using dotted names (such as ``os.path``), module filenames (such as ``epydoc/epytext.py``), or package directory names (such as ``epydoc/``). Packages are expanded to include all sub-modules and sub-packages. .. container:: epydoc-usage --html Generate HTML output. (default) --pdf Generate Adobe Acrobat (PDF) output, using LaTeX. -o DIR, --output DIR, --target DIR The output directory. --parse-only, --introspect-only By default, epydoc will gather information about each Python object using two methods: parsing the object's source code; and importing the object and directly introspecting it. Epydoc combines the information obtained from these two methods to provide more complete and accurate documentation. However, if you wish, you can tell epydoc to use only one or the other of these methods. For example, if you are running epydoc on untrusted code, you should use the ``--parse-only`` option. -v, -q Increase (``-v``) or decrease (``-q``) the verbosity of the output. These options may be repeated to further increase or decrease verbosity. Docstring markup warnings are supressed unless ``-v`` is used at least once. --name NAME The documented project's name. --url URL The documented project's URL. --docformat NAME The markup language that should be used by default to process modules' docstrings. This is only used for modules that do not define the special ``__docformat__`` variable; it is recommended that you explicitly specify ``__docformat__`` in all your modules. --graph GRAPHTYPE Include graphs of type *GRAPHTYPE* in the generated output. Graphs are generated using the Graphviz ``dot`` executable. If this executable is not on the path, then use ``--dotpath`` to specify its location. This option may be repeated to include multiple graph types in the output. To include all graphs, use ``--graph all``. The available graph types are: * **classtree**: displays each class's base classes and subclasses; * **callgraph**: displays the callers and callees of each function or method. These graphs are based on profiling information, which must be specified using the ``--pstate`` option. * **umlclass**: displays each class's base classes and subclasses, using UML style. Methods and attributes are listed in the classes where they are defined. If type information is available about attributes (via the ``@type`` field), then those types are displayed as separate classes, and the attributes are displayed as associations. --inheritance STYLE The format that should be used to display inherited methods, variables, and properties. Currently, three styles are supported. To see an example of each style, click on it: * grouped_: Inherited objects are gathered into groups, based on which class they are inherited from. * listed_: Inherited objects are listed in a short list at the end of the summary table. * included_: Inherited objects are mixed in with non-inherited objects. --config FILE Read the given configuration file, which can contain both options and Python object names. This option may be used multiple times, if you wish to use multiple configuration files. See `Configuration Files`_ for more information. .. _grouped: http://epydoc.sourceforge.net/examples/grouped/ inh_example.Programmer-class.html .. _listed: http://epydoc.sourceforge.net/examples/listed/ inh_example.Programmer-class.html .. _included: http://epydoc.sourceforge.net/examples/included/ inh_example.Programmer-class.html The complete list of command line options is available in the `Command Line Usage`_ section. Examples '''''''' The following command will generate HTML documentation for the ``sys`` module, and write it to the directory ``sys_docs``:: [epydoc]$ epydoc --html sys -o sys_docs The following commands are used to produce the API documentation for epydoc itself. The first command writes html output to the directory ``html/api``, using ``epydoc`` as the project name and ``http://epydoc.sourcforge.net`` as the project URL. The ``white`` CSS style is used; inheritance is displayed using the listed style; and all graphs are included in the output. The second command writes pdf output to the file ``api.pdf`` in the directory ``latex/api``, using ``Epydoc`` as the project name. :: [epydoc]$ epydoc -v -o html/api --name epydoc --css white \ --url http://epydoc.sourceforge.net \ --inheritance listed --graph all src/epydoc [epydoc]$ epydoc -v -o latex/api --pdf --name "Epydoc" src/epydoc Configuration Files ''''''''''''''''''' Configuration files, specified using the ``--config`` option, may be used to specify both the list of objects to document, and the options that should be used to document them. Configuration files are read using the standard ConfigParser_ module. The following is a simple example of a configuration file. .. parsed-literal:: **[epydoc]** *# Epydoc section marker (required by ConfigParser)* *# Information about the project.* **name: My Cool Project** **url: http://cool.project/** *# The list of modules to document. Modules can be named using* *# dotted names, module filenames, or package directory names.* *# This option may be repeated.* **modules: sys, os.path, re** **modules: my/project/driver.py** *# Write html output to the directory "apidocs"* **output: html** **target: apidocs/** *# Include all automatically generated graphs. These graphs are* *# generated using Graphviz dot.* **graph: all** **dotpath: /usr/local/bin/dot** A `more complete example`_, including all of the supported options, is also available. .. _ConfigParser: http://docs.python.org/lib/module-ConfigParser.html .. _more complete example: `Sample Configuration File`_ The Graphical Interface ----------------------- Epydoc also includes a graphical interface, for systems where command line interfaces are not convenient (such as Windows). The graphical interface can be invoked with the ``epydocgui`` command, or with ``epydoc.pyw`` in the ``Scripts`` subdirectory of the Python installation directory under Windows. Currently, the graphical interface can only generate HTML output. .. image:: epydoc_gui.png :align: center Use the **Add** box to specify what objects you wish to document. Objects can be specified using dotted names (such as ``os.path``), module filenames (such as ``epydoc/epytext.py``), or package directory names (such as ``epydoc/``). Packages are expanded to include all sub-modules and sub-packages. Once you have added all of the modules that you wish to document, press the **Start** button. Epydoc's progress will be displayed on the progress bar. To customize the output, click on the **Options** arrow at the bottom of the window. This opens the options pane, which contains fields corresponding to each command line option. .. image:: epydoc_guiconfig.png :align: center The epydoc graphical interface can save and load *project files*, which record the set of modules and the options that you have selected. Select **File->Save** to save the current modules and options to a project file; and **File->Open** to open a previously saved project file. (These project files do not currently use the same format as the configuration files used by the command line interface.) For more information, see the ``epydocgui(1)`` man page. Documentation Completeness Checks --------------------------------- The ``epydoc`` script can be used to check the completeness of the reference documentation. In particular, it will check that every module, class, method, and function has a description; that every parameter has a description and a type; and that every variable has a type. If the ``-p`` option is used, then these checks are run on both public and private objects; otherwise, the checks are only run on public objects. ``epydoc`` ``--check`` [``-p``] *MODULES...* *MODULES...* A list of the modules that should be checked. Modules may be specified using either filenames (such as ``epydoc/epytext.py``) or module names (such as ``os.path``). The filename for a package is its ``__init__.py`` file. -p Run documentation completeness checks on private objects. For each object that fails a check, epydoc will print a warning. For example, some of the warnings generated when checking the completeness of the documentation for epydoc's private objects are:: epydoc.html.HTML_Doc._dom_link_to_html........No docs epydoc.html.HTML_Doc._module..................No type epydoc.html.HTML_Doc._link_to_html.link.......No descr epydoc.html.HTML_Doc._author.return...........No type epydoc.html.HTML_Doc._author.authors..........No descr, No type epydoc.html.HTML_Doc._author.container........No descr, No type epydoc.html.HTML_Doc._base_tree.uid...........No descr, No type epydoc.html.HTML_Doc._base_tree.width.........No descr, No type epydoc.html.HTML_Doc._base_tree.postfix.......No descr, No type If you'd like more fine-grained control over what gets checked, or you would like to check other fields (such as the author or version), then you should use the :epydoc:`DocChecker` class directly. HTML Files ---------- Every Python module and class is documented in its own file. Index files, tree files, a help file, and a frames-based table of contents are also created. The following list describes each of the files generated by epydoc: ``index.html`` The standard entry point for the documentation. Normally, ``index.html`` is a copy of the frames file (``frames.html``). But if the ``--no-frames`` option is used, then ``index.html`` is a copy of the API documentation home page, which is normally the documentation page for the top-level package or module (or the trees page if there is no top-level package or module). *module*\ ``-module.html`` The API documentation for a module. *module* is the complete dotted name of the module, such as `sys` or `epydoc.epytext`. *class*\ ``-class.html`` The API documentation for a class, exception, or type. *class* is the complete dotted name of the class, such as ``epydoc.epytext.Token`` or ``array.ArrayType``. *module*\ ``-pysrc.html`` A page with the module colorized source code, with links back to the objects main documentation pages. The creation of the colorized source pages can be controlled using the options_ ``--show-sourcecode`` and ``--no-sourcecode``. .. _options: Command Line Usage_ ``module-tree.html`` The documented module hierarchy. ``class-tree.html`` The documented classes hierarchy. ``identifier-index.html`` The index of all the identifiers found in the documented items. ``term-index.html`` The index of all the term definition found in the docstrings. Term definitions are created using the `Indexed Terms`_ markup. ``bug-index.html`` The index of all the known bug in the documented sources. Bugs are marked using the ``@bug`` tag. ``todo-index.html`` The index of all the to-do items in the documented sources. They are marked using the ``@todo`` tag. ``help.html`` The help page for the project. This page explains how to use and navigate the webpage produced by epydoc. ``epydoc-log.html`` A page with the log of the epydoc execution. It is available clicking on the timestamp below each page, if the documentation was created using the ``--include-log`` option. The page also contains the list of the options enabled when the documentation was created. ``api-objects.txt`` A text file containing each available item and the URL where it is documented. Each item takes a file line and it is separated by the URL by a ``tab`` charecter. Such file can be used to create `external API links`_. ``redirect.html`` A page containing Javascript code that redirect the browser to the documentation page indicated by the accessed fragment. For example opening the page ``redirect.html#epydoc.apidoc.DottedName`` the browser will be redirected to the page ``epydoc.apidoc.DottedName-class.html``. ``frames.html`` The main frames file. Two frames on the left side of the window contain a table of contents, and the main frame on the right side of the window contains API documentation pages. ``toc.html`` The top-level table of contents page. This page is displayed in the upper-left frame of frames.html, and provides links to the ``toc-everything.html`` and ``toc-module-module.html`` pages. ``toc-everything.html`` The table of contents for the entire project. This page is displayed in the lower-left frame of frames.html, and provides links to every class, type, exception, function, and variable defined by the project. ``toc-``\ *module*\ ``-module.html`` The table of contents for a module. This page is displayed in the lower-left frame of frames.html, and provides links to every class, type, exception, function, and variable defined by the module. module is the complete dotted name of the module, such as ``sys`` or ``epydoc.epytext``. ``epydoc.css`` The CSS stylesheet used to display all HTML pages. CSS Stylesheets --------------- Epydoc creates a CSS stylesheet (``epydoc.css``) when it builds the API documentation for a project. You can specify which stylesheet should be used using the ``--css`` command-line option. If you do not specify a stylesheet, and one is already present, epydoc will use that stylesheet; otherwise, it will use the default stylesheet.
0
public_repos/epydoc
public_repos/epydoc/doc/manual-othermarkup.txt
Alternate Markup Languages ========================== .. $Id: manual-othermarkup.txt 1598 2007-09-06 13:02:50Z dvarrazzo $ Epydoc's default markup language is epytext__, a lightweight markup language that's easy to write and to understand. But if epytext is not powerful enough for you, or doesn't suit your needs, epydoc also supports three alternate markup languages: .. __: `The Epytext Markup Language`_ reStructuredText__ is an "easy-to-read, what-you-see-is-what-you-get plaintext markup syntax". It is more powerful than epytext (e.g., it includes markup for tables and footnotes); but it is also more complex, and sometimes harder to read. .. __: http://docutils.sourceforge.net/rst.html Javadoc__ is a documentation markup language that was developed for Java. It consists of HTML, augmented by a set of special tagged fields. .. __: http://java.sun.com/j2se/javadoc/ Plaintext docstrings are rendered verbatim (preserving whitespace). To specify the markup language for a module, you should define a module-level string variable ``__docformat__``, containing the name of the module's markup language. The name of the markup language may optionally be followed by a language code (such as ``en`` for English). Conventionally, the definition of the ``__docformat__`` variable immediately follows the module's docstring: .. python:: # widget.py """ Graphical support for `gizmos` and `widgets`. """ __docformat__ = "restructuredtext en" #[...] To change the default markup language from the command line, use the ``--docformat`` option. For example, the following command generates API documentation for the existing regular expression package ``re``, which uses plaintext markup:: [epydoc]$ epydoc --docformat plaintext re reStructuredText ---------------- reStructuredText is a markup language that was developed in conjunction with Docutils_. In order to parse reStructuredText docstrings, Docutils 0.3 or higher must be installed. If Docutils is not installed, then reStructuredText docstrings will be rendered as plaintext. Docutils can be downloaded from the `Docutils SourceForge page`_. .. _Docutils: http://docutils.sourceforge.net/ .. _Docutils SourceForge page: http://sourceforge.net/project/showfiles.php?group_id=38414 Default role '''''''''''' Epydoc replaces the Docutils' default `interpreted text role`_ with the creation of `documentation crossreference links`_. If you want to create a crossreference link to the ``somemod.Example`` class, you can put backquotes around your test, typing:: `somemod.Example` .. _interpreted text role: http://docutils.sourceforge.net/ docs/ref/rst/roles.html Consolidated Fields ''''''''''''''''''' In addition to the `standard set of fields`_, the reStructruedText parser also supports *consolidated fields*, which combine the documentation for several objects into a single field. For example, a single ``:Parameters:`` field is often used to describe all of the parameters for a function or method: .. python:: def fox_speed(size, weight, age): """ Return the maximum speed for a fox. :Parameters: - `size`: The size of the fox (in meters) - `weight`: The weight of the fox (in stones) - `age`: The age of the fox (in years) """ #[...] .. _standard set of fields: `Epydoc fields`_ Epydoc will automatically extract information about each parameter from this list. These *consolidated fields* may be written using either a `bulleted list`_ or a `definition list`_. * If a consolidated field is written as a *bulleted list*, then each list item must begin with the field's argument, marked as `interpreted text`_, and followed by a colon or dash. * If a consolidated field is written as a *definition list*, then each definition item's term should contain the field's argument, (it is not mandatory for it being marked as interpreted text). .. _bulleted list: http://docutils.sourceforge.net/ docs/user/rst/quickref.html#bullet-lists .. _definition list: http://docutils.sourceforge.net/ docs/user/rst/quickref.html#definition-lists .. _interpreted text: http://docutils.sourceforge.net/ docs/user/rst/quickref.html#inline-markup The term classifier, if present, is used to specify the associated type. The following example shows the use of a definition list to define a consolidated field (note that docutils requires a space before and after the '``:``' used to mark classifiers). .. python:: def fox_speed(size, weight, age): """ Return the maximum speed for a fox. :Parameters: size The size of the fox (in meters) weight : float The weight of the fox (in stones) age : int The age of the fox (in years) """ #[...] The following consolidated fields are currently supported by epydoc: .. list-table:: :header-rows: 1 * - Consolidated Field Tag - Corresponding Base Field Tag * - ``:Parameters:`` - ``:param:`` * - ``:Exceptions:`` - ``:except:`` * - ``:Groups:`` - ``:group:`` * - ``:Keywords:`` - ``:keyword:`` * - ``:Variables:`` - ``:var:`` * - ``:IVariables:`` - ``:ivar:`` * - ``:CVariables:`` - ``:cvar:`` * - ``:Types:`` - ``:type:`` Graph directives '''''''''''''''' The epydoc reStructuredText reader defines several custom `directives`, which can be used to automatically generate a variety of graphs. The following custom directives are currently defined: .. list-table:: :header-rows: 1 :widths: 30 70 * - Directive - Description * - .. parsed-literal:: .. classtree:: [*classes...*] :dir: *up|down|left|right* - Display a class hierarchy for the given class or classes (including all superclasses & subclasses). If no class is specified, and the directive is used in a class's docstring, then that class's class hierarchy will be displayed. The ``dir`` option specifies the orientation for the graph (default=\ ``down``). * - .. parsed-literal:: .. packagetree:: [*modules...*] :dir: *up|down|left|right* :style: *uml|tree* - Display a package hierarchy for the given module or modules (including all subpackages and submodules). If no module is specified, and the directive is used in a module's docstring, then that module's package hierarchy will be displayed. The ``dir`` option specifies the orientation for the graph (default=\ ``down``). The ``style`` option specifies whether packages should be displayed in a tree, or using nested UML symbols. * - .. parsed-literal:: .. importgraph:: [*modules...*] :dir: *up|down|left|right* - Display an import graph for the given module or modules. If no module is specified, and the directive is used in a module's docstring, then that module's import graph will be displayed. The ``dir`` option specifies the orientation for the graph (default=\ ``left``). * - .. parsed-literal:: .. callgraph:: [*functions...*] :dir: *up|down|left|right* - Display a call graph for the given function or functions. If no function is specified, and the directive is used in a function's docstring, then that function's call graph will be displayed. The ``dir`` option specifies the orientation for the graph (default=\ ``right``). * - .. parsed-literal:: .. dotgraph:: [*title...*] :caption: *text...* *graph...* - Display a custom Graphviz dot graph. The body of the directive (``graph...``) should contain the body of a dot graph. The optional ``title`` argument, if specified, is used as the title of the graph. The optional ``caption`` option can be used to provide a caption for the graph. Colorized snippets directive '''''''''''''''''''''''''''' Using reStructuredText markup it is possible to specify Python snippets in a `doctest block`__. SUch block will be colorized as in epytext `Doctest Blocks`_. .. __: http://docutils.sourceforge.net/ docs/user/rst/quickref.html#bullet-lists >>> def double(x): ... return x * 2 ... >>> print double(8) 16 Doctest block are mostly useful to be run as a part of automatized test suite using the doctest_ module. If the Python prompt gets in your way when you try to copy and paste and you are not interested in self-testing docstrings, the ``python`` directive will let you obtain a simple block of colorized text: .. _doctest: http://docs.python.org/lib/module-doctest.html .. list-table:: :header-rows: 1 * - Docstring Input - Rendered Output * - :: .. python:: def fib(n): """Print a Fibonacci series.""" a, b = 0, 1 while b < n: print b, a, b = b, a+b - .. python:: def fib(n): """Print a Fibonacci series.""" a, b = 0, 1 while b < n: print b, a, b = b, a+b External API links '''''''''''''''''' Epydoc can be used to create hyperlinks from your package documentation towards objects defined in the API of other packages. Such links are similar to ordinary `documentation crossreference links`_, but it is required to configure Epydoc setting up a new `interpreted text role`_, binding it to an external API. To create a new role, the command line option ``--external-api=``\ *NAME* must be used. This option introduces a new interpreted text role called ``NAME``, which can be used to refer to objects defined in an external API. You can alternatively use a configuration file for this and all the other options: see the `sample configuration file`_ for a comprehensive example. For example, if your program needs to programmatically use the Epydoc package itself, your docstrings may refer to functions described by Epydoc API:: If you want to print a value, you can use the :epydoc:`apidoc.pp_apidoc()` function. When you will generate the API documentation for such program, you will need the option ``--external-api=epydoc`` or you will get parsing errors due to the unknown role. Of course this doesn't help to really create cross references: the ``--external-api`` option suffices to stop Epydoc complaining about unknown roles, but the text is simply rendered in a monotype font and no link is created. What Epydoc requires to create external API links is a mapping from the names of the objects exposed by the API and the URL where such objects are actually described. Such mapping must be provided as a text file, with an object name and its URL on each line, separated by a ``tab`` character. For example the Epydoc API documentation may be represented by a file names ``api-objects.txt`` containing:: epydoc -> epydoc-module.html epydoc.apidoc -> epydoc.apidoc-module.html epydoc.apidoc.UNKNOWN -> epydoc.apidoc-module.html#UNKNOWN epydoc.apidoc._pp_val -> epydoc.apidoc-module.html#_pp_val epydoc.apidoc.py_src_filename -> epydoc.util-module.html#py_src_filename epydoc.apidoc.pp_apidoc -> epydoc.apidoc-module.html#pp_apidoc epydoc.apidoc._pp_list -> epydoc.apidoc-module.html#_pp_list ... ... ... ... Epydoc's HTML writer indeed includes such file in its output: see `HTML Files`_ for details. You can bind the definition file to the interpreted text role name using the command line option ``--external-api-file=``\ *NAME:FILENAME*.In the previous example you can use:: --external-api-file=epydoc:api-objects.txt This helps Epydoc to create relative urls: in the previous example the ``apidoc.pp_apidoc()`` label will be linked with the ``epydoc.apidoc-module.html#_pp_val`` URL. You can specify a new root for the generated links using the last command line option: ``--external-api-root=``\ *NAME:STRING*. *STRING* will be attached in front of any URL returned by the *NAME* text role. For example, to let your program refer to Epydoc API whose documentation is published at http://epydoc.sourceforge.net/api/ you can use the options:: --external-api-root=epydoc:http://epydoc.sourceforge.net/api/ this will let your reference :epydoc:`apidoc.pp_apidoc()` point at the right documentation. The three options can be used any number of time, effectively allowing to link towards all the required external packages. Names resolution ~~~~~~~~~~~~~~~~ When an external API link is to be created, the required name is split along any separator ('``.``', '``::``', '``->``'). Everything after the first noise character (for example after an '``(``') is discarded. The name fragment is looked for in the names defined in the description file: first an exact match is attempted; if no name exactly matches the required name, a partial match is attempted: the required name is compared with the *trailing parts* of the names in the file. If a single name is found in this lookup, then its URL is returned. If the name is not found, or if it matches with the trailing part of many defined names, a warning is raised and the name is rendered as literal text. Linking from standalone documents ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Epydoc provides the script ``apirst2html.py`` which allows you to use the previously described interpreted text roles from any reST document. The script exposes the same interface of the standard Docutils script ``rst2html.py`` but provides the extra command line options described in `External API links`_. With such tool you will be able to create hypertextual documentation of your package with direct links to its API. Indexed Terms in reStructuredText ''''''''''''''''''''''''''''''''' Epydoc uses `indexed terms`_ to create a table of terms definitions. Indexed terms are created using the epytext markup ``X{...}``. If you want to create indexed terms in reStructuredText modules, you can use the ``term`` `interpreted text role`_. For example: .. list-table:: :header-rows: 1 * - Docstring Input - Rendered Output * - .. python:: def example(): """ An :term:`index term` is a term that should be included in the index. """ #[...] - An *index term* is a term that should be included in the index. ============ ============== Index =========================== index term *example* x intercept *x_intercept* y intercept *x_intercept* ============ ============== Javadoc ------- Javadoc_ is a markup language developed by Sun Microsystems for documenting Java APIs. The epydoc implementation of Javadoc is based on the `Javadoc 1.4.2 reference documentation`__. However, there are likely to be some minor incompatibilities between Sun's implementation and epydoc's. Known incompatibilities include: * Epydoc does not support the Javadoc block tag ``@serial``. * Epydoc does not support the following Javadoc inline tags: ``{@docroot}``, ``{@inheritdoc}``, ``{@value}``. * Epydoc adds many field tags that Sun does not include, such as ``@var``, ``@type``, and ``@group``. .. __: http://java.sun.com/j2se/1.4.2/docs/tooldocs/solaris/javadoc.html Javadoc Fields '''''''''''''' For compatibility with Javadoc, every ``@see`` field is assumed to contain a single crossreference link, unless its body is quoted, or it starts with an HTML tag. See the `Javadoc reference manual`__ for more information about how the ``@see`` field is encoded in Javadoc. .. __: http://java.sun.com/j2se/1.4.2/docs/tooldocs/solaris/javadoc.html#@see Because Javadoc does not mark end of the optional argument, field arguments must contain exactly one word. Thus, multi-word arguments are not available in Javadoc. In particular, all group names must be single words.
0
public_repos/epydoc
public_repos/epydoc/doc/epydoc-latex-demo.tex
% epydoc -- Demo & description of latex writer output % % Copyright (C) 2008 Edward Loper % Author: Edward Loper <edloper@loper.org> % URL: <http://epydoc.sf.net> % % $Id: apidoc.py 1729 2008-02-19 16:49:16Z edloper $ % This is the basic preamble that's always included (in the api.tex file). % If any reStructuredText docstrings are used, then it is extended using % the preamble material used by reStructuredText. \documentclass{article} \usepackage[index]{epydoc} \usepackage[utf8]{inputenc} \definecolor{UrlColor}{rgb}{0,0.08,0.45} \usepackage[pdftex, pagebackref, pdftitle={API Documentation}, % pdfcreator={epydoc 3.0.1}, bookmarks=true, bookmarksopen=false, % pdfpagemode=UseOutlines, colorlinks=true, linkcolor=black, % anchorcolor=black, citecolor=black, filecolor=black, menucolor=black, % pagecolor=black, urlcolor=UrlColor]{hyperref} \begin{document} \title{Epydoc LaTeX Writer Output Demo} \author{} \date{} \maketitle This file provides a demonstration and description of epydoc's LaTeX output. Most of the important information is in the comments, so you should read this file in its original form (and not as a rendered pdf). By looking at this file, and at the epydoc-default.sty file, you should be able to determine how to write your own customized style file. % ====================================================================== \section{General Formatting} \subsection{Hyperlinks and Crossreferences} % The \EpydocDottedName command is used to escape dotted names. In % particular, it escapes underscores (_) and allows non-hyphenated % wrapping at '.' separator characters. \EpydocDottedName{my_module.Zip} % The \EpydocHypertarget command is used to mark targets that hyperlinks % may point to. It takes two arguments: a target label, and text % contents. (In some cases, the text contents will be empty.) Target % labels are formed by replacing '.'s in the name with ':'s. The % default stylesheet creates a \label for the target label, and displays % the text. \EpydocHypertarget{foo:bar:baz}{\EpydocDottedName{foo.bar.baz}} % The \EpydocHyperlink command is used to create a link to a given target. % It takes two arguments: a target label, and text contents. The % default stylesheet just displays the text contents. \EpydocHyperlink{foo:bar:baz}{\EpydocDottedName{foo.bar.baz}} % The \CrossRef command creates a cross-reference to a given target, % including a pageref. It takes one argument, a target label. \CrossRef{foo:bar:baz} \subsection{Indexing} % The \EpydocIndex command is used to mark items that should be included % in the index. It takes three arguments. The first argument is the % item's case-normalized name; this is typically discarded, and is % simply used to ensure the proper (i.e., case-insensitive) sort order % in the index. The second argument is the item's name; and the % third item is the item's "kind". "kind" can be Package, Script, Module, % Class, Class Method, Static Method, Method, Function, or Variable. % This command is used inside of the \index{...} command. % % For modules and classes, the \index formatting strings "|(" and % "|)" are appended to mark the beginning and end of the object's % documentation. For methods, variables, and nested classes, the % index formatting string "!" is used to create nested index entries. % See the docs for the latex \index command for more information. \index{\EpydocIndex{mymodule}{mymodule}{module}|(} \index{\EpydocIndex{foo}{Foo}{class}|(} \index{\EpydocIndex{foo}{Foo}{class}!\EpydocIndex{foo.f}{Foo.f}{method}} \index{\EpydocIndex{foo}{Foo}{class}!\EpydocIndex{foo.f}{Foo.g}{method}} \index{\EpydocIndex{foo}{Foo}{class}|)} \index{\EpydocIndex{mymodule}{mymodule}{module}|)} \subsection{Source Code Syntax Highlighting} % Doctest blocks are colorized using a variety of commands, all beginning % with the prefix "\pysrc". See epydoc-default.sty for a full list. \begin{alltt} \pysrcprompt{{\textgreater}{\textgreater}{\textgreater} }f(x) \pysrcoutput{123}\end{alltt} \subsection{reStructuredText Admonitions} % These would be defined by rst's style file: \newlength{\admonitionwidth} \setlength{\admonitionwidth}{.8\textwidth} % The reSTadmonition environment is used to display reStructuredText % admonitions, such as ``..warning::'' and ``..note::''. It takes % one optional argument, the admonition type. \begin{reSTadmonition}[note] This is a note. \end{reSTadmonition} \subsubsection{Sections inside Docstrings} % The commands \EpydocUserSection, \EpydocUserSubsection, and % \EpydocUserSubsubsection are used to add section headings inside % of docstrings \EpydocUserSection{Intra-docstring heading 1} \EpydocUserSubsection{Intra-docstring heading 2} \EpydocUserSubsubsection{Intra-docstring heading 3} % ====================================================================== % Each module is listed in its own section. (These sections are created % as separate files, and \include-ed into the main api.tex file). The % section contains: % - The module description (from the module's docstring) % - A metadata section (author, version, warnings, etc) % - A list of submodules (if it's a package) % - A list of classes defined by the module (only if the % --list-classes-separately option is used). % - A subsection describing the functions defined by the module. % - A subsection describing the variables defined by the module. % - A subsection for each class defined by the module (only if % the --list-classes-separately option is *not* used). \section{my\_module} % The EpydocModuleDescription environment is used to mark the % module's description (from its docstring) \begin{EpydocModuleDescription} This is an example module, used to demonstrate the LaTeX commands and environments used by epydoc. \end{EpydocModuleDescription} % Each metadata item is listed separately. There are three environments % and commands used for metadata: % - The \EpydocMetadataSingleValue command is used to display a metadata % field with a single value. It takes two arguments: the metadata % field name and the metadata description. % - The \EpydocMetadataShortList environment is used to display a % metadata field with multiple values when the field declares that % short=True; i.e., that multiple values should be combined into a % single comma-delimited list. It takes one argument (the metadata % field name); and items should be separated by the \and command. % - The \EpydocMetadataLongList environment is used to display a % metadata field with multiple values when the field declares that % short=False; i.e., that multiple values should be listed % separately in a bulleted list. It takes one argument (the metadata % field name); and items should marked wit hthe \item command. \EpydocMetadataSingleValue{See Also}{some reference.} \begin{EpydocMetadataShortList}{Author} joe \and mary \end{EpydocMetadataShortList} \begin{EpydocMetadataLongList}{Notes} \item This is one note. \item This is a second note. \end{EpydocMetadataLongList} % The list of submodules that a package contains is put it its own % subsection. The list is displayed using the EpydocModuleList % environment. Nested submodules are displayed using nested % EpydocModuleList environments. If the modules are divided into % groups (with the epydoc @group field), then groups are displayed % using the \EpydocGroup command, followed by a nested EpydocModuleList. \subsection{Submodules} \begin{EpydocModuleList} \item[\EpydocHyperlink{my_module:foo}{\EpydocDottedName{my_module.foo}}] Description of my\_module.foo. \item[\EpydocHyperlink{my_module:bar}{\EpydocDottedName{my_module.bar}}] Description of my\_module.bar. \begin{EpydocModuleList} \item[\EpydocHyperlink{my_module:bar:soap} {\EpydocDottedName{my_module.bar.soap}}] Description of my\_module.bar.soap. \end{EpydocModuleList} \EpydocGroup{Some Group} \begin{EpydocModuleList} \item[\EpydocHyperlink{my_module:baz} {\EpydocDottedName{my_module.baz}}] Description of my\_module.baz. \end{EpydocModuleList} \end{EpydocModuleList} % The list of classes that a module contains is just like the list % of submodules that a package contains, except that the list % environment EpydocClassList and the command \EpydocGroup % are used. (Note that this list is only included when the % --list-classes-separately option is used.) \subsection{Classes} \begin{EpydocClassList} \item[\EpydocHyperlink{my_module:Zip} {\EpydocDottedName{my_module.Zip}}] Description of my\_module.Zip. \item[\EpydocHyperlink{my_module:Zap} {\EpydocDottedName{my_module.Zap}}] Description of my\_module.Zap. \EpydocGroup{Some Group} \begin{EpydocClassList} \item[\EpydocHyperlink{my_module:Zam} {\EpydocDottedName{my_module.Zam}}] Description of my\_module.Zam. \item[\EpydocHyperlink{my_module:Zam} {\EpydocDottedName{my_module.Zam}}] Description of my\_module.Zam. \end{EpydocClassList} \end{EpydocClassList} % The functions that a module contains are listed in a separate % subsection. This subsection contains a single EpydocFunctionList % environment \subsection{Functions} % The EpydocFunctionList environment is used to display functions. % It contains one \EpydocFunction command for each function. This % command takes 8 arguments: % % - The function's signature: an EpydocFunctionSignature environment % specifying the signature for the function. % % - The function's description (from the docstring) % % - The function's parameters: An EpydocFunctionParameters list % environment providing descriptions of the function's parameters. % (from the epydoc @param, @arg, @kwarg, @vararg, @type fields) % % - The function's return description (from the epydoc @rerturns field) % % - The function's return type (from the epydoc @rtype field) % % - The function's exceptions: An EpydocFunctionRaises list % environment describing exceptions that the function may raise % (from the epydoc @raises field) % % - The function's override: An EpydocFunctionOverrides command % describing the method that this function overrides (if any) % % - The function's metadata: Zero or more EpydocMetadata* % commands/environments, taken from metadata fields (eg @author) % % All arguments except for the first (the signature) may be empty. % \begin{EpydocFunctionList} \EpydocFunction{ % Argument 1: The function signature % % The EpydocFunctionSignature is used to display a function's % signature. It expects one argument, the function's name. The % body of the environment containd the parameter list. The % following commands are used in the parameter list, to mark % individual parameters: % - \Param: Takes one required argument (the parameter name) and % one optional argument (the defaultt value). % - \VarArg: Takes one argument (the varargs parameter name) % - \KWArg: Takes one argument (the keyword parameter name) % - \GenericArg: Takes no arguments (this is used for '...', e.g. % when the signature is unknown). % - \TupleArg: Used inside of the \Param command, to mark % argument tuples. Individual elements of the argument tuple % are separated by the \and command. % % Parameters are separated by the \and command. \begin{EpydocFunctionSignature}{myfunc}% \Param{x}% \and \Param{y}% \and \Param{i}% \and \Param{j}% \and \Param{\TupleArg{a \and b}}% \and \VarArg{rest}, \KWArg{keywords}% \end{EpydocFunctionSignature} }{ % Argument 2: The function description This is an example function. }{ % Argument 3: The function parameter descriptions % % The EpydocFunctionParameters list environment is used to % describe the function's parameters. It takes a single % required argument, a string which can be used to set the % label width for the list. (I.e., this string is as long % as the longest parameter name.) The list contains one % \item for each parameter description. Parameter types % are currently listed as part of the text (not using any % special environments or commands) \begin{EpydocFunctionParameters}{xxxxxxxx} \item[x] Description of parameter x. (type=int) \item[i, j] Description of parameters x and y. \item[keywords] Description of the keywords parameter. \end{EpydocFunctionParameters} }{ % Argument 4: The function return value description description of the return value }{ % Argument 5: The function return value tupe int }{ % Argument 6: The function exception descriptions % % The EpydocRaises list environment is used to display the % list of exceptions that the function may raise. The list % contains one \item for each exception. \begin{EpydocFunctionRaises} \item[ValueError] If there's some problem with a value. \item[TypeError] If the wrong type is given. \end{EpydocFunctionRaises} }{ % Argument 7: The function overrides command % % (this is only used for methods, not functions) }{ % Argument 8: The function metadta % % The metadata section uses the same commands that the module- % level metadata section uses; see the discussion above. \EpydocMetadataSingleValue{See Also}{some reference.} \begin{EpydocMetadataShortList}{Author} joe \and mary \end{EpydocMetadataShortList} \begin{EpydocMetadataLongList}{Notes} \item This is one note. \item This is a second note. \end{EpydocMetadataLongList} } % If functions are divided into groups (with the epydoc @group % field), then group headers are marked with the \EpydocGropu % command. \EpydocGroup{Some Group} \EpydocFunction{ \begin{EpydocFunctionSignature}{\EpydocDottedName{some_func}} \Param{x} \and \Param{y} \and \Param{z} \end{EpydocFunctionSignature}} {}{}{}{}{}{}{} \end{EpydocFunctionList} % The variables that a module contains are listed in a separate % subsection. This section contains a single EpydocVariableList % environment \subsection{Variables} % The EpydocVariableList environment is used to describe module % variables. It contains one \EpydocVariable command for each % variable. This command takes four required arguments: % % - The variable's name % - The variable's description (from the docstring) % - The variable's type (from the epydoc @type field) % - The variable's value % % If any of these arguments is not available, then the empty % string will be used. % % If the variables are divided into groups (with the epydoc @group % field), then the \EpydocInternalHeader command is used to mark % the beginning of each variable group. \begin{EpydocVariableList} \EpydocVariable{\EpydocHyperlink{my_module:gorp} {\EpydocDottedName{my_module.gorp}}} {Description of the variable gorp} {int} {12} \EpydocVariable{\EpydocHyperlink{my_module:moo} {\EpydocDottedName{my_module.moo}}} {Description of the variable moo} {str} {'hello'} \EpydocVariable{\EpydocHyperlink{my_module:cow} {\EpydocDottedName{my_module.cow}}} {} % no description {} % no type {} % no value \end{EpydocVariableList} % The remaineder of the module's section consists of one subsection % for each class defined by the module. (However, if the % --list-classes-separately option is used, then these subsections % are not generated; instead, epydoc will generate a separate % top-level section for each class.) Each class section contains: % - The class's base tree (or a class tree graph, if the options % "--graph classtree" or "--graph umlclasstree" are used). % - A list of known subclasses. % - The class description (from the class's docstring) % - A metadata section (author, version, warnings, etc) % - A list of methods defined by the class % - A list of properties defined by the class % - A list of class variables defined by the class % - A list of instance variables defined by the class \subsection{Class \EpydocDottedName{Zip}} % The base tree is 'drawn' using a carefully constructed tabular % environment. Here's an example of what it can look like: \begin{tabular}{cccccc} \multicolumn{2}{r}{ \settowidth{\EpydocBCL}{\EpydocDottedName{MyBaseClass}} \multirow{2}{\EpydocBCL}{\EpydocHyperlink{object} {\EpydocDottedName{MyBaseClass}}}} && \\ \cline{3-3} &&\multicolumn{1}{c|}{} && \\ &&\multicolumn{2}{l}{\textbf{\EpydocDottedName{my_module.Zip}}} \end{tabular} % The known subclasses are displayed using an \EpydocMetadataSingleValue % command or an \EpydocMetadataShortList environment. See the % description of these above (for module metadata). \begin{EpydocMetadataShortList}{Known Subclasses} \EpydocHyperlink{my_module:Zap}{\EpydocDottedName{my_module.zap}} \and \EpydocHyperlink{my_module:Zam}{\EpydocDottedName{my_module.zam}} \end{EpydocMetadataShortList} % The EpydocClassDescription environment is used to mark the % class's description (from its docstring) \begin{EpydocClassDescription} This is an example class, used to demonstrate the LaTeX commands and environments used by epydoc. \end{EpydocClassDescription} % The metadata section uses the same commands that the module- % level metadata section uses; see the discussion above. \EpydocMetadataSingleValue{See Also}{some reference.} \begin{EpydocMetadataShortList}{Author} joe \and mary \end{EpydocMetadataShortList} % The methods that a class defines are listed in a separate % subsubsection. This subsubsection contains a single % EpydocFunctionList environment. \subsubsection{Methods} % The EpydocFunction environment was described above (when it was % used with module-level functions.) The only difference here is % that functions may optionally include a command specifying % what method is overridden by this method (\EpydocFunctionOverrides) % as the seventh argument to the \EpydocFunction command. \begin{EpydocFunctionList} \EpydocFunction{ \begin{EpydocFunctionSignature}{mymethod} \Param{x} \and \Param{y} \end{EpydocFunctionSignature}} {This is an example function.} {}{}{}{} { % The \EpydocFunctionOverrides command specifies which method % was overridden by this method. It comes just before the % metadata section. It takes one optional argument, which will % be "1" if documentation was inherited from the overridden % method; and one required argument, containing the name of % the overridden method. \EpydocFunctionOverrides[1]{\EpydocHyperlink{MyBaseClass:mymethod} {\EpydocDottedName{MyBaseClass.mymethod}}} }{} \end{EpydocFunctionList} % The properties that a class defines are listed in a separate % subsection. This section contains a single EpydocPropertyList % environment. \subsubsection{Properties} % The EpydocPropertyList environment is used to describe class % properties. It contains one \EpydocProperty command for each % property. This command takes six required arguments: % % - The property's name % - The property's description (from the docstring) % - The property's type (from the epydoc @type field) % - The property's fget function % - The property's fset function % - The property's fdel function % % If any of these arguments is not available, then the empty % string will be used. % % If the properties are divided into groups (with the epydoc @group % field), then the \EpydocInternalHeader command is used to mark % the beginning of each property group. % % If any properties are inherited from a base class, and if % --inheritance=listed (the default), then they will be listed % after all the other properties, using the % \EpydocInheritanceList command. This command will be used % once for each base class that properties are inherited from. % It takes two arguments: the name of the base class that the % properties were inherited from, and a list of property names. \begin{EpydocPropertyList} \EpydocProperty{\EpydocHyperlink{my_module:Zip:duck} {\EpydocDottedName{duck}}} {Description of the property duck} {int} {\EpydocDottedName{get_dock}} {\EpydocDottedName{set_dock}} {\EpydocDottedName{del_dock}} \EpydocInheritanceList{MyBaseClass}{goose, pig} \end{EpydocPropertyList} % The class variabless that a class defines are listed in a % separate subsection. This section contains a single % EpydocClassVariableList environment. \subsubsection{Class Variables} % The EpydocClassVariableList environment is used the same way as % the EpydocVariableList environment (shown above), with one % exception: if any variables are inherited from a base class, % and if--inheritance=listed (the default), then they will be % listed after all the other properties, using the % \EpydocInheritanceList command. This command will be used % once for each base class that variabless are inherited from. % It takes two arguments: the name of the base class that the % properties were inherited from, and a list of property names. \begin{EpydocClassVariableList} \EpydocVariable{\EpydocHyperlink{my_module:Zip:quack} {\EpydocDottedName{my_module.Zip.quack}}} {Description of the class variable quack} {str} % type {} % no value \EpydocInheritanceList{MyBaseClass}{oink, bark} \end{EpydocClassVariableList} % The instance variabless that a instance defines are listed in a % separate subsection. This section contains a single % EpydocInstanceVariableList environment. \subsubsection{Instance Variables} % The EpydocInstanceVariableList environment is used the same % way as the EpydocClassVariableList environment (shown above). \begin{EpydocClassVariableList} \EpydocVariable{\EpydocHyperlink{my_module:Zip:florp} {\EpydocDottedName{my_module.Zip.flrop}}} {Description of the class variable florp} {list} % type {} % no value \EpydocInheritanceList{MyBaseClass}{blorp} \end{EpydocClassVariableList} % That's all, folks! \end{document}
0
public_repos/epydoc
public_repos/epydoc/doc/rst-template2.txt
%(head_prefix)s %(head)s %(stylesheet)s %(body_prefix)s %(body_pre_docinfo)s %(docinfo)s %(body)s </div> <table width="100%%" class="navbox" cellpadding="1" cellspacing="0"> <tr> <a class="nav" href="../index.html"> <td align="center" width="20%%" class="nav"> <a class="nav" href="../index.html"> Home</a></td></a> <a class="nav" href="../installing.html"> <td align="center" width="20%%" class="nav"> <a class="nav" href="../installing.html"> Installing Epydoc</a></td></a> <a class="nav" href="../using.html"> <td align="center" width="20%%" class="nav"> <a class="nav" href="../using.html"> Using Epydoc</a></td></a> <a class="nav" href="../epytext.html"> <td align="center" width="20%%" class="nav"> <a class="nav" href="../epytext.html"> Epytext</a></td></a> <td align="center" width="20%%" class="nav"> <A href="http://sourceforge.net/projects/epydoc"> <IMG src="../sflogo.png" width="88" height="26" border="0" alt="SourceForge" align="top"/></A></td> </tr> </table> </body> </html>
0
public_repos/epydoc
public_repos/epydoc/doc/docutils.css
/* :Author: David Goodger :Contact: goodger@python.org :Date: $Date: 2006-05-21 22:44:42 +0200 (Sun, 21 May 2006) $ :Revision: $Revision: 4564 $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to customize this style sheet. */ /* used to remove borders from tables and images */ .borderless, table.borderless td, table.borderless th { border: 0 } table.borderless td, table.borderless th { /* Override padding for "table.docutils td" with "! important". The right padding separates the table cells. */ padding: 0 0.5em 0 0 ! important } .first { /* Override more specific margin styles with "! important". */ margin-top: 0 ! important } .last, .with-subtitle { margin-bottom: 0 ! important } .hidden { display: none } a.toc-backref { text-decoration: none ; color: black } blockquote.epigraph { margin: 2em 5em ; } dl.docutils dd { margin-bottom: 0.5em } dl.docutils dt { font-weight: bold } div.abstract { margin: 2em 5em } div.abstract p.topic-title { font-weight: bold ; text-align: center } div.admonition, div.attention, div.caution, div.danger, div.error, div.hint, div.important, div.note, div.tip, div.warning { margin: 2em ; border: medium outset ; padding: 1em } div.admonition p.admonition-title, div.hint p.admonition-title, div.important p.admonition-title, div.note p.admonition-title, div.tip p.admonition-title { font-weight: bold ; font-family: sans-serif } div.attention p.admonition-title, div.caution p.admonition-title, div.danger p.admonition-title, div.error p.admonition-title, div.warning p.admonition-title { color: red ; font-weight: bold ; font-family: sans-serif } /* Uncomment (and remove this text!) to get reduced vertical space in compound paragraphs. div.compound .compound-first, div.compound .compound-middle { margin-bottom: 0.5em } div.compound .compound-last, div.compound .compound-middle { margin-top: 0.5em } */ div.dedication { margin: 2em 5em ; text-align: center ; font-style: italic } div.dedication p.topic-title { font-weight: bold ; font-style: normal } div.figure { margin-left: 2em ; margin-right: 2em } div.footer, div.header { clear: both; font-size: smaller } div.line-block { display: block ; margin-top: 1em ; margin-bottom: 1em } div.line-block div.line-block { margin-top: 0 ; margin-bottom: 0 ; margin-left: 1.5em } div.sidebar { margin-left: 1em ; border: medium outset ; padding: 1em ; background-color: #ffffee ; width: 40% ; float: right ; clear: right } div.sidebar p.rubric { font-family: sans-serif ; font-size: medium } div.system-messages { margin: 5em } div.system-messages h1 { color: red } div.system-message { border: medium outset ; padding: 1em } div.system-message p.system-message-title { color: red ; font-weight: bold } div.topic { margin: 2em } h1.section-subtitle, h2.section-subtitle, h3.section-subtitle, h4.section-subtitle, h5.section-subtitle, h6.section-subtitle { margin-top: 0.4em } h1.title { text-align: center } h2.subtitle { text-align: center } hr.docutils { width: 75% } img.align-left { clear: left } img.align-right { clear: right } ol.simple, ul.simple { margin-bottom: 1em } ol.arabic { list-style: decimal } ol.loweralpha { list-style: lower-alpha } ol.upperalpha { list-style: upper-alpha } ol.lowerroman { list-style: lower-roman } ol.upperroman { list-style: upper-roman } p.attribution { text-align: right ; margin-left: 50% } p.caption { font-style: italic } p.credits { font-style: italic ; font-size: smaller } p.label { white-space: nowrap } p.rubric { font-weight: bold ; font-size: larger ; color: maroon ; text-align: center } p.sidebar-title { font-family: sans-serif ; font-weight: bold ; font-size: larger } p.sidebar-subtitle { font-family: sans-serif ; font-weight: bold } p.topic-title { font-weight: bold } pre.address { margin-bottom: 0 ; margin-top: 0 ; font-family: serif ; font-size: 100% } pre.literal-block, pre.doctest-block { margin-left: 2em ; margin-right: 2em } span.classifier { font-family: sans-serif ; font-style: oblique } span.classifier-delimiter { font-family: sans-serif ; font-weight: bold } span.interpreted { font-family: sans-serif } span.option { white-space: nowrap } span.pre { white-space: pre } span.problematic { color: red } span.section-subtitle { /* font-size relative to parent (h1..h6 element) */ font-size: 80% } table.citation { border-left: solid 1px gray; margin-left: 1px } table.docinfo { margin: 2em 4em } table.docutils { margin-top: 0.5em ; margin-bottom: 0.5em } table.footnote { border-left: solid 1px black; margin-left: 1px } table.docutils td, table.docutils th, table.docinfo td, table.docinfo th { padding-left: 0.5em ; padding-right: 0.5em ; vertical-align: top } table.docutils th.field-name, table.docinfo th.docinfo-name { font-weight: bold ; text-align: left ; white-space: nowrap ; padding-left: 0 } h1 tt.docutils, h2 tt.docutils, h3 tt.docutils, h4 tt.docutils, h5 tt.docutils, h6 tt.docutils { font-size: 100% } ul.auto-toc { list-style-type: none }
0
public_repos/epydoc
public_repos/epydoc/doc/manual-fields.txt
Epydoc Fields ============= .. $Id: manual-fields.txt 1554 2007-02-27 03:31:56Z edloper $ Fields are used to describe specific properties of a documented object. For example, fields can be used to define the parameters and return value of a function; the instance variables of a class; and the author of a module. Each field consists of a *tag*, an optional *argument*, and a *body*. * The *tag* is a case-insensitive word that indicates what kind of documentation is given by the field. * The optional *argument* specifies what object, parameter, or group is documented by the field. * The *body* contains the main contents of the field. Field Markup ------------ Each docstring markup langauge marks fields differently. The following table shows the basic fields syntax for each markup language. For more information, see the definition of field syntax for each markup language. .. list-table:: :header-rows: 1 * - Epytext - reStructuredText - Javadoc * - .. parsed-literal:: @\ *tag*: *body*... @\ *tag* *arg*: *body*... - .. parsed-literal:: :\ *tag*: *body*... :\ *tag* *arg*: *body*... - .. parsed-literal:: @\ *tag* *body*... @\ *tag* *arg* *body*... * - `Definition of epytext fields`__ - `Definition of ReStructuredText fields`__ - `Definition of Javadoc fields`__ .. __: Fields_ .. __: http://docutils.sourceforge.net/spec/rst/reStructuredText.html #field-lists .. __: http://java.sun.com/j2se/1.4.2/docs/tooldocs/solaris/javadoc.html #javadoctags Supported Fields ---------------- The following table lists the fields that epydoc currently recognizes. Field tags are written using epytext markup; if you are using a different markup language, then you should adjust the markup accordingly. Functions and Methods parameters '''''''''''''''''''''''''''''''' ``@param`` *p*: ... A description of the parameter *p* for a function or method. ``@type`` *p*: ... The expected type for the parameter *p*. ``@return``: ... The return value for a function or method. ``@rtype``: ... The type of the return value for a function or method. ``@keyword`` *p*: ... A description of the keyword parameter *p*. ``@raise`` *e*: ... A description of the circumstances under which a function or method raises exception *e*. These tags can be used to specify attributes of parameters and return value of function and methods. These tags are usually put in the the docstring of the function to be documented. .. note:: **constructor parameters** In C extension modules, extension classes cannot have a docstring attached to the ``__init__`` function; consequently it is not possible to document parameters and exceptions raised by the class constructor. To overcome this shortcoming, the tags ``@param``, ``@keyword``, ``@type``, ``@exception`` are also allowed to appear in the class docstring. In this case they refer to constructor parameters. ``@param`` fields should be used to document any explicit parameter (including the keyword parameter). ``@keyword`` fields should only be used for non-explicit keyword parameters: .. python:: def plant(seed, *tools, **options): """ @param seed: The seed that should be planted. @param tools: Tools that should be used to plant the seed. @param options: Any extra options for the planting. @keyword dig_deep: Plant the seed deep under ground. @keyword soak: Soak the seed before planting it. """ #[...] Since the ``@type`` field allows for arbitrary text, it does not automatically create a crossreference link to the specified type, and is not written in fixed-width font by default. If you want to create a crossreference link to the type, or to write the type in a fixed-width font, then you must use inline markup: .. python:: def ponder(person, time): """ @param person: Who should think. @type person: L{Person} or L{Animal} @param time: How long they should think. @type time: C{int} or C{float} """ #[...] Variables parameters '''''''''''''''''''' ``@ivar`` *v*: ... A description of the class instance variable *v*. ``@cvar`` *v*: ... A description of the static class variable *v*. ``@var`` *v*: ... A description of the module variable *v*. ``@type`` *v*: ... The type of the variable *v*. These tags are usually put in a module or class docstring. If the sources can be parsed by Epydoc it is also possible to document the variable in their own docstrings: see `variable docstrings`_ Epydoc considers class variables the ones defined directly defined in the class body. A common Python idiom is to create instance variables settings their default value in the class instead of the constructor (hopefully if the default is immutable...). If you want to force Epydoc to classify as instance variable one whose default value is set at class level, you can describe it using the tag ``@ivar`` in the context of a variable docstring: .. python:: class B: y = 42 """@ivar: This is an instance variable.""" Properties parameters ''''''''''''''''''''' ``@type``: ... The type of the property. The ``@type`` tag can be attached toa property docstring to specify its type. Grouping and Sorting ''''''''''''''''''''' ``@group`` *g*: *c1,...,cn* Organizes a set of related children of a module or class into a group. *g* is the name of the group; and *c1,...,cn* are the names of the children in the group. To define multiple groups, use multiple group fields. ``@sort``: *c1,...,cn* Specifies the sort order for the children of a module or class. *c1,...,cn* are the names of the children, in the order in which they should appear. Any children that are not included in this list will appear after the children from this list, in alphabetical order. These tags can be used to present groups of related items in a logical way. They apply to modules and classes docstrings. For the ``@group`` and ``@sort`` tags, asterisks (``*``) can be used to specify multiple children at once. An asterisk in a child name will match any substring: .. python:: class widget(size, weight, age): """ @group Tools: zip, zap, *_tool @group Accessors: get_* @sort: get_*, set_*, unpack_*, cut """ #[...] .. note:: **group markers** It is also possible to group set of related items enclosing them into special comment starting with the *group markers* '``#{``' and '``#}``' The group title can be specified after the opening group marker. Example: .. python:: #{ Database access functions def read(id): #[...] def store(item): #[...] def delete(id): #[...] # groups can't be nested, so a closing marker is not required here. #{ Web publish functions def get(request): #[...] def post(request): #[...] #} Notes and Warnings '''''''''''''''''' ``@note``: ... A note about an object. Multiple note fields may be used to list separate notes. ``@attention``: ... An important note about an object. Multiple attention fields may be used to list separate notes. ``@bug``: ... A description of a bug in an object. Multiple bug fields may be used to report separate bugs. .. note:: If any ``@bug`` field is used, the HTML writer will generate a the page ``bug-index.html``, containing links to all the items tagged with the field. ``@warning``: ... A warning about an object. Multiple warning fields may be used to report separate warnings. Status '''''' ``@version``: ... The current version of an object. ``@todo`` [*ver*]: ... A planned change to an object. If the optional argument ver is given, then it specifies the version for which the change will be made. Multiple todo fields may be used if multiple changes are planned. .. note:: If any ``@todo`` field is used, the HTML writer will generate a the page ``todo-index.html``, containing links to all the items tagged with the field. ``@deprecated``: ... Indicates that an object is deprecated. The body of the field describe the reason why the object is deprecated. ``@since``: ... The date or version when an object was first introduced. ``@status``: ... The current status of an object. ``@change``: ... A change log entry for this object. ``@permission``: ... The object access permission, for systems such Zope/Plone supporting this concept. It may be used more than once to specify multiple permissions. Formal Conditions ''''''''''''''''' ``@requires``: ... A requirement for using an object. Multiple requires fields may be used if an object has multiple requirements. ``@precondition``: ... A condition that must be true before an object is used. Multiple precondition fields may be used if an object has multiple preconditions. ``@postcondition``: ... A condition that is guaranteed to be true after an object is used. Multiple postcondition fields may be used if an object has multiple postconditions. ``@invariant``: ... A condition which should always be true for an object. Multiple invariant fields may be used if an object has multiple invariants. Bibliographic Information ''''''''''''''''''''''''' ``@author``: ... The author(s) of an object. Multiple author fields may be used if an object has multiple authors. ``@organization``: ... The organization that created or maintains an object. ``@copyright``: ... The copyright information for an object. ``@license``: ... The licensing information for an object. ``@contact``: ... Contact information for the author or maintainer of a module, class, function, or method. Multiple contact fields may be used if an object has multiple contacts. Other fields '''''''''''' ``@summary``: ... A summary description for an object. This description overrides the default summary (which is constructed from the first sentence of the object's description). ``@see``: ... A description of a related topic. see fields typically use documentation crossreference links or external hyperlinks that link to the related topic. Fields synonyms --------------- Several fields have *synonyms*, or alternate tags. The following table lists all field synonyms. Field tags are written using epytext markup; if you are using a different markup language, then you should adjust the markup accordingly. .. list-table:: :header-rows: 1 * - Name - Synonims * - ``@param`` *p*: ... - | ``@parameter`` *p*: ... | ``@arg`` *p*: ... | ``@argument`` *p*: ... * - ``@return``: ... - ``@returns``: ... * - ``@rtype``: ... - ``@returntype``: ... * - ``@raise`` *e*: ... - | ``@raises`` *e*: ... | ``@except`` *e*: ... | ``@exception`` *e*: ... * - ``@keyword`` *p*: ... - | ``@kwarg`` *p*: ... | ``@kwparam`` *p*: ... * - ``@ivar`` *v*: ... - ``@ivariable`` *v*: ... * - ``@cvar`` *v*: ... - ``@cvariable`` *v*: ... * - ``@var`` *v*: ... - ``@variable`` *v*: ... * - ``@see``: ... - ``@seealso``: ... * - ``@warning``: ... - ``@warn``: ... * - ``@requires``: ... - | ``@require``: ... | ``@requirement``: ... * - ``@precondition``: ... - ``@precond``: ... * - ``@postcondition``: ... - ``@postcond``: ... * - ``@organization``: ... - ``@org``: ... * - ``@copyright``: ... - ``@(c)``: ... * - ``@change``: ... - ``@changed``: ... Module metadata variables ------------------------- Some module variables are commonly used as module metadata. Epydoc can use the value provided by these variables as alternate form for tags. The following table lists the recognized variables and the tag they replace. Customized metadata variables can be added using the method described in `Adding New Fields`_. .. list-table:: :header-rows: 1 * - Tag - Variable * - ``@author`` - ``__author__`` * - ``@authors`` - ``__authors__`` * - ``@contact`` - ``__contact__`` * - ``@copyright`` - ``__copyright__`` * - ``@license`` - ``__license__`` * - ``@deprecated`` - ``__deprecated__`` * - ``@date`` - ``__date__`` * - ``@version`` - ``__version__`` Adding New Fields ----------------- New fields can be defined for the docstrings in a module using the special ``@newfield`` tag (or its synonym, ``@deffield``). This tag has the following syntax: .. parsed-literal:: @newfield *tag*: *label* [, *plural* ] Where *tag* is the new tag that's being defined; *label* is a string that will be used to mark this field in the generated output; and plural is the plural form of label, if different. New fields can be defined in any Python module. If they are defined in a package, it will be possible to use the newly defined tag from every package submodule. Each new field will also define a `metadata variable`_ which can be used to set the field value instead of the tag. For example, if a *revision* tag has been defined with:: @newfield revision: Revision then it will be possible to set a value for the field using a module variable: .. python:: __revision__ = "1234" .. _metadata variable: `Module metadata variables`_ The following example illustrates how the @newfield can be used: Docstring Input Rendered Output .. list-table:: :header-rows: 1 * - Docstring Input - Rendered Output * - .. python:: """ @newfield corpus: Corpus, Corpora """ def example(): """ @corpus: Bob's wordlist. @corpus: The British National Corpus. """ [...] - **Corpora:** * Bob's wordlist. * The British National Corpus. .. Note:: The module-level variable ``__extra_epydoc_fields__`` is deprecated; use ``@newfield`` instead.
0
public_repos/epydoc
public_repos/epydoc/doc/faq.html
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <title>Epydoc: Frequently Asked Questions</title> <link rel="stylesheet" href="epydoc.css" type="text/css"/> </head> <!-- $Id: faq.html 1658 2007-09-26 19:25:35Z edloper $ --> <body> <body> <div class="body"> <h1>Frequently Asked Questions</h1> <!-- <center><i>(Average question asking frequency: 0.03)</i></center> --> <div class="box"> <h2 class="box-title">Contents</h2> <p><b>Docstrings &amp; Docstring Markup</b> <ul class="nomargin"> <li><a href="#backslash">Why does epydoc get confused when I include a backslash in a docstring?</a></li> <li><a href="#which_markup">Which markup language do you recommend?</a></li> <li><a href="#new_markup">Will you add support for my favorite markup language <i>xyz</i>?</a></li> <li><a href="#new_field">Is there a way to define a new field?</a></li> <li><a href="#epytext_fail">Why does epydoc render one of my epytext-formatted docstrings as plaintext?</a></li> </ul></p> <p><b>Extracting Documentation</b> <ul class="nomargin"> <li><a href="#introspect_vs_parse">Why does epydoc use both introspection and parsing?</a></li> <li><a href="#parse_only">When should I use <code>--parse-only</code>? </a></li> <li><a href="#is_epydoc_running">How can I test whether epydoc is currently running?</a></li> <li><a href="#speed">I'm documenting a large project. How can I make epydoc go faster?</a></li> </ul></p> <p><b>Generated Output</b> <ul class="nomargin"> <li><a href="#change_html">How can I change the appearance of the HTML output?</a></li> <li><a href="#change_latex">How can I change the appearance of the LaTeX, Postscript, or PDF output?</a></li> <li><a href="#exclude">How can I exclude a specific object from the generated documentation?</a></li> <li><a href="#graphs">How can I include graphs in the generated output? </a></li> <li><a href="#urls">Why does epydoc add "<tt>-module</tt>" and "<tt>-class</tt>" to the names of the HTML pages it generates? </a></li> <li><a href="#redirect">Is there a way to link to the API documentation for objects using a simple URL based on the object's dotted name? </a></li> <li><a href="#redundant-details">Why are some values listed in the details section, but not others?</a></li> </ul></p> <p><b>Development of Epydoc</b> <ul class="nomargin"> <li><a href="#bug">I've found a bug in epydoc! Where should I report it?</a></li> <li><a href="#help">I'd like to help! What can I do?</a></li> <!-- <li><a href="#"></a></li>--> </ul></p> <p><b><a href="mailto:edloper@gradient.cis.upenn.edu">Ask a new question...</a></b></p> </div> <!-- ==================== DOCSTRINGS ========================= --> <h2>Docstrings &amp; Docstring Markup</h2> <dl class="faq"> <!-- QUESTION --><a name="backslash" /> <dt><p><b>Q:</b> Why does epydoc get confused when I include a backslash in a docstring?</p></dt> <dd><p>A Python docstring is a string, and is interpreted like any other string. In particular, Python interprets "\n" as a newline, "\t" as a tab, etc. If you want to include backslashes in your docstring (e.g. because you want to talk about file paths, regular expressions, or escaped characters), you should use a raw string. E.g.:</p> <div class="screen"><pre> <code class="prompt">&gt;&gt;&gt;</code> <code class="keyword">f</code>(x): <code class="prompt">...</code> r<code class="string">"""</code> <code class="prompt">...</code> <code class="string">Return true if x matches the regexp '\w+\s*\w+'.</code> <code class="prompt">...</code> <code class="string">"""</code> </pre></div> </dd> <!-- QUESTION --><a name="which_markup" /> <dt><p><b>Q:</b> Which markup language do you recommend? </p></dt> <dd><p>For many modules, <a href="epytextintro.html">epytext</a> works well: it is very lightweight, so it won't get in the way; but it lets you mark important information about objects. If you would like to use a more expressive markup language, then we recommend using <a href="othermarkup.html">reStructuredText</a>, which is easy to write, easy to read, and has support for a very wide array of constructs.</p></dd> <!-- QUESTION --><a name="new_markup" /> <dt> <p><b>Q:</b> reStructuredText is capitalized weirdly; Javadoc has too much caffeine; and Epydoc just isn't cool enough. Will you add support for my favorite markup language <i>xyz</i>?</p> <dd> <p>No, but you can! See the documentation for the function <a href="epydoc.markup-module.html#register_markup_language" ><code>register_markup_language()</code></a>, which can be used to register new markup languages. If you add support for a new markup language, and believe that others might like to use it, please contribute it back to epydoc!</p> </dd> <!-- QUESTION --><a name="new_field" /> <dt><p><b>Q:</b> Is there a way to define a new field? </p></dt> <dd><p>You can add new fields that describe simple metadata using the <code>@newfield</code> field. See the documentation for <a href="fields.html#newfield">fields</a> for more information. </p></dd> <!-- QUESTION --><a name="epytext_fail" /> <dt><p><b>Q:</b> Why does epydoc render one of my epytext-formatted docstrings as plaintext? </p></dt> <dd><p>Since epytext is used as the default markup language for epydoc, it needs to be very conservative -- it will be used to display many docstrings that are not explicitly written using epytext, and it needs to display those docstrings in a readable way. Therefore, whenever epytext encounters a docstring that doesn't strictly conform to the epytext markup language, it renders it as plaintext. </p> <p>If you expect one of your docstrings to be processed using epytext, but it gets rendered as plaintext, then the docstring most likely contains one or more markup errors. Run epydoc with the <code>-v</code> option to see markup errors, and check for an error in the docstring in question. Once you fix the markup errors, the docstring will be processed as expected.</p></dd> </dl> <!-- ================ EXTRACTING DOCUMENTATION ===================== --> <h2>Extracting Documentation</h2> <dl class="faq"> <!-- QUESTION --><a name="introspect_vs_parse" /> <dt> <p><b>Q:</b> Why does epydoc use both introspection <i>and</i> parsing? Wouldn't one or the other be sufficient?</p> </dt> <dd><p>Epydoc can extract documentation about objects from two different sources: <i>inspection</i> (importing the objects and examining them programmatically) and <i>parsing</i>(reading and extracting information from the objects' Python source code). Furthermore, epydoc can combine documentation information obtained from these two sources. This is important because each source has its own advantages and disadvantages with respect to the other. In particular: </p> <ul> <li> Introspection gives epydoc an accurate picture of what modules will look like programmatically. In particular, some modules actively modify the namespace they define, or use various "magic" techniques to alter their public interface. Using introspection gives epydoc an accurate picture of what these modified interfaces look like. </li> <li> If a module has dependencies that are not met on the current system, then it may not be possible to import and introspect it; but the parser can still examine its contents. </li> <li> If importing a module has significant side effects, then introspecting it might not be desirable; but the parser can still examine its contents. </li> <li> If a module is not trusted, then it might not be desirable to import it; but the parser can still examine its contents. </li> <li> By parsing a module, we can find "pseudo-docstrings" and "docstring comments," which are unavailable via introspection. In particular, this makes it possible to associate API documentation with variables. </li> <li> Introspection can give information about builtin and extension modules, which would be unavailable to a python source code parser. This includes builtin or extension bases for pure Python classes. </li> <li> By parsing a module, we can easily determine which values were imported, and where they were imported from. This information is not available via introspection. </li> </ul></dd> <!-- QUESTION --><a name="parse_only" /> <dt> <p><b>Q:</b> When should I use <code>--parse-only</code>? </p></dt> <dd> <p>The <code>--parse-only</code> option instructs epydoc to only get documentation information from parsing (and not from introspection.) You should use this option if:</p> <ul> <li>The project you are documenting contains untrusted source code.</li> <li>The project you are documenting has dependencies which are not met (e.g., documenting windows-specific code on a non-windows machine). </li> <li>You wish to document a module where importing the module would have undesired side effects.</li> </ul></dd> <!-- QUESTION --><a name="is_epydoc_running" /> <dt> <p><b>Q:</b> How can I test whether my program is being documented by epydoc? </p></dt> <dd> <p>Some programs or libraries need to take special actions when being documented by epydoc. E.g., you might want your code to skip certain set-up actions if it's just being imported to be documented. You can test whether epydoc is currently running by testing whether <code>'epydoc'</code> is in <code>sys.modules</code>:</p> <div class="screen"><pre> >>> import sys.modules >>> if 'epydoc' in sys.modules: ... print 'Epydoc is running' </pre></div> </dd> <!-- QUESTION --><a name="speed" /> <dt><p><b>Q:</b> I'm documenting a large project. How can I make epydoc go faster? </p></dt> <dd><p>Try the following options: </p> <table border="1" cellspacing="0" cellpadding="3"> <tr> <th align="left"><code>&#8722;&#8722;no-sourcecode</code></th> <td>Don't generate pages containing source code with syntax highlighting.</td></tr> <tr> <th align="left"><code>&#8722;&#8722;no&#8722;private</code></th> <td> Don't generate documentation for private objects.</td></tr> <tr> <th align="left"><code>&#8722;&#8722;introspect&#8722;only</code> or <code>&#8722;&#8722;parse&#8722;only</code></th> <td> Extract information about objects using introspection <i>or</i> parsing (but not both). This may decrease the amount of information that epydoc can extract from your project.</td></tr> <tr> <th align="left"><code>&#8722;&#8722;docformat=plaintext</code></th> <td> Format docstrings as plaintext, instead of epytext. (Docstrings will be rendered verbatim).</td></tr> </table> <p>Also, note that including graphs in the output can slow epydoc down significantly. </p></dd></dl> </dl> <!-- ==================== GENERATED OUTPUT ========================= --> <h2>Generated Output</h2> <dl class="faq"> <!-- QUESTION --><a name="change_html" /> <dt> <p><b>Q:</b> How can I change the appearance of the HTML output?</p> </dt> <dd><p>The CSS stylesheet can be used to modify the colors, fonts, and styles that are used by epydoc. You can specify your own CSS stylesheet using the <code>--css</code> option. (To generate the default stylesheet, simply run epydoc on a small module.)</p> <p>If your objections have to do with the actual layout of the pages, then I'd be happy to hear your suggestions for improving it; but I'm fairly happy with the layout, and probably won't make changes unless I agree that they improve the appearance significantly.</p></dd> <!-- QUESTION --><a name="change_latex" /> <dt><p><b>Q:</b> How can I change the appearance of the LaTeX, Postscript, or PDF output? </p></dt> <dd><p>Currently, the LaTeX output, and derived output formats, are not very customizable. If you have suggestions for improving the appearance of the generated output, please let me know.</p></dd> <!-- QUESTION --><a name="graphs" /> <dt><p><b>Q:</b> How can I include graphs in the generated output? </p></dt> <dd><p>Epydoc can automatically generate a variety of graphs, including class tress, package trees, uml class graphs, and import graphs. These graphs can be included in one of two ways:</p> <ul> <li> Use the <code>--graph</code> option to automatically generate a given type of graph for all applicable modules, classes, or functions. For example, using <code>--graph&nbsp;classtree</code> will replace the text-based class tree with a graphical class tree on all module pages. See the <a href="using.html#cli">command line usage</a> documentation for more information.</li> <li> Graphs may be explicitly created by docstrings, using appropriate markup. In epytext, graphs are created using the "<code>G</code>" colorization marker (i.e., "<code>G{<i>graphname</i>}</code>", or "<code>G{<i>graphname</i> <i>options...</i>}</code>" for graphs with options). In reStructuredText, graphs are created using custom <a href="http://docutils.sourceforge.net/docs/user/rst/quickref.html#directives">directives</a>. For more information, see the <a href="epytext.html#graphs">epytext manual</a> or the notes on <a href="othermarkup.html#restructuredtext">using reStructuredText with epydoc. </a>.</li> </ul> <p> Graph generation requires the <a href="http://www.graphviz.org/">Graphviz package</a>. If the <code>dot</code> executable is not on the path, then its location should be specified using the <code>--dotptah</code> option.</p> <!-- QUESTION --><a name="exclude" /> <dt><p><b>Q:</b> How can I exclude a specific object from the generated documentation? </p></dt> <dd><p>Use the <code>@undocumented</code> field. See the documentation for <a href="fields.html">fields</a> for more information. </p></dd> <!-- QUESTION --><a name="urls" /> <dt><p><b>Q:</b> Why does epydoc add "<tt>-module</tt>" and "<tt>-class</tt>" to the names of the HTML pages it generates? </p></dt> <dd><p>There are two reasons. First, this ensures that the names of module and class pages do not conflict with the names of existing special pages. For example, if a module were named "<tt>index</tt>", then naming its documentation page "<tt>index.html</tt>" would interfere with the use of that name for the documentation's main page. Second, it is possible to define a package where a module and a class share the same name. In those cases, this naming scheme ensures that the two object's pages do not conflict.</p></dd> <!-- QUESTION --><a name="redirect" /> <dt><p><b>Q:</b> Is there a way to link to the API documentation for objects using a simple URL based on the object's dotted name? </p></dt> <dd><p>Epydoc creates a page named "<tt>redirect.html</tt>" that uses javascript to automatically convert dotted names to the corresponding URLs. In particular, loading the page "<tt>redirect.html#<i>dotted.name</i></tt>" will automatically redirect the user's browser to the URL for the object whose dotted name is <tt><i>dotted.name</i></tt>. For example, a link to <tt>&lt;<a href="api/redirect.html#epydoc.cli.HELP_TOPICS" >redirect.html#epydoc.cli.HELP_TOPICS</a>&gt;</tt> automatically redirects the browser to <tt>&lt;<a href="api/epydoc.cli-module.html#HELP_TOPICS" >epydoc.cli-module.html#HELP_TOPICS</a>&gt;</tt>. The redirect page can be used for any object documented by epydoc, including modules, classes, functions, varaibles, properties, etc. </p></dd> <!-- QUESTION --><a name="redundant-details" /> <dt><p><b>Q:</b> Why are some values listed in the details section, but not others? </p></dt> <dd><p>By default, epydoc will only list a value in the details section if there's additional information beyond what's listed in the summary section. For example, if you define a function but don't give it a docstring, then all API information about that function can be shown in the summary table, so no details entry will be created for it. This helps keep the generated documentation consise, and the information density high. However if you prefer, the command-line option "<code>--redundant-details</code>" can be used to tell epydoc to display all values in the details lists, even if all info about them is already provided by the summary table. The corresponding config file option is <code>redundant-details</code>. <i>This option was added in svn revision 1613, and is not yet available in the most recent release.</i> </p></dd> </dl> <!-- ==================== DEVELOPMENT ========================= --> <h2>Development of Epydoc</h2> <dl class="faq"> <!-- QUESTION --><a name="bug" /> <dt><p><b>Q:</b> I've found a bug in epydoc! Where should I report it? </p></dt> <dd><p> Use the <a href="http://sourceforge.net/tracker/?func=add&group_id=32455&atid=405618">Sourceforge bug tracker</a> to report bugs. If you want to hear back when we fix it, be sure to either log in to Sourceforge, or include your email address in the bug report. </p></dd> <!-- QUESTION --><a name="help" /> <dt><p><b>Q:</b> I'd like to help! What can I do? </p></dt> <dd><p> If there are any features that you want to add to Epydoc, we'd be happy to accept patches. Patches should be submitted with the <a href="http://sourceforge.net/tracker/?func=add&group_id=32455&atid=405620">Sourceforge patch tracker</a> (be sure to describe what your patch does!). If you plan to make several changes, we could also add you as a developer on Sourceforge. Email me if you're interested. </p> <p> For a list of additions that we'd like to make to Epydoc, see the todo list in the <a href="api/">Epydoc reference documentation</a>; or the SourceForge <a href="http://sourceforge.net/tracker/?group_id=32455&atid=405621">feature request tracker</a> and <a href="http://sourceforge.net/tracker/?group_id=32455&atid=405618">bug tracker</a> </p></dd> <!-- QUESTION TEMPLATE <dt><p><b>Q: </b> ...</p></dt> <dd><p> ... </p></dd> --> </div> <table width="100%" class="navbox" cellpadding="1" cellspacing="0"> <tr> <a class="nav" href="index.html"> <td align="center" width="20%" class="nav"> <a class="nav" href="index.html"> Home</a></td></a> <a class="nav" href="installing.html"> <td align="center" width="20%" class="nav"> <a class="nav" href="installing.html"> Installing Epydoc</a></td></a> <a class="nav" href="using.html"> <td align="center" width="20%" class="nav"> <a class="nav" href="using.html"> Using Epydoc</a></td></a> <a class="nav" href="epytext.html"> <td align="center" width="20%" class="nav"> <a class="nav" href="epytext.html"> Epytext</a></td></a> <td align="center" width="20%" class="nav"> <A href="http://sourceforge.net/projects/epydoc"> <IMG src="sflogo.png" width="88" height="26" border="0" alt="SourceForge" align="top"/></A></td> </tr> </table> </body> </html>
0
public_repos/epydoc
public_repos/epydoc/doc/rst-template.txt
%(head_prefix)s %(head)s %(stylesheet)s %(body_prefix)s %(body_pre_docinfo)s %(docinfo)s %(body)s </div> <table width="100%%" class="navbox" cellpadding="1" cellspacing="0"> <tr> <a class="nav" href="index.html"> <td align="center" width="20%%" class="nav"> <a class="nav" href="index.html"> Home</a></td></a> <a class="nav" href="installing.html"> <td align="center" width="20%%" class="nav"> <a class="nav" href="installing.html"> Installing Epydoc</a></td></a> <a class="nav" href="using.html"> <td align="center" width="20%%" class="nav"> <a class="nav" href="using.html"> Using Epydoc</a></td></a> <a class="nav" href="epytext.html"> <td align="center" width="20%%" class="nav"> <a class="nav" href="epytext.html"> Epytext</a></td></a> <td align="center" width="20%%" class="nav"> <A href="http://sourceforge.net/projects/epydoc"> <IMG src="sflogo.png" width="88" height="26" border="0" alt="SourceForge" align="top"/></A></td> </tr> </table> </body> </html>
0
public_repos/epydoc
public_repos/epydoc/doc/whatsnew.html
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <title>Epydoc: What's New</title> <link rel="stylesheet" href="epydoc.css" type="text/css"/> </head> <!-- $Id: faq.html 602 2003-09-07 23:49:56Z edloper $ --> <body> <div class="body"> <h1> What's New in Epydoc </h1> <div class="box"> <h2 class="box-title">Epydoc 3.0</h2> <center><i>Released January, 2008</i></center> <h3>Support for Parsing &amp; Introspection</h3> <p> In previous versions, epydoc extracted information about each module by importing it, and using introspection to examine its contents. Epydoc 3.0 still supports introspection, but is also capable of extracting information about python modules by parsing their source code. Furthermore, the new version of epydoc can combine these two sources of information (introspection &amp; parsing). This is important because each source has its own advantages and disadvantages with respect to the other. See the <a href="faq.html#introspect_vs_parse">FAQ</a> for more information about the relative benefits of introspection and parsing, and why it's good to merge information from both sources. </p> <h3>Docstrings for variables</h3> <p>Epydoc now supports <i>variable docstrings</i>. If a variable assignment statement is immediately followed by a bare string literal, then that assignment is treated as a docstring for that variable. In classes, variable assignments at the class definition level are considered class variables; and assignments to instance variables in the constructor (__init__) are considered instance variables:<p> <div class="screen2"><pre> <code class="prompt">&gt;&gt;&gt;</code> <code class="keyword">class</code> A: <code class="prompt">...</code> x = 22 <code class="prompt">...</code> <code class="string">"""Docstring for class variable A.x"""</code> <code class="prompt">...</code> <code class="prompt">...</code> <code class="keyword">def</code> <code class="function">__init__</code>(self, a): <code class="prompt">...</code> self.y = a <code class="prompt">...</code> <code class="string">"""Docstring for instance variable A.y</code> </pre></div> <p>Variables may also be documented using <i>comment docstrings</i>. If a variable assignment is immediately preceeded by a comment whose lines begin with the special marker "<code><b>#:</b></code>", or is followed on the same line by such a comment, then it is treated as a docstring for that variable: </p> <div class="screen2"><pre> <code class="prompt">&gt;&gt;&gt;</code> <code class="comment">#: docstring for x</code> <code class="prompt">...</code> x = 22 <code class="prompt">&gt;&gt;&gt;</code> x = 22 <code class="comment">#: docstring for x</code> </pre></div> <!-- " --> <h3> Graphs &amp; Diagrams </h3> <p>Epydoc can automatically generate a variety of graphs, including class tress, package trees, uml class graphs, and import graphs. These graphs may be included in the generated output in one of two ways: </p> <ul> <li> The <code>--graph</code> option causes epydoc to automatically generate a given type of graph for all applicable modules, classes, or functions. For example, using <code>--graph&nbsp;classtree</code> will replace the text-based class tree with a graphical class tree on all module pages. See the <a href="using.html#cli">command line interface</a> documentation for more information.</li> <li> Graphs may be explicitly created by docstrings, using appropriate markup. In epytext, graphs are created using the "<code>G</code>" colorization marker (i.e., "<code>G{<i>graphname</i>}</code>", or "<code>G{<i>graphname</i> <i>options...</i>}</code>" for graphs with options). In reStructuredText, graphs are created using custom <a href="http://docutils.sourceforge.net/docs/user/rst/quickref.html#directives">directives</a>. For more information, see the <a href="epytext.html#graphs">epytext manual</a> or the notes on <a href="othermarkup.html#restructuredtext">using reStructuredText with epydoc. </a>.</li> </ul> <p> Epydoc can also generate <i>function call graphs</i>, showing the callers and the callees for each function. To generate call graphs, Epydoc uses data produced by a <a href="http://docs.python.org/lib/profile.html">Python profiler</a> such <code>Profile</code> or <code>hotshot</code>. </p> <p> For some examples of automatically generated graphs, see the <a href="api/">API Documentation</a> for epydoc (including the page for the <a href="api/epydoc.docwriter.dotgraph-module.html" ><code>epydoc.docwriter.dotgraph</code> module</a>). </p> <p> Graph generation requires the <a href="http://www.graphviz.org/">Graphviz package</a> [<a href="http://www.graphviz.org/Download..php">download</a>]. </p> <h3> Syntax Highlighted Source Code </h3> <p> The HTML output now includes source code listings with syntax higlighting, including links from identifiers back into the documentation. For examples of source code pages, see the <a href="api/">API Documentation</a> for epydoc (follow the <i>show source</i> link from any documented module, class, or function). </p> <h3> Improved Output </h3> <ul> <li> Methods that are inherited from "external" base classes are listed, but no longer described in detail. E.g., if "object" is used as a base class, then the methods inherited from "object" will be listed at the bottom of the method summary table, but not described in detail. Furthermore methods and variables not very detailed (with at most a short docstring) are only shown in the summary, while most detailed items also appear in a full detailed box. </li> <li> The HTML output no longer contains separate pages for including and excluding private variables. Instead, it uses CSS to dynamically hide or display private variables. A cookie is used to record the user's preference. (By default, private variables are hidden.) </li> <li> Additional pages are created, listing identifiers, documented definitions, bugs and to-do items. An optional log page can also be generated, reporting all the errors and warning raised during documentation generation. </li> <li> Improved variable values representation, using the parsed values if the standard representation is not informative (such as <code>&lt;Foo instance at 0x...&gt;</code>). Syntax highlighting is used for introspected values, including colorization for regular expressions. </li> <li> Improved support for adding links into the generated documentation. A new API, <a href="api/epydoc.docwriter.xlink-module.html" ><code>epydoc.docwriter.xlink</code></a>, can be used to determine the correct URL for any object name; and a new redirect page named named "<code>redirect.html"</code> uses javascript to automatically redirect the user to the correct URL for any given object name. See the <a href="faq.html#redirect">FAQ</a> for more information. </ul> <h3>Improved Documentation Extraction</h3> <ul> <li> Proper support for nested classes.</li> <li> Full unicode support, including support for the <a href="http://www.python.org/peps/pep-0263.html">encoding directive</a>.</li> <li> Variables conventionally used for modules metadata such as <code>__version__</code> are recognized as modules fields.</li> <li>The <code>__all__</code> attribute is used to decide whether objects are public or private. If an object is listed in an <code>__all__</code> list, it will appear defined in that module even if imported from elsewhere, keeping the API safe from implementation changes.</li> <li> Increased robustness in the face of a variety of "magic" manipulations of namespaces.</li> <li> Fine-grained control over exactly which modules should be parsed, introspected, or both. </li> <li> Support for Zope 3.x InterfaceClass and Zope 2.x ExtensionClass objects. </li> </ul> </div> <div class="box"> <h2 class="box-title">Epydoc 2.1</h2> <center><i>Released March 20, 2004</i></center> <h3>New Features</h3> <ul> <li> Support for Zope ExtensionClasses <li> Updated graphical user interface <li> Added support for modules that define __path__. <li> New documentation fields: <ul> <li> @include: Imports the documentation from another object. <li> @undocumented: Don't document the given object(s) </ul> <li> Various bug fixes </ul> </div> <div class="box"> <h2 class="box-title">Epydoc 2.0</h2> <center><i>Released July 22, 2003</i></center> <h3>New Features</h3> <b>Improvements to Docstring processing</b> <ul> <li> Support for ReStructuredText docstrings.</li> <li> Support for Javadoc docstrings.</li> <li> Many new documentation fields for docstrings.</li> <li> More robust crossreference link resolving.</li> </ul> <b>Improvements to Output Generation</b> <ul> <li> New output formats: LaTeX, DVI, PostScript, and PDF.</li> <li> Three new formats for displaying inherited methods and variables: listed, grouped, and included.</li> </ul> <b>Improvements to Inspection</b> <ul> <li> Support for new Python 2.2+ objects, including class methods, static methods, properties, and metaclasses.</li> <li> Automatic detection of imported variables.</li> <li> Documentation inheritance for inherited methods and variables.</li> </ul> <b>Improvements to Efficiency</b> <ul> <li> Epydoc 2.0 runs 50%-200% faster than epydoc 1.1. (e.g., it runs 160% faster when documenting the Python standard library).</li> </ul> <h3>Changes</h3> <ul> <li> Support for ReStructuredText docstrings.</li> <li> Support for Javadoc docstrings.</li> <li> Many new documentation fields for docstrings.</li> <li> More robust crossreference link resolving.</li> <li> New output formats: LaTeX, DVI, PostScript, and PDF.</li> <li> Three new formats for displaying inherited methods and variables: listed, grouped, and included.</li> <li> Support for new Python 2.2+ objects, including class methods, static methods, properties, and metaclasses.</li> <li> Automatic detection of imported variables.</li> <li> Documentation inheritance for inherited methods and variables.</li> <li> Epydoc 2.0 runs 50%-200% faster than epydoc 1.1. (e.g., it runs 160% faster when documenting the Python standard library).</li> <li> The new "markup" package provides a simple interface makes it easy to add support for additional markup languages. </li> <li> __extra_epydoc_fields__ and @newfield can be used to define new fields. </li> <li> If the directory for a package is specified, then automatically document all of its contents. </li> <li> Increased contrast of "blue" and "green" stylesheet </li> <li> Added --test option, to control what tests are run for --check. </li> <li> Consolidated error reporting for failed crossreference links and overridden parameter mismatches. </li> <li> Added --ignore-param-mismatch option, which supresses warnings about parameter mismatches </li> <li> Fixed bug in path magic for epydoc.py and epydoc.pyw scripts </li> <li> Replaced __epydoc_sort__ with @sort </li> <li> Changes to epytext: <ul> <li> Epytext now supports symbols (S{...}) </li> <li> Epydoc allows multi-word values for field arguments (eg for group names) </li> <li> Fixeded several minor bugs</li> </ul> </li> <li> --show-imports now lists imported vars &amp; modules </li> <li> Improvements to error reporting </li> <li> Improved sorting </li> <li> Many bug fixes </li> <li> General code clean-up </li> <li> Added preliminary and partial implementation for man-style output (like pydoc) </li> <li> Changed the definition of the --navlink parameter, to allow for more flexible encoding of the homepage link. </li> <li> Improvements to HTML output. <ul> <li> Display variable values in variable summary table </li> <li> Added tooltips for variable values, that show a more complete value (up to 600 characters) </li> <li> Minor tweaks &amp; improvements </li> <li> In the table of contents, only list objects from modules that were explicitly documented (don't list base classes from imported modules, etc)</li> </ul> </li> </ul> </div> <div class="box"><h2 class="box-title">Older Releases</h2> <p>See the <a href="http://sourceforge.net/project/showfiles.php?group_id=32455&amp;package_id=24617">Release Notes</a> on SourceForge.</p> </div> </div> <table width="100%" class="navbox" cellpadding="1" cellspacing="0"> <tr> <a class="nav" href="index.html"> <td align="center" width="20%" class="nav"> <a class="nav" href="index.html"> Home</a></td></a> <a class="nav" href="installing.html"> <td align="center" width="20%" class="nav"> <a class="nav" href="installing.html"> Installing Epydoc</a></td></a> <a class="nav" href="using.html"> <td align="center" width="20%" class="nav"> <a class="nav" href="using.html"> Using Epydoc</a></td></a> <a class="nav" href="epytext.html"> <td align="center" width="20%" class="nav"> <a class="nav" href="epytext.html"> Epytext</a></td></a> <td align="center" width="20%" class="nav"> <A href="http://sourceforge.net/projects/epydoc"> <IMG src="sflogo.png" width="88" height="26" border="0" alt="SourceForge" align="top"/></A></td> </tr> </table> </body> </html>
0
public_repos/epydoc
public_repos/epydoc/doc/manual-install.txt
Installing Epydoc ================= .. $Id: manual-install.txt 1692 2008-01-30 17:11:29Z edloper $ Downloading Epydoc ------------------ Epydoc can be downloaded from the `SourceForge download page`_. Epydoc is available in five formats: * RPM (``.noarch.rpm``) * Windows installer (``.win32.exe``) * Source install (``.tar.gz``) * Source install (``.zip``) * Source RPM (``.src.rpm``) .. _SourceForge download page: http://sourceforge.net/project/showfiles.php?group_id=32455 If you are installing on RedHat, I recommend that you use the RPM file. If you are installing on Windows, I recommended that you use the windows installer. Otherwise, you should use one of the source install files. Getting Epydoc from Subversion ------------------------------ If you wish to keep up on the latest developments, you can get the latest version of epydoc from the `subversion repository`_:: [/home/edloper]$ svn co https://epydoc.svn.sourceforge.net/svnroot/epydoc/trunk/epydoc epydoc [/home/edloper]$ ls epydoc Makefile doc man sandbox src This will create a directory named ``epydoc`` containing the latest version of epydoc. The ``epydoc`` package itself is in ``epydoc/src/epydoc`` (so adding ``epydoc/src`` to your ``PYTHONPATH`` will let you use it). You should periodically update your copy of the subversion repository, to make sure you have all the latest changes:: [/home/edloper/epydoc]$ svn up You can browse the subversion repository here__. .. _subversion repository: http://sourceforge.net/svn/?group_id=32455 .. __: http://epydoc.svn.sourceforge.net/viewcvs.cgi/epydoc/trunk/epydoc/ Installing from the RPM File ---------------------------- 1. Download the RPM file to a directory of your choice. 2. Use rpm to install the new package. :: [/tmp]$ su Password: [/tmp]# rpm -i epydoc-3.0.1.noarch.rpm 3. Once epydoc is installed, you can delete the RPM file. :: [/tmp]# rm epydoc-3.0.1.rpm Installing from the Windows Installer ------------------------------------- 1. Download and run ``epydoc-3.0.1.win32.exe``. 2. Follow the on-screen instructions. Epydoc will be installed in the epydoc subdirectory of your Python installation directory (typically ``C:\Python24\``). 3. The Windows installer creates two scripts in the ``Scripts`` subdirectory of your Python installation directory: ``epydoc.pyw`` opens the graphical user interface, and ``epydoc.py`` calls the command line interface. If you'd like, you can create shortcuts from these scripts to more convenient locations (such as your desktop or start menu). 4. Once epydoc is installed, you can delete ``epydoc-3.0.1.win32.exe``. Installing from the Source Distribution (using make) ---------------------------------------------------- 1. Download an epydoc source distribution to a directory of your choice, and uncompress it. :: [/tmp]$ wget -q http://prdownloads.sourceforge.net/epydoc/epydoc-3.0.1.tar.gz [/tmp]$ gunzip epydoc-3.0.1.tar.gz [/tmp]$ tar -xvf epydoc-3.0.1.tar 2. Use ``make install`` in the ``eydoc-3.0.1/`` directory to install epydoc. :: [/tmp]$ cd epydoc-3.0.1/ [/tmp/epydoc-3.0.1]$ su Password: [/tmp/epydoc-3.0.1]# make install running install running build [...] copying build/scripts/epydoc -> /usr/bin changing mode of /usr/bin/epydoc to 100775 3. If you'd like to keep a local copy of the documentation, then use ``make installdocs``. By default, this will install the documentation to ``/usr/share/doc/`` and the man pages to ``/usr/share/man/``. If you would prefer to install documentation to different directories (such as ``/usr/lib/doc``), then edit the ``MAN`` and ``DOC`` variables at the top of ``Makefile`` before running ``make installdocs``. :: [/tmp/epydoc-3.0.1]# make installdocs 4. Once epydoc is installed, you can delete the installation directory and the source distribution file. :: [/tmp/epydoc-3.0.1]# cd .. [/tmp]# rm -r epydoc-3.0.1 [/tmp]# rm epydoc-3.0.1.tar Installing from the Source Distribution (without make) ------------------------------------------------------ 1. Download an epydoc source distribution to a directory of your choice, and uncompress it. :: [/tmp]$ wget -q http://prdownloads.sourceforge.net/epydoc/epydoc-3.0.1.tar.gz [/tmp]$ gunzip epydoc-3.0.1.tar.gz [/tmp]$ tar -xvf epydoc-3.0.1.tar 2. Use the ``setup.py`` script in the ``eydoc-3.0.1/`` directory to install epydoc. :: [/tmp]$ cd epydoc-3.0.1/ [/tmp/epydoc-3.0.1]$ su Password: [/tmp/epydoc-3.0.1]# python setup.py install running install running build [...] copying build/scripts/epydoc -> /usr/bin changing mode of /usr/bin/epydoc to 100775 [/tmp/epydoc-3.0.1]# cd .. [/tmp]# 3. If you'd like to keep a local copy of the documentation, then copy it to a permanant location, such as ``/usr/share/doc/``. You may also want to copy the man pages to a permanant location, such as ``/usr/share/man/``. :: [/tmp]# cp -r epydoc-3.0.1/doc/ /usr/share/doc/epydoc/ [/tmp]# cp epydoc-3.0.1/man/* /usr/share/man/ 4. Once epydoc is installed, you can delete the installation directory and the source distribution file. :: [/tmp]# rm -r epydoc-3.0.1 [/tmp]# rm epydoc-3.0.1.tar Installing on Debian -------------------- Epydoc 2.1 is available as a testing debian package (``python-epydoc``). The epydoc documentation is also available as a package (``epydoc-doc``).
0
public_repos/epydoc
public_repos/epydoc/doc/.cvsignore
*-man.html api *.pyc examples
0
public_repos/epydoc
public_repos/epydoc/doc/othermarkup.html
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <title>Alternate Markup Languages</title> <link rel="stylesheet" href="epydoc.css" type="text/css"/> </head> <!-- $Id: othermarkup.html 1526 2007-02-17 04:30:49Z dvarrazzo $ --> <body> <div class="body"> <h1>Alternate Markup Languages</h1> <p> Epydoc's default markup language is <a href="epytext.html">epytext</a>, a lightweight markup language that's easy to write and to understand. But if epytext is not powerful enough for you, or doesn't suit your needs, epydoc also supports three alternate markup languages: </p> <ul> <li><b><a href="http://docutils.sourceforge.net/rst.html" >reStructuredText</a></b> is an "easy-to-read, what-you-see-is-what-you-get plaintext markup syntax." It is more powerful than epytext (e.g., it includes markup for tables and footnotes); but it is also more complex, and sometimes harder to read.</li> <li><b><a href="http://java.sun.com/j2se/javadoc/" >Javadoc</a></b> is a documentation markup language that was developed for Java. It consists of HTML, augmented by a set of special tagged fields. </li> <li><b>Plaintext</b> docstrings are rendered verbatim (preserving whitespace).</li> </ul> <p> To specify the markup language for a module, you should define a module-level string variable <code>__docformat__</code>, containing the name of the module's markup language. The name of the markup language may optionally be followed by a language code (such as <code>en</code> for English). Conventionally, the definition of the <code>__docformat__</code> variable immediately follows the module's docstring: </p> <div class="screen"> <pre> <code class="comment"># widget.py</code> <code class="string">""" Graphical support for `gizmos` and `widgets`. """</code> __docformat__ = <code class="string">"restructuredtext en"</code> <i>[...]</i> </pre></div> <p> To change the default markup language from the command line, use the <code>--docformat</code> option. For example, the following command generates API documentation for the existing regular expression package <code>re</code>, which uses plaintext markup: </p> <div class="screen"><pre> <code class="prompt">[epydoc]$</code> epydoc --docformat plaintext re </pre></div> <a name="restructuredtext"> <h2>reStructuredText</h2></a> <p> reStructuredText is a markup language that was developed in conjunction with <a href="http://docutils.sourceforge.net">Docutils</a>. In order to parse reStructuredText docstrings, Docutils 0.3 or higher must be installed. If Docutils is not installed, then reStructuredText docstrings will be rendered as plaintext. Docutils can be downloaded from the <a href="http://sourceforge.net/project/showfiles.php?group_id=38414">Docutils SourceForge page</a>. </p> <p> In addition to the <a href="fields.html#fields">standard set of fields</a>, the reStructruedText parser also supports <i>consolidated</i> fields, which combine the documentation for several objects into a single field. For more information, see the markup-specific notes for <a href="fields.html#rst">reStructuredText fields</a>. </p> <p> The epydoc reStructuredText reader also defines several custom <a href="http://docutils.sourceforge.net/docs/user/rst/quickref.html#directives">directives</a>, which can be used to automatically generate a variety of graphs. The following custom directives are currently defined:</p> <table border="1" cellspacing="0" cellpadding="3" width="95%"> <tr><th width="10%">Directive</th><th width="90%">Description</th></tr> <tr valign="top"><td><pre> .. classtree:: [<code class="user">classes...</code>] :dir: <code class="user">up|down|left|right</code> </pre></td> <td> Display a class hierarchy for the given class or classes (including all superclasses &amp; subclasses). If no class is specified, and the directive is used in a class's docstring, then that class's class hierarchy will be displayed. The <code>dir</code> option specifies the orientation for the graph (default=<code>down</code>). </td></tr> <tr valign="top"><td><pre> .. packagetree:: [<code class="user">modules...</code>] :dir: <code class="user">up|down|left|right</code> :style: <code class="user">uml|tree</code> </pre></td> <td> Display a package hierarchy for the given module or modules (including all subpackages and submodules). If no module is specified, and the directive is used in a module's docstring, then that module's package hierarchy will be displayed. The <code>dir</code> option specifies the orientation for the graph (default=<code>down</code>). The <code>style</code> option specifies whether packages should be displayed in a tree, or using nested UML symbols. </td></tr> <tr valign="top"><td><pre> .. importgraph:: [<code class="user">modules...</code>] :dir: <code class="user">up|down|left|right</code> </pre></td> <td> Display an import graph for the given module or modules. If no module is specified, and the directive is used in a module's docstring, then that module's import graph will be displayed. The <code>dir</code> option specifies the orientation for the graph (default=<code>left</code>). </td></tr> <tr valign="top"><td><pre> .. callgraph:: [<code class="user">functions...</code>] :dir: <code class="user">up|down|left|right</code> </pre></td> <td> Display a call graph for the given function or functions. If no function is specified, and the directive is used in a function's docstring, then that function's call graph will be displayed. The <code>dir</code> option specifies the orientation for the graph (default=<code>right</code>). </td></tr> <tr valign="top"><td><pre> .. dotgraph:: [<code class="user">title...</code>] :caption: <code class="user">text...</code> <code class="user">graph...</code> </pre></td> <td> Display a custom Graphviz dot graph. The body of the directive (<code>graph...</code>) should contain the body of a dot graph. The optional <code>title</code> argument, if specified, is used as the title of the graph. The optional <code>caption</code> option can be used to provide a caption for the graph. </td></tr> </table> <h2>Javadoc</h2> <p><a href="http://java.sun.com/j2se/javadoc/" >Javadoc</a> is a markup language developed by Sun Microsystems for documenting Java APIs. The epydoc implementation of Javadoc is based on the <a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/solaris/javadoc.html">Javadoc 1.4.2 reference documentation</a>. However, there are likely to be some minor incompatibilities between Sun's implementation and epydoc's. Known incompatibilities include: </p> <ul> <li> Epydoc does not support the Javadoc block tag <code>@serial</code>.</li> <li> Epydoc does not support the following Javadoc inline tags: <code>{@docroot}</code>, <code>{@inheritdoc}</code>, <code>{@value}</code>. <li> Epydoc adds many field tags that Sun does not include, such as <code>@var</code>, <code>@type</code>, and <code>@group</code>. </li> </ul> </div> <table width="100%" class="navbox" cellpadding="1" cellspacing="0"> <tr> <a class="nav" href="index.html"> <td align="center" width="20%" class="nav"> <a class="nav" href="index.html"> Home</a></td></a> <a class="nav" href="installing.html"> <td align="center" width="20%" class="nav"> <a class="nav" href="installing.html"> Installing Epydoc</a></td></a> <a class="nav" href="using.html"> <td align="center" width="20%" class="nav"> <a class="nav" href="using.html"> Using Epydoc</a></td></a> <a class="nav" href="epytext.html"> <td align="center" width="20%" class="nav"> <a class="nav" href="epytext.html"> Epytext</a></td></a> <td align="center" width="20%" class="nav"> <A href="http://sourceforge.net/projects/epydoc"> <IMG src="sflogo.png" width="88" height="26" border="0" alt="SourceForge" align="top"/></A></td> </tr> </table> </body> </html>
0
public_repos/epydoc/doc
public_repos/epydoc/doc/doctest/index.html
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <title>Epydoc: Regression Tests</title> <link rel="stylesheet" href="../epydoc.css" type="text/css"/> </head> <!-- $Id: future.html 1211 2006-04-10 19:38:37Z edloper $ --> <body> <div class="body"> <h1> Epydoc: Regression Tests </h1> <p> The following files contain the current regression test suite for epydoc. Each file contains a prose description of some aspect of epydoc, interspersed with <a href="http://docs.python.org/lib/module-doctest.html">doctest</a> examples. Each of these doctest examples is a single test case. </p> <div class="box"> <h2 class="box-title">Regression Tests</h2> <ul> <li> <a href="apidoc.html">APIDoc</a> -- The classes used to encode API documentation about Python programs.</li> <li> <a href="docintrospecter.html">Introspection</a> -- Extracting API information about Python objects by directly introspecting their values.</li> <li> <a href="docparser.html">Source Code Parsing</a> -- Extracting API information about Python objects by parsing their source code.</li> <li> <a href="docbuilder.html">Documentation building</a> -- Merging different information sources into a single API hypertext. <li> <a href="encoding.html">Unicode & Encodings</a> -- Tests for the processing of Python files that use non-ascii encodings. </li> <li> <a href="epytext.html">Epytext</a> -- Tests for epytext, the default markup language used by epydoc.</li> <li> <a href="javadoc.html">Javadoc</a> -- Tests for epydoc's support of the Javadoc markup language.</li> <li> <a href="plaintext.html">Plaintext</a> -- Tests for epydoc's support of plaintext markup.</li> <li> <a href="restructuredtext.html">reStructuredText</a> -- Tests for epydoc's support of the reStructuredText markup language.</li> <li> <a href="pyval_repr.html">Value Representations</a> -- Tests for epydoc's formatting & syntax highlighting of variable's values.</li> <li> <a href="zope2.html">Zope 2</a> -- Tests for epydoc's support for Zope 2.</li> <li> <a href="zope3.html">Zope 3</a> -- Tests for epydoc's support for Zope 3.</li> </ul> </div> </div> <table width="100%" class="navbox" cellpadding="1" cellspacing="0"> <tr> <a class="nav" href="../index.html"> <td align="center" width="20%" class="nav"> <a class="nav" href="../index.html"> Home</a></td></a> <a class="nav" href="../installing.html"> <td align="center" width="20%" class="nav"> <a class="nav" href="../installing.html"> Installing Epydoc</a></td></a> <a class="nav" href="../using.html"> <td align="center" width="20%" class="nav"> <a class="nav" href="../using.html"> Using Epydoc</a></td></a> <a class="nav" href="../epytext.html"> <td align="center" width="20%" class="nav"> <a class="nav" href="../epytext.html"> Epytext</a></td></a> <td align="center" width="20%" class="nav"> <A href="http://sourceforge.net/projects/epydoc"> <IMG src="../sflogo.png" width="88" height="26" border="0" alt="SourceForge" align="top"/></A></td> </tr> </table> </body> </html>
0
public_repos
public_repos/helm/README.md
# Langchain Helm Charts This repository contains Helm charts for deploying Langchain applications on Kubernetes. ## Adding the Langchain Helm repository To add the Langchain Helm repository to your Helm client, run the following command: ```bash helm repo add langchain https://langchain-ai.github.io/helm/ ``` ## License Copyright &copy; 2023 Langchain Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at <http://www.apache.org/licenses/LICENSE-2.0> Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
0
public_repos
public_repos/helm/LICENSE
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
0
public_repos/helm/charts
public_repos/helm/charts/langsmith/README.md.gotmpl
{{ template "chart.header" . }} {{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }} {{ template "chart.description" . }} ## Deploying Langsmith with Helm ### Prerequisites Ensure you have the following tools/items ready. 1. A working Kubernetes cluster that you can access via `kubectl` 1. Recommended: Atleast 4 vCPUs, 16GB Memory available 1. You may need to tune resource requests/limits for all of our different services based off of organization size/usage 2. Valid Dynamic PV provisioner or PVs available on your cluster. You can verify this by running: ```jsx kubectl get storageclass ``` 2. `Helm` 1. `brew install helm` 3. Langsmith License Key 1. You can get this from your Langchain representative. Contact us at support@langchain.dev for more information. 3. SSL(optional) 1. This should be attachable to a load balancer that 4. OpenAI API Key(optional). 1. Used for natural language search feature. Can specify OpenAI key in browser as well for the playground feature. 5. Oauth Configuration(optional). 1. You can configure oauth using the `values.yaml` file. You will need to provide a `client_id` and `client_issuer_url` for your oauth provider. We currently support anything that is OIDC compliant. 6. External Postgres(optional). 1. You can configure external postgres using the `values.yaml` file. You will need to provide connection parameters for your postgres instance. 2. Note: We do not support a schema other than public at this time. 7. External Redis(optional). 1. You can configure external redis using the `values.yaml` file. You will need to provide a connection url for your redis instance. ### Configure your Helm Charts: 1. Create a copy of `values.yaml` 2. Override any values in the file. Refer to the `values.yaml` documentation below to see all configurable values. Some values we recommend tuning: 1. Resources 2. SSL(If on EKS or some other cloud provider) 1. Add an annotation to the `frontend.service` object to tell your cloud provider to provision a load balancer with said certificate attached 3. OpenAI Api Key 4. Images 5. Oauth Bare minimum config file `langsmith_config.yaml`: ```yaml config: langsmithLicenseKey: "" ``` Example `EKS` config file with certificates setup using ACM: ```jsx config: langsmithLicenseKey: "" frontend: service: annotations: service.beta.kubernetes.io/aws-load-balancer-type: "nlb" service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "https" service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "<certificate arn>" ``` Example config file with oauth setup: ```jsx config: langsmithLicenseKey: "" oauth: enabled: true oauthClientId: "0oa805851lEvitA1i697" oauthIssuerUrl: "https://trial-5711606.okta.com/oauth2/default" ``` This should be configured as a Single Page Application in your OIDC provider. You will also need to add <external ip>/oauth-callback as a redirect uri for your application. Example config file with external postgres and redis: ```jsx config: langsmithLicenseKey: "" postgres: external: enabled: true host: <host> port: 5432 user: <user> password: <password> database: <database> redis: external: enabled: true connectionUrl: "redis://<url>:6379" ``` You can also use existingSecretName to avoid checking in secrets. This secret will need to follow the same format as the secret in the corresponding `secrets.yaml` file. ### Deploying to Kubernetes: 1. Verify that you can connect to your Kubernetes cluster(note: We highly suggest installing into an empty namespace) 1. Run `kubectl get pods` Output should look something like: ```bash kubectl get pods ⎈ langsmith-eks-2vauP7wf 21:07:46 No resources found in default namespace. ``` 2. Ensure you have the Langchain Helm repo added. (skip this step if you are using local charts) helm repo add langchain https://langchain-ai.github.io/helm/ "langchain" has been added to your repositories 3. Run `helm install langchain/langsmith . --values langsmith_config.yaml` 4. Run `kubectl get pods` 1. Output should now look something like: ```bash langsmith-backend-6ff46c99c4-wz22d 1/1 Running 0 3h2m langsmith-frontend-6bbb94c5df-8xrlr 1/1 Running 0 3h2m langsmith-hub-backend-5cc68c888c-vppjj 1/1 Running 0 3h2m langsmith-playground-6d95fd8dc6-x2d9b 1/1 Running 0 3h2m langsmith-postgres-0 1/1 Running 0 9h langsmith-queue-5898b9d566-tv6q8 1/1 Running 0 3h2m langsmith-redis-0 1/1 Running 0 9h ``` ### Validate your deployment: 1. Run `kubectl get services` Output should look something like: ```bash NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE langsmith-backend ClusterIP 172.20.140.77 <none> 1984/TCP 35h langsmith-frontend LoadBalancer 172.20.253.251 <external ip> 80:31591/TCP 35h langsmith-hub-backend ClusterIP 172.20.112.234 <none> 1985/TCP 35h langsmith-playground ClusterIP 172.20.153.194 <none> 3001/TCP 9h langsmith-postgres ClusterIP 172.20.244.82 <none> 5432/TCP 35h langsmith-redis ClusterIP 172.20.81.217 <none> 6379/TCP 35h ``` 2. Curl the external ip of the `langsmith-frontend` service: ```bash curl <external ip>/api/tenants [{"id":"00000000-0000-0000-0000-000000000000","has_waitlist_access":true,"created_at":"2023-09-13T18:25:10.488407","display_name":"Personal","config":{"is_personal":true,"max_identities":1},"tenant_handle":"default"}]% ``` 3. Visit the external ip for the `langsmith-frontend` service on your browser The Langsmith UI should be visible/operational ![./langsmith_ui.png](langsmith_ui.png) ### Using your deployment: We typically validate deployment using the following Jupyter notebook: 1. [https://github.com/langchain-ai/langchain/blob/master/docs/docs/guides/langsmith/walkthrough.ipynb](https://github.com/langchain-ai/langchain/blob/master/docs/docs/guides/langsmith/walkthrough.ipynb) 2. For `"LANGCHAIN_ENDPOINT"` you will want to use `<external ip>/api` 3. For `LANGCHAIN_HUB_API_URL` you will want to use `<external ip>/api-hub` 4. For `"LANGCHAIN_API_KEY"` you will want to set an API key you generate. If not using oauth, you can set this to some random value `"foo"` 5. Run through the notebook and validate that all cells complete successfully. ## FAQ: 1. How can we upgrade our application. - We plan to release new minor versions of the Langsmith application every 6 weeks. This will include release notes and all changes should be backwards compatible. To upgrade, you will need to follow the upgrade instructions in the Helm README and run a `helm upgrade langsmith --values <values file>` 2. Backups - Currently, we rely on PVCs/PV to power storage for our application. We strongly encourage setting up `Persistent Volume` backups or moving to a managed service for `Postgres` to support disaster recovery 3. Load Balancers - Currently, our application spins up one load balancer using a k8s service of type `LoadBalancer` for our frontend. If you do not want to setup a load balancer you can simply port-forward the frontend and use that as your external ip for the application. 4. Authentication - Currently, our self-hosted solution supports oauth as an authn solution. - Note, we do offer a no-auth solution but highly recommend setting up oauth before moving into production. 5. Using External `Postgres` or `Redis` - You can configure external postgres or redis using the external sections in the `values.yaml` file. You will need to provide the connection url/params for the database/redis instance. Look at the configuration above example for more information. 6. Networking - Our deployment only needs egress for a few things: - Fetching images (If mirroring your images, this may not be needed) - Talking to any LLMs - Your VPC can set up rules to limit any other access. 7. Resource Usage - We recommend at least 4 vCPUs and 16GB of memory for our application. - We have some default resources set in our `values.yaml` file. You can override these values to tune resource usage for your organization. - If the metrics server is enabled in your cluster, we also recommend enabling autoscaling on all deployments. {{ template "chart.requirementsSection" . }} ## General parameters | Key | Type | Default | Description | |-----|------|---------|-------------| {{- range .Values }} {{- if not (or (hasPrefix "config" .Key) (hasPrefix "backend" .Key) (hasPrefix "frontend" .Key) (hasPrefix "hubBackend" .Key) (hasPrefix "playground" .Key) (hasPrefix "postgres" .Key) (hasPrefix "queue" .Key) (hasPrefix "redis" .Key) ) }} | {{ .Key }} | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} | {{- end }} {{- end }} ## Configs | Key | Type | Default | Description | |-----|------|---------|-------------| {{- range .Values }} {{- if hasPrefix "config" .Key }} | {{ .Key }} | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} | {{- end }} {{- end }} ## Backend | Key | Type | Default | Description | |-----|------|---------|-------------| {{- range .Values }} {{- if hasPrefix "backend" .Key }} | {{ .Key }} | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} | {{- end }} {{- end }} ## Frontend | Key | Type | Default | Description | |-----|------|---------|-------------| {{- range .Values }} {{- if hasPrefix "frontend" .Key }} | {{ .Key }} | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} | {{- end }} {{- end }} ## Hub Backend | Key | Type | Default | Description | |-----|------|---------|-------------| {{- range .Values }} {{- if hasPrefix "hubBackend" .Key }} | {{ .Key }} | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} | {{- end }} {{- end }} ## Playground | Key | Type | Default | Description | |-----|------|---------|-------------| {{- range .Values }} {{- if hasPrefix "frontend" .Key }} | {{ .Key }} | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} | {{- end }} {{- end }} ## Postgres | Key | Type | Default | Description | |-----|------|---------|-------------| {{- range .Values }} {{- if hasPrefix "postgres" .Key }} | {{ .Key }} | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} | {{- end }} {{- end }} ## Queue | Key | Type | Default | Description | |-----|------|---------|-------------| {{- range .Values }} {{- if hasPrefix "queue" .Key }} | {{ .Key }} | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} | {{- end }} {{- end }} ## Redis | Key | Type | Default | Description | |-----|------|---------|-------------| {{- range .Values }} {{- if hasPrefix "redis" .Key }} | {{ .Key }} | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} | {{- end }} {{- end }} {{ template "chart.maintainersSection" . }} {{ template "helm-docs.versionFooter" . }} ## Docs Generated by [helm-docs](https://github.com/norwoodj/helm-docs) `helm-docs -t ./charts/langsmith/README.md.gotmpl`
0
public_repos/helm/charts
public_repos/helm/charts/langsmith/Chart.yaml
apiVersion: v2 name: langsmith maintainers: - name: Ankush email: ankush@langchain.dev description: Helm chart to deploy the langsmith application and all services it depends on. type: application version: 0.1.3 appVersion: "0.1.0"
0
public_repos/helm/charts
public_repos/helm/charts/langsmith/README.md
# langsmith ![Version: 0.1.3](https://img.shields.io/badge/Version-0.1.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square) Helm chart to deploy the langsmith application and all services it depends on. ## Deploying Langsmith with Helm ### Prerequisites Ensure you have the following tools/items ready. 1. A working Kubernetes cluster that you can access via `kubectl` 1. Recommended: Atleast 4 vCPUs, 16GB Memory available 1. You may need to tune resource requests/limits for all of our different services based off of organization size/usage 2. Valid Dynamic PV provisioner or PVs available on your cluster. You can verify this by running: ```jsx kubectl get storageclass ``` 2. `Helm` 1. `brew install helm` 3. Langsmith License Key 1. You can get this from your Langchain representative. Contact us at support@langchain.dev for more information. 3. SSL(optional) 1. This should be attachable to a load balancer that 4. OpenAI API Key(optional). 1. Used for natural language search feature. Can specify OpenAI key in browser as well for the playground feature. 5. Oauth Configuration(optional). 1. You can configure oauth using the `values.yaml` file. You will need to provide a `client_id` and `client_issuer_url` for your oauth provider. We currently support anything that is OIDC compliant. 6. External Postgres(optional). 1. You can configure external postgres using the `values.yaml` file. You will need to provide connection parameters for your postgres instance. 2. Note: We do not support a schema other than public at this time. 7. External Redis(optional). 1. You can configure external redis using the `values.yaml` file. You will need to provide a connection url for your redis instance. ### Configure your Helm Charts: 1. Create a copy of `values.yaml` 2. Override any values in the file. Refer to the `values.yaml` documentation below to see all configurable values. Some values we recommend tuning: 1. Resources 2. SSL(If on EKS or some other cloud provider) 1. Add an annotation to the `frontend.service` object to tell your cloud provider to provision a load balancer with said certificate attached 3. OpenAI Api Key 4. Images 5. Oauth Bare minimum config file `langsmith_config.yaml`: ```yaml config: langsmithLicenseKey: "" ``` Example `EKS` config file with certificates setup using ACM: ```jsx config: langsmithLicenseKey: "" frontend: service: annotations: service.beta.kubernetes.io/aws-load-balancer-type: "nlb" service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "https" service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "<certificate arn>" ``` Example config file with oauth setup: ```jsx config: langsmithLicenseKey: "" oauth: enabled: true oauthClientId: "0oa805851lEvitA1i697" oauthIssuerUrl: "https://trial-5711606.okta.com/oauth2/default" ``` This should be configured as a Single Page Application in your OIDC provider. You will also need to add <external ip>/oauth-callback as a redirect uri for your application. Example config file with external postgres and redis: ```jsx config: langsmithLicenseKey: "" postgres: external: enabled: true host: <host> port: 5432 user: <user> password: <password> database: <database> redis: external: enabled: true connectionUrl: "redis://<url>:6379" ``` You can also use existingSecretName to avoid checking in secrets. This secret will need to follow the same format as the secret in the corresponding `secrets.yaml` file. ### Deploying to Kubernetes: 1. Verify that you can connect to your Kubernetes cluster(note: We highly suggest installing into an empty namespace) 1. Run `kubectl get pods` Output should look something like: ```bash kubectl get pods ⎈ langsmith-eks-2vauP7wf 21:07:46 No resources found in default namespace. ``` 2. Ensure you have the Langchain Helm repo added. (skip this step if you are using local charts) helm repo add langchain https://langchain-ai.github.io/helm/ "langchain" has been added to your repositories 3. Run `helm install langchain/langsmith . --values langsmith_config.yaml` 4. Run `kubectl get pods` 1. Output should now look something like: ```bash langsmith-backend-6ff46c99c4-wz22d 1/1 Running 0 3h2m langsmith-frontend-6bbb94c5df-8xrlr 1/1 Running 0 3h2m langsmith-hub-backend-5cc68c888c-vppjj 1/1 Running 0 3h2m langsmith-playground-6d95fd8dc6-x2d9b 1/1 Running 0 3h2m langsmith-postgres-0 1/1 Running 0 9h langsmith-queue-5898b9d566-tv6q8 1/1 Running 0 3h2m langsmith-redis-0 1/1 Running 0 9h ``` ### Validate your deployment: 1. Run `kubectl get services` Output should look something like: ```bash NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE langsmith-backend ClusterIP 172.20.140.77 <none> 1984/TCP 35h langsmith-frontend LoadBalancer 172.20.253.251 <external ip> 80:31591/TCP 35h langsmith-hub-backend ClusterIP 172.20.112.234 <none> 1985/TCP 35h langsmith-playground ClusterIP 172.20.153.194 <none> 3001/TCP 9h langsmith-postgres ClusterIP 172.20.244.82 <none> 5432/TCP 35h langsmith-redis ClusterIP 172.20.81.217 <none> 6379/TCP 35h ``` 2. Curl the external ip of the `langsmith-frontend` service: ```bash curl <external ip>/api/tenants [{"id":"00000000-0000-0000-0000-000000000000","has_waitlist_access":true,"created_at":"2023-09-13T18:25:10.488407","display_name":"Personal","config":{"is_personal":true,"max_identities":1},"tenant_handle":"default"}]% ``` 3. Visit the external ip for the `langsmith-frontend` service on your browser The Langsmith UI should be visible/operational ![./langsmith_ui.png](langsmith_ui.png) ### Using your deployment: We typically validate deployment using the following Jupyter notebook: 1. [https://github.com/langchain-ai/langchain/blob/master/docs/docs/guides/langsmith/walkthrough.ipynb](https://github.com/langchain-ai/langchain/blob/master/docs/docs/guides/langsmith/walkthrough.ipynb) 2. For `"LANGCHAIN_ENDPOINT"` you will want to use `<external ip>/api` 3. For `LANGCHAIN_HUB_API_URL` you will want to use `<external ip>/api-hub` 4. For `"LANGCHAIN_API_KEY"` you will want to set an API key you generate. If not using oauth, you can set this to some random value `"foo"` 5. Run through the notebook and validate that all cells complete successfully. ## FAQ: 1. How can we upgrade our application. - We plan to release new minor versions of the Langsmith application every 6 weeks. This will include release notes and all changes should be backwards compatible. To upgrade, you will need to follow the upgrade instructions in the Helm README and run a `helm upgrade langsmith --values <values file>` 2. Backups - Currently, we rely on PVCs/PV to power storage for our application. We strongly encourage setting up `Persistent Volume` backups or moving to a managed service for `Postgres` to support disaster recovery 3. Load Balancers - Currently, our application spins up one load balancer using a k8s service of type `LoadBalancer` for our frontend. If you do not want to setup a load balancer you can simply port-forward the frontend and use that as your external ip for the application. 4. Authentication - Currently, our self-hosted solution supports oauth as an authn solution. - Note, we do offer a no-auth solution but highly recommend setting up oauth before moving into production. 5. Using External `Postgres` or `Redis` - You can configure external postgres or redis using the external sections in the `values.yaml` file. You will need to provide the connection url/params for the database/redis instance. Look at the configuration above example for more information. 6. Networking - Our deployment only needs egress for a few things: - Fetching images (If mirroring your images, this may not be needed) - Talking to any LLMs - Your VPC can set up rules to limit any other access. 7. Resource Usage - We recommend at least 4 vCPUs and 16GB of memory for our application. - We have some default resources set in our `values.yaml` file. You can override these values to tune resource usage for your organization. - If the metrics server is enabled in your cluster, we also recommend enabling autoscaling on all deployments. ## General parameters | Key | Type | Default | Description | |-----|------|---------|-------------| | commonAnnotations | object | `{}` | Annotations that will be applied to all resources created by the chart | | commonLabels | object | `{}` | Labels that will be applied to all resources created by the chart | | fullnameOverride | string | `""` | String to fully override `"langsmith.fullname"` | | images.backendImage.pullPolicy | string | `"IfNotPresent"` | | | images.backendImage.repository | string | `"docker.io/langchain/langchainplus-backend"` | | | images.backendImage.tag | string | `"99d8f59"` | | | images.frontendImage.pullPolicy | string | `"IfNotPresent"` | | | images.frontendImage.repository | string | `"docker.io/langchain/langchainplus-frontend-dynamic"` | | | images.frontendImage.tag | string | `"99d8f59"` | | | images.hubBackendImage.pullPolicy | string | `"IfNotPresent"` | | | images.hubBackendImage.repository | string | `"docker.io/langchain/langchainhub-backend"` | | | images.hubBackendImage.tag | string | `"99d8f59"` | | | images.imagePullSecrets | list | `[]` | Secrets with credentials to pull images from a private registry. Specified as name: value. | | images.playgroundImage.pullPolicy | string | `"IfNotPresent"` | | | images.playgroundImage.repository | string | `"docker.io/langchain/langchainplus-playground"` | | | images.playgroundImage.tag | string | `"99d8f59"` | | | images.postgresImage.pullPolicy | string | `"IfNotPresent"` | | | images.postgresImage.repository | string | `"docker.io/postgres"` | | | images.postgresImage.tag | string | `"14.7"` | | | images.redisImage.pullPolicy | string | `"IfNotPresent"` | | | images.redisImage.repository | string | `"docker.io/redis"` | | | images.redisImage.tag | string | `"7"` | | | ingress.annotations | object | `{}` | | | ingress.enabled | bool | `false` | | | ingress.hostname | string | `""` | | | ingress.ingressClassName | string | `""` | | | ingress.labels | object | `{}` | | | ingress.tls | list | `[]` | | | nameOverride | string | `""` | Provide a name in place of `langsmith` | ## Configs | Key | Type | Default | Description | |-----|------|---------|-------------| | config.existingSecretName | string | `""` | | | config.langsmithLicenseKey | string | `""` | | | config.oauth.enabled | bool | `false` | | | config.oauth.oauthClientId | string | `""` | | | config.oauth.oauthIssuerUrl | string | `""` | | | config.openaiApiKey | string | `""` | | ## Backend | Key | Type | Default | Description | |-----|------|---------|-------------| | backend.autoscaling.enabled | bool | `false` | | | backend.autoscaling.maxReplicas | int | `5` | | | backend.autoscaling.minReplicas | int | `1` | | | backend.autoscaling.targetCPUUtilizationPercentage | int | `80` | | | backend.containerPort | int | `1984` | | | backend.deployment.affinity | object | `{}` | | | backend.deployment.annotations | object | `{}` | | | backend.deployment.labels | object | `{}` | | | backend.deployment.nodeSelector | object | `{}` | | | backend.deployment.podSecurityContext | object | `{}` | | | backend.deployment.replicaCount | int | `1` | | | backend.deployment.resources | object | `{}` | | | backend.deployment.securityContext | object | `{}` | | | backend.deployment.tolerations | list | `[]` | | | backend.migrations.affinity | object | `{}` | | | backend.migrations.annotations | object | `{}` | | | backend.migrations.labels | object | `{}` | | | backend.migrations.nodeSelector | object | `{}` | | | backend.migrations.podSecurityContext | object | `{}` | | | backend.migrations.replicaCount | int | `1` | | | backend.migrations.resources | object | `{}` | | | backend.migrations.securityContext | object | `{}` | | | backend.migrations.tolerations | list | `[]` | | | backend.name | string | `"backend"` | | | backend.service.annotations | object | `{}` | | | backend.service.labels | object | `{}` | | | backend.service.port | int | `1984` | | | backend.service.type | string | `"ClusterIP"` | | ## Frontend | Key | Type | Default | Description | |-----|------|---------|-------------| | frontend.autoscaling.enabled | bool | `false` | | | frontend.autoscaling.maxReplicas | int | `5` | | | frontend.autoscaling.minReplicas | int | `1` | | | frontend.autoscaling.targetCPUUtilizationPercentage | int | `80` | | | frontend.containerPort | int | `8080` | | | frontend.deployment.affinity | object | `{}` | | | frontend.deployment.annotations | object | `{}` | | | frontend.deployment.labels | object | `{}` | | | frontend.deployment.nodeSelector | object | `{}` | | | frontend.deployment.podSecurityContext | object | `{}` | | | frontend.deployment.replicaCount | int | `1` | | | frontend.deployment.resources | object | `{}` | | | frontend.deployment.securityContext | object | `{}` | | | frontend.deployment.tolerations | list | `[]` | | | frontend.name | string | `"frontend"` | | | frontend.service.annotations | object | `{}` | | | frontend.service.httpPort | int | `80` | | | frontend.service.httpsPort | int | `443` | | | frontend.service.labels | object | `{}` | | | frontend.service.type | string | `"LoadBalancer"` | | ## Hub Backend | Key | Type | Default | Description | |-----|------|---------|-------------| | hubBackend.autoscaling.enabled | bool | `false` | | | hubBackend.autoscaling.maxReplicas | int | `5` | | | hubBackend.autoscaling.minReplicas | int | `1` | | | hubBackend.autoscaling.targetCPUUtilizationPercentage | int | `80` | | | hubBackend.containerPort | int | `1985` | | | hubBackend.deployment.affinity | object | `{}` | | | hubBackend.deployment.annotations | object | `{}` | | | hubBackend.deployment.labels | object | `{}` | | | hubBackend.deployment.nodeSelector | object | `{}` | | | hubBackend.deployment.podSecurityContext | object | `{}` | | | hubBackend.deployment.replicaCount | int | `1` | | | hubBackend.deployment.resources | object | `{}` | | | hubBackend.deployment.securityContext | object | `{}` | | | hubBackend.deployment.tolerations | list | `[]` | | | hubBackend.name | string | `"hub-backend"` | | | hubBackend.service.annotations | object | `{}` | | | hubBackend.service.labels | object | `{}` | | | hubBackend.service.port | int | `1985` | | | hubBackend.service.type | string | `"ClusterIP"` | | ## Playground | Key | Type | Default | Description | |-----|------|---------|-------------| | frontend.autoscaling.enabled | bool | `false` | | | frontend.autoscaling.maxReplicas | int | `5` | | | frontend.autoscaling.minReplicas | int | `1` | | | frontend.autoscaling.targetCPUUtilizationPercentage | int | `80` | | | frontend.containerPort | int | `8080` | | | frontend.deployment.affinity | object | `{}` | | | frontend.deployment.annotations | object | `{}` | | | frontend.deployment.labels | object | `{}` | | | frontend.deployment.nodeSelector | object | `{}` | | | frontend.deployment.podSecurityContext | object | `{}` | | | frontend.deployment.replicaCount | int | `1` | | | frontend.deployment.resources | object | `{}` | | | frontend.deployment.securityContext | object | `{}` | | | frontend.deployment.tolerations | list | `[]` | | | frontend.name | string | `"frontend"` | | | frontend.service.annotations | object | `{}` | | | frontend.service.httpPort | int | `80` | | | frontend.service.httpsPort | int | `443` | | | frontend.service.labels | object | `{}` | | | frontend.service.type | string | `"LoadBalancer"` | | ## Postgres | Key | Type | Default | Description | |-----|------|---------|-------------| | postgres.containerPort | int | `5432` | | | postgres.external.connectionUrl | string | `""` | | | postgres.external.database | string | `"postgres"` | | | postgres.external.enabled | bool | `false` | | | postgres.external.existingSecretName | string | `""` | | | postgres.external.host | string | `""` | | | postgres.external.password | string | `"postgres"` | | | postgres.external.port | string | `"5432"` | | | postgres.external.user | string | `"postgres"` | | | postgres.name | string | `"postgres"` | | | postgres.service.annotations | object | `{}` | | | postgres.service.labels | object | `{}` | | | postgres.service.port | int | `5432` | | | postgres.service.type | string | `"ClusterIP"` | | | postgres.statefulSet.affinity | object | `{}` | | | postgres.statefulSet.annotations | object | `{}` | | | postgres.statefulSet.labels | object | `{}` | | | postgres.statefulSet.nodeSelector | object | `{}` | | | postgres.statefulSet.persistence.enabled | bool | `false` | | | postgres.statefulSet.persistence.size | string | `"8Gi"` | | | postgres.statefulSet.persistence.storageClassName | string | `""` | | | postgres.statefulSet.podSecurityContext | object | `{}` | | | postgres.statefulSet.resources | object | `{}` | | | postgres.statefulSet.securityContext | object | `{}` | | | postgres.statefulSet.tolerations | list | `[]` | | ## Queue | Key | Type | Default | Description | |-----|------|---------|-------------| | queue.autoscaling.enabled | bool | `false` | | | queue.autoscaling.maxReplicas | int | `5` | | | queue.autoscaling.minReplicas | int | `1` | | | queue.autoscaling.targetCPUUtilizationPercentage | int | `80` | | | queue.deployment.affinity | object | `{}` | | | queue.deployment.annotations | object | `{}` | | | queue.deployment.labels | object | `{}` | | | queue.deployment.nodeSelector | object | `{}` | | | queue.deployment.podSecurityContext | object | `{}` | | | queue.deployment.replicaCount | int | `1` | | | queue.deployment.resources | object | `{}` | | | queue.deployment.securityContext | object | `{}` | | | queue.deployment.tolerations | list | `[]` | | | queue.name | string | `"queue"` | | ## Redis | Key | Type | Default | Description | |-----|------|---------|-------------| | redis.containerPort | int | `6379` | | | redis.external.connectionUrl | string | `""` | | | redis.external.enabled | bool | `false` | | | redis.external.existingSecretName | string | `""` | | | redis.name | string | `"redis"` | | | redis.service.annotations | object | `{}` | | | redis.service.labels | object | `{}` | | | redis.service.port | int | `6379` | | | redis.service.type | string | `"ClusterIP"` | | | redis.statefulSet.affinity | object | `{}` | | | redis.statefulSet.annotations | object | `{}` | | | redis.statefulSet.labels | object | `{}` | | | redis.statefulSet.nodeSelector | object | `{}` | | | redis.statefulSet.persistence.enabled | bool | `false` | | | redis.statefulSet.persistence.size | string | `"8Gi"` | | | redis.statefulSet.persistence.storageClassName | string | `""` | | | redis.statefulSet.podSecurityContext | object | `{}` | | | redis.statefulSet.resources | object | `{}` | | | redis.statefulSet.securityContext | object | `{}` | | | redis.statefulSet.tolerations | list | `[]` | | ## Maintainers | Name | Email | Url | | ---- | ------ | --- | | Ankush | <ankush@langchain.dev> | | ---------------------------------------------- Autogenerated from chart metadata using [helm-docs v1.11.3](https://github.com/norwoodj/helm-docs/releases/v1.11.3) ## Docs Generated by [helm-docs](https://github.com/norwoodj/helm-docs) `helm-docs -t ./charts/langsmith/README.md.gotmpl`
0
public_repos/helm/charts
public_repos/helm/charts/langsmith/values.yaml
# Default values for the langsmith helm chart. Refer to documentation on individual values for help with configuration. # -- Provide a name in place of `langsmith` nameOverride: "" # -- String to fully override `"langsmith.fullname"` fullnameOverride: "" # -- Annotations that will be applied to all resources created by the chart commonAnnotations: {} # -- Labels that will be applied to all resources created by the chart commonLabels: {} images: # -- Secrets with credentials to pull images from a private registry. Specified as name: value. imagePullSecrets: [] backendImage: repository: "docker.io/langchain/langchainplus-backend" pullPolicy: IfNotPresent tag: "99d8f59" frontendImage: repository: "docker.io/langchain/langchainplus-frontend-dynamic" pullPolicy: IfNotPresent tag: "99d8f59" hubBackendImage: repository: "docker.io/langchain/langchainhub-backend" pullPolicy: IfNotPresent tag: "99d8f59" playgroundImage: repository: "docker.io/langchain/langchainplus-playground" pullPolicy: IfNotPresent tag: "99d8f59" postgresImage: repository: "docker.io/postgres" pullPolicy: IfNotPresent tag: "14.7" redisImage: repository: "docker.io/redis" pullPolicy: IfNotPresent tag: "7" ingress: hostname: "" enabled: false ingressClassName: "" annotations: {} labels: {} tls: [] config: existingSecretName: "" openaiApiKey: "" langsmithLicenseKey: "" oauth: enabled: false oauthClientId: "" oauthIssuerUrl: "" backend: name: "backend" containerPort: 1984 deployment: replicaCount: 1 labels: {} annotations: {} podSecurityContext: {} securityContext: {} resources: {} # limits: # cpu: 1000m # memory: 1Gi # requests: # cpu: 200m # memory: 500Mi extraEnv: [] nodeSelector: {} tolerations: [] affinity: {} migrations: replicaCount: 1 labels: {} annotations: {} podSecurityContext: {} securityContext: {} resources: {} # limits: # cpu: 1000m # memory: 1Gi # requests: # cpu: 200m # memory: 500Mi extraEnv: [] nodeSelector: {} tolerations: [] affinity: {} autoscaling: enabled: false minReplicas: 1 maxReplicas: 5 targetCPUUtilizationPercentage: 80 service: type: ClusterIP port: 1984 labels: {} annotations: {} frontend: name: "frontend" containerPort: 8080 deployment: replicaCount: 1 labels: {} annotations: {} podSecurityContext: {} securityContext: {} resources: {} # limits: # cpu: 1000m # memory: 1Gi # requests: # cpu: 200m # memory: 500Mi extraEnv: [] nodeSelector: {} tolerations: [] affinity: {} autoscaling: enabled: false minReplicas: 1 maxReplicas: 5 targetCPUUtilizationPercentage: 80 service: type: LoadBalancer httpPort: 80 httpsPort: 443 labels: {} annotations: {} hubBackend: name: "hub-backend" containerPort: 1985 deployment: replicaCount: 1 labels: {} annotations: {} podSecurityContext: {} securityContext: {} resources: {} # limits: # cpu: 1000m # memory: 1Gi # requests: # cpu: 200m # memory: 500Mi extraEnv: [] nodeSelector: {} tolerations: [] affinity: {} autoscaling: enabled: false minReplicas: 1 maxReplicas: 5 targetCPUUtilizationPercentage: 80 service: type: ClusterIP port: 1985 labels: {} annotations: {} playground: name: "playground" containerPort: 3001 deployment: replicaCount: 1 labels: {} annotations: {} podSecurityContext: {} securityContext: {} resources: {} # limits: # cpu: 1000m # memory: 1Gi # requests: # cpu: 200m # memory: 500Mi extraEnv: [] nodeSelector: {} tolerations: [] affinity: {} autoscaling: enabled: false minReplicas: 1 maxReplicas: 5 targetCPUUtilizationPercentage: 80 service: type: ClusterIP port: 3001 labels: {} annotations: {} postgres: name: "postgres" external: # If enabled, use the following values to connect to an external database. This will also disable the # creation of a postgres stateful-set and service. enabled: false host: "" port: "5432" user: "postgres" password: "postgres" database: "postgres" # If connection string is specified, we will ignore all above values and use the connection string instead. # Do not include the driver name(something like "postgres://" in the connection string. connectionUrl: "" existingSecretName: "" containerPort: 5432 statefulSet: labels: {} annotations: {} podSecurityContext: {} securityContext: {} resources: {} # limits: # cpu: 4000m # memory: 16Gi # requests: # cpu: 1000m # memory: 4Gi extraEnv: [] nodeSelector: {} tolerations: [] affinity: {} persistence: enabled: false size: 8Gi storageClassName: "" service: type: ClusterIP port: 5432 labels: {} annotations: {} queue: name: "queue" deployment: replicaCount: 1 labels: {} annotations: {} podSecurityContext: {} securityContext: {} resources: {} # limits: # cpu: 1000m # memory: 1Gi # requests: # cpu: 200m # memory: 500Mi extraEnv: [] nodeSelector: {} tolerations: [] affinity: {} autoscaling: enabled: false minReplicas: 1 maxReplicas: 5 targetCPUUtilizationPercentage: 80 redis: name: "redis" external: # If enabled, use the following values to connect to an external redis instance. This will also disable the # creation of a redis stateful-set and service. enabled: false connectionUrl: "" existingSecretName: "" containerPort: 6379 statefulSet: labels: {} annotations: {} podSecurityContext: {} securityContext: {} resources: {} # limits: # cpu: 4000m # memory: 16Gi # requests: # cpu: 1000m # memory: 2Gi extraEnv: [] nodeSelector: {} tolerations: [] affinity: {} persistence: enabled: false size: 8Gi storageClassName: "" service: type: ClusterIP port: 6379 labels: {} annotations: {}
0
public_repos/helm/charts
public_repos/helm/charts/langsmith/.helmignore
# Patterns to ignore when building packages. # This supports shell glob matching, relative path matching, and # negation (prefixed with !). Only one pattern per line. .DS_Store # Common VCS dirs .git/ .gitignore .bzr/ .bzrignore .hg/ .hgignore .svn/ # Common backup files *.swp *.bak *.tmp *.orig *~ # Various IDEs .project .idea/ *.tmproj .vscode/
0
public_repos/helm/charts/langsmith
public_repos/helm/charts/langsmith/templates/NOTES.txt
This is the Langsmith application helm chart. All pods should be running!
0
public_repos/helm/charts/langsmith
public_repos/helm/charts/langsmith/templates/ingress.yaml
{{- if .Values.ingress.enabled }} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ include "langsmith.fullname" . }}-ingress annotations: {{- include "langsmith.annotations" . | nindent 4 }} {{- with .Values.ingress.annotations }} {{- toYaml . | nindent 4 }} {{- end }} external-dns.alpha.kubernetes.io/hostname: {{ .Values.ingress.hostname }} labels: {{- include "langsmith.labels" . | nindent 4 }} {{- with .Values.ingress.labels }} {{- toYaml . | nindent 4 }} {{- end }} spec: ingressClassName: {{ .Values.ingress.ingressClassName }} {{- with .Values.ingress.tls }} tls: {{- toYaml . | nindent 4 }} {{- end }} rules: - host: {{ .Values.ingress.hostname }} http: paths: - path: / pathType: Prefix backend: service: name: {{ include "langsmith.fullname" . }}-{{ .Values.frontend.name }} port: number: {{ .Values.frontend.service.httpPort }} {{- end }}
0
public_repos/helm/charts/langsmith
public_repos/helm/charts/langsmith/templates/_helpers.tpl
{{/* Expand the name of the chart. */}} {{- define "langsmith.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} {{- end }} {{/* Create a default fully qualified app name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). If release name contains chart name it will be used as a full name. */}} {{- define "langsmith.fullname" -}} {{- if .Values.fullnameOverride }} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} {{- else }} {{- $name := default .Chart.Name .Values.nameOverride }} {{- if contains $name .Release.Name }} {{- .Release.Name | trunc 63 | trimSuffix "-" }} {{- else }} {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} {{- end }} {{- end }} {{- end }} {{/* Create chart name and version as used by the chart label. */}} {{- define "langsmith.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- end }} {{/* Common labels */}} {{- define "langsmith.labels" -}} {{- if .Values.commonLabels }} {{ toYaml .Values.commonLabels }} {{- end }} helm.sh/chart: {{ include "langsmith.chart" . }} {{ include "langsmith.selectorLabels" . }} {{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end }} {{/* Common labels */}} {{- define "langsmith.annotations" -}} {{- if .Values.commonAnnotations }} {{ toYaml .Values.commonAnnotations }} {{- end }} helm.sh/chart: {{ include "langsmith.chart" . }} {{ include "langsmith.selectorLabels" . }} {{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end }} {{/* Selector labels */}} {{- define "langsmith.selectorLabels" -}} app.kubernetes.io/name: {{ include "langsmith.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} {{/* Name of the secret containing the secrets for this chart. This can be overriden by a secrets file created by the user or some other secret provisioning mechanism */}} {{- define "langsmith.secretsName" -}} {{- if .Values.config.existingSecretName }} {{- .Values.config.existingSecretName }} {{- else }} {{- include "langsmith.fullname" . }}-secrets {{- end }} {{- end }} {{/* Name of the secret containing the secrets for postgres. This can be overriden by a secrets file created by the user or some other secret provisioning mechanism */}} {{- define "langsmith.postgresSecretsName" -}} {{- if .Values.postgres.external.existingSecretName }} {{- .Values.postgres.external.existingSecretName }} {{- else }} {{- include "langsmith.fullname" . }}-postgres {{- end }} {{- end }} {{/* Name of the secret containing the secrets for postgres. This can be overriden by a secrets file created by the user or some other secret provisioning mechanism */}} {{- define "langsmith.redisSecretsName" -}} {{- if .Values.redis.external.existingSecretName }} {{- .Values.redis.external.existingSecretName }} {{- else }} {{- include "langsmith.fullname" . }}-redis {{- end }} {{- end }} {{/* Template containing common environment variables that are used by several services. */}} {{- define "langsmith.commonEnv" -}} - name: POSTGRES_DATABASE_URI valueFrom: secretKeyRef: name: {{ include "langsmith.postgresSecretsName" . }} key: connection_url - name: REDIS_DATABASE_URI valueFrom: secretKeyRef: name: {{ include "langsmith.redisSecretsName" . }} key: connection_url - name: LANGCHAIN_ENV value: local_kubernetes - name: LOG_LEVEL value: debug - name: AUTH_TYPE {{- if .Values.config.oauth.enabled }} value: "oauth" {{- else }} value: "none" {{- end }} - name: OAUTH_CLIENT_ID valueFrom: secretKeyRef: name: {{ include "langsmith.secretsName" . }} key: oauth_client_id - name: OAUTH_ISSUER_URL valueFrom: secretKeyRef: name: {{ include "langsmith.secretsName" . }} key: oauth_issuer_url - name: LANGSMITH_LICENSE_KEY valueFrom: secretKeyRef: name: {{ include "langsmith.secretsName" . }} key: langsmith_license_key - name: CLICKHOUSE_HOST value: "clickhouse" - name: CLICKHOUSE_USER value: clickhouse_admin - name: CLICKHOUSE_PASSWORD value: password - name: CLICKHOUSE_DB value: default - name: API_KEY_SALT valueFrom: secretKeyRef: name: {{ include "langsmith.secretsName" . }} key: api_key_salt {{- end }}
0
public_repos/helm/charts/langsmith
public_repos/helm/charts/langsmith/templates/secrets.yaml
{{- if not .Values.config.existingSecretName }} apiVersion: v1 kind: Secret metadata: name: {{ include "langsmith.secretsName" . }} labels: {{- include "langsmith.labels" . | nindent 4 }} data: openai_api_key: {{ .Values.config.openaiApiKey | b64enc | quote }} oauth_client_id: {{ .Values.config.oauth.oauthClientId | b64enc | quote }} oauth_issuer_url: {{ .Values.config.oauth.oauthIssuerUrl | b64enc | quote }} langsmith_license_key: {{ .Values.config.langsmithLicenseKey | b64enc | quote }} api_key_salt: {{ .Values.config.langsmithLicenseKey | b64enc | quote }} {{- end }}
0
public_repos/helm/charts/langsmith/templates
public_repos/helm/charts/langsmith/templates/playground/deployment.yaml
apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "langsmith.fullname" . }}-{{ .Values.playground.name }} labels: {{- include "langsmith.labels" . | nindent 4 }} {{- with.Values.playground.deployment.labels }} {{- toYaml . | nindent 4 }} {{- end }} annotations: {{- include "langsmith.annotations" . | nindent 4 }} {{- with.Values.playground.deployment.annotations }} {{- toYaml . | nindent 4 }} {{- end }} spec: {{- if not .Values.playground.autoscaling.enabled }} replicas: {{ .Values.playground.deployment.replicaCount }} {{- end }} selector: matchLabels: {{- include "langsmith.selectorLabels" . | nindent 6 }} app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.playground.name }} template: metadata: {{- with .Values.playground.deployment.annotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- with.Values.playground.deployment.labels }} {{- toYaml . | nindent 8 }} {{- end }} {{- include "langsmith.labels" . | nindent 8 }} app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.playground.name }} spec: {{- with .Values.images.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} securityContext: {{- toYaml .Values.playground.deployment.podSecurityContext | nindent 8 }} containers: - name: {{ .Values.playground.name }} {{- with .Values.playground.deployment.extraEnv }} env: {{- toYaml . | nindent 12 }} {{- end }} image: "{{ .Values.images.playgroundImage.repository }}:{{ .Values.images.playgroundImage.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.images.playgroundImage.pullPolicy }} ports: - name: playground containerPort: {{ .Values.playground.containerPort }} protocol: TCP resources: {{- toYaml .Values.playground.deployment.resources | nindent 12 }} securityContext: {{- toYaml .Values.playground.deployment.securityContext | nindent 12 }} {{- with .Values.playground.deployment.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.playground.deployment.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.playground.deployment.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }}
0
public_repos/helm/charts/langsmith/templates
public_repos/helm/charts/langsmith/templates/playground/service.yaml
apiVersion: v1 kind: Service metadata: name: {{ include "langsmith.fullname" . }}-{{ .Values.playground.name }} labels: {{- include "langsmith.labels" . | nindent 4 }} {{- with.Values.playground.service.labels }} {{- toYaml . | nindent 4 }} {{- end }} annotations: {{- include "langsmith.annotations" . | nindent 4 }} {{- with.Values.playground.service.annotations }} {{- toYaml . | nindent 4 }} {{- end }} spec: type: {{ .Values.playground.service.type }} ports: - name: playground port: {{ .Values.playground.service.port }} targetPort: playground protocol: TCP selector: {{- include "langsmith.selectorLabels" . | nindent 4 }} app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.playground.name }}
0
public_repos/helm/charts/langsmith/templates
public_repos/helm/charts/langsmith/templates/playground/hpa.yaml
{{- if .Values.playground.autoscaling.enabled }} apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ include "langsmith.fullname" . }}-{{ .Values.playground.name }} labels: {{- include "langsmith.labels" . | nindent 4 }} spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: {{ include "langsmith.fullname" . }}-{{ .Values.playground.name }} minReplicas: {{ .Values.playground.autoscaling.minReplicas }} maxReplicas: {{ .Values.playground.autoscaling.maxReplicas }} metrics: {{- if .Values.playground.autoscaling.targetCPUUtilizationPercentage }} - type: Resource resource: name: cpu target: type: Utilization averageUtilization: {{ .Values.playground.autoscaling.targetCPUUtilizationPercentage }} {{- end }} {{- if .Values.playground.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory target: type: Utilization averageUtilization: {{ .Values.playground.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} {{- end }}
0
public_repos/helm/charts/langsmith/templates
public_repos/helm/charts/langsmith/templates/hub-backend/deployment.yaml
apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "langsmith.fullname" . }}-{{ .Values.hubBackend.name }} labels: {{- include "langsmith.labels" . | nindent 4 }} {{- with.Values.hubBackend.deployment.labels }} {{- toYaml . | nindent 4 }} {{- end }} annotations: {{- include "langsmith.annotations" . | nindent 4 }} {{- with.Values.hubBackend.deployment.annotations }} {{- toYaml . | nindent 4 }} {{- end }} spec: {{- if not .Values.hubBackend.autoscaling.enabled }} replicas: {{ .Values.hubBackend.deployment.replicaCount }} {{- end }} selector: matchLabels: {{- include "langsmith.selectorLabels" . | nindent 6 }} app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.hubBackend.name }} template: metadata: {{- with .Values.hubBackend.deployment.annotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- with.Values.hubBackend.deployment.labels }} {{- toYaml . | nindent 8 }} {{- end }} {{- include "langsmith.labels" . | nindent 8 }} app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.hubBackend.name }} spec: {{- with .Values.images.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} securityContext: {{- toYaml .Values.hubBackend.deployment.podSecurityContext | nindent 8 }} containers: - name: {{ .Values.hubBackend.name }} env: {{- include "langsmith.commonEnv" . | nindent 12 }} - name: PORT value: {{ .Values.hubBackend.containerPort | quote }} {{- with .Values.hubBackend.deployment.extraEnv }} {{- toYaml . | nindent 12 }} {{- end }} image: "{{ .Values.images.hubBackendImage.repository }}:{{ .Values.images.hubBackendImage.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.images.hubBackendImage.pullPolicy }} ports: - name: hub-backend containerPort: {{ .Values.hubBackend.containerPort }} protocol: TCP startupProbe: httpGet: path: /ok port: {{ .Values.hubBackend.containerPort }} failureThreshold: 6 periodSeconds: 10 timeoutSeconds: 1 livenessProbe: httpGet: path: /ok port: {{ .Values.hubBackend.containerPort }} failureThreshold: 6 periodSeconds: 10 timeoutSeconds: 1 readinessProbe: httpGet: path: /ok port: {{ .Values.hubBackend.containerPort }} failureThreshold: 6 periodSeconds: 10 timeoutSeconds: 1 resources: {{- toYaml .Values.hubBackend.deployment.resources | nindent 12 }} securityContext: {{- toYaml .Values.hubBackend.deployment.securityContext | nindent 12 }} {{- with .Values.hubBackend.deployment.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.hubBackend.deployment.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.hubBackend.deployment.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }}
0
public_repos/helm/charts/langsmith/templates
public_repos/helm/charts/langsmith/templates/hub-backend/api-service.yaml
{{- if .Values.config.oauth.enabled }} apiVersion: v1 kind: Service metadata: name: {{ include "langsmith.fullname" . }}-{{ .Values.hubBackend.name }}-api labels: {{- include "langsmith.labels" . | nindent 4 }} {{- with.Values.hubBackend.service.labels }} {{- toYaml . | nindent 4 }} {{- end }} annotations: {{- include "langsmith.annotations" . | nindent 4 }} {{- with.Values.hubBackend.service.annotations }} {{- toYaml . | nindent 4 }} {{- end }} spec: type: {{ .Values.hubBackend.service.type }} ports: - name: hub-backend port: {{ .Values.hubBackend.service.port }} targetPort: hub-backend protocol: TCP selector: {{- include "langsmith.selectorLabels" . | nindent 4 }} app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.hubBackend.name }}-api {{- end }}
0
public_repos/helm/charts/langsmith/templates
public_repos/helm/charts/langsmith/templates/hub-backend/service.yaml
apiVersion: v1 kind: Service metadata: name: {{ include "langsmith.fullname" . }}-{{ .Values.hubBackend.name }} labels: {{- include "langsmith.labels" . | nindent 4 }} {{- with.Values.hubBackend.service.labels }} {{- toYaml . | nindent 4 }} {{- end }} annotations: {{- include "langsmith.annotations" . | nindent 4 }} {{- with.Values.hubBackend.service.annotations }} {{- toYaml . | nindent 4 }} {{- end }} spec: type: {{ .Values.hubBackend.service.type }} ports: - name: hub-backend port: {{ .Values.hubBackend.service.port }} targetPort: hub-backend protocol: TCP selector: {{- include "langsmith.selectorLabels" . | nindent 4 }} app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.hubBackend.name }}
0
public_repos/helm/charts/langsmith/templates
public_repos/helm/charts/langsmith/templates/hub-backend/api-deployment.yaml
{{- if .Values.config.oauth.enabled }} apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "langsmith.fullname" . }}-{{ .Values.hubBackend.name }}-api labels: {{- include "langsmith.labels" . | nindent 4 }} {{- with.Values.hubBackend.deployment.labels }} {{- toYaml . | nindent 4 }} {{- end }} annotations: {{- include "langsmith.annotations" . | nindent 4 }} {{- with.Values.hubBackend.deployment.annotations }} {{- toYaml . | nindent 4 }} {{- end }} spec: {{- if not .Values.hubBackend.autoscaling.enabled }} replicas: {{ .Values.hubBackend.deployment.replicaCount }} {{- end }} selector: matchLabels: {{- include "langsmith.selectorLabels" . | nindent 6 }} app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.hubBackend.name }}-api template: metadata: {{- with .Values.hubBackend.deployment.annotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- with.Values.hubBackend.deployment.labels }} {{- toYaml . | nindent 8 }} {{- end }} {{- include "langsmith.labels" . | nindent 8 }} app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.hubBackend.name }}-api spec: {{- with .Values.images.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} securityContext: {{- toYaml .Values.hubBackend.deployment.podSecurityContext | nindent 8 }} containers: - name: {{ .Values.hubBackend.name }} env: {{- include "langsmith.commonEnv" . | nindent 12 }} - name: PORT value: {{ .Values.hubBackend.containerPort | quote }} - name: AUTH_TYPE value: 'api_key' {{- with .Values.hubBackend.deployment.extraEnv }} {{- toYaml . | nindent 12 }} {{- end }} image: "{{ .Values.images.hubBackendImage.repository }}:{{ .Values.images.hubBackendImage.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.images.hubBackendImage.pullPolicy }} ports: - name: hub-backend containerPort: {{ .Values.hubBackend.containerPort }} protocol: TCP startupProbe: httpGet: path: /ok port: {{ .Values.hubBackend.containerPort }} failureThreshold: 6 periodSeconds: 10 timeoutSeconds: 1 livenessProbe: httpGet: path: /ok port: {{ .Values.hubBackend.containerPort }} failureThreshold: 6 periodSeconds: 10 timeoutSeconds: 1 readinessProbe: httpGet: path: /ok port: {{ .Values.hubBackend.containerPort }} failureThreshold: 6 periodSeconds: 10 timeoutSeconds: 1 resources: {{- toYaml .Values.hubBackend.deployment.resources | nindent 12 }} securityContext: {{- toYaml .Values.hubBackend.deployment.securityContext | nindent 12 }} {{- with .Values.hubBackend.deployment.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.hubBackend.deployment.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.hubBackend.deployment.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} {{- end }}
0
public_repos/helm/charts/langsmith/templates
public_repos/helm/charts/langsmith/templates/hub-backend/hpa.yaml
{{- if .Values.hubBackend.autoscaling.enabled }} apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ include "langsmith.fullname" . }}-{{ .Values.hubBackend.name }} labels: {{- include "langsmith.labels" . | nindent 4 }} spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: {{ include "langsmith.fullname" . }}-{{ .Values.hubBackend.name }} minReplicas: {{ .Values.hubBackend.autoscaling.minReplicas }} maxReplicas: {{ .Values.hubBackend.autoscaling.maxReplicas }} metrics: {{- if .Values.hubBackend.autoscaling.targetCPUUtilizationPercentage }} - type: Resource resource: name: cpu target: type: Utilization averageUtilization: {{ .Values.hubBackend.autoscaling.targetCPUUtilizationPercentage }} {{- end }} {{- if .Values.hubBackend.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory target: type: Utilization averageUtilization: {{ .Values.hubBackend.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} {{- end }}
0
public_repos/helm/charts/langsmith/templates
public_repos/helm/charts/langsmith/templates/redis/stateful-set.yaml
{{- if not .Values.redis.external.enabled }} apiVersion: apps/v1 kind: StatefulSet metadata: name: {{ include "langsmith.fullname" . }}-{{ .Values.redis.name }} labels: {{- include "langsmith.labels" . | nindent 4 }} {{- with.Values.redis.statefulSet.labels }} {{- toYaml . | nindent 4 }} {{- end }} annotations: {{- include "langsmith.annotations" . | nindent 4 }} {{- with.Values.redis.statefulSet.annotations }} {{- toYaml . | nindent 4 }} {{- end }} spec: serviceName: {{ include "langsmith.fullname" . }}-{{ .Values.redis.name }} replicas: 1 selector: matchLabels: {{- include "langsmith.selectorLabels" . | nindent 6 }} app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.redis.name }} template: metadata: {{- with .Values.redis.statefulSet.annotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- with.Values.redis.statefulSet.labels }} {{- toYaml . | nindent 8 }} {{- end }} {{- include "langsmith.labels" . | nindent 8 }} app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.redis.name }} spec: {{- with .Values.images.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} securityContext: {{- toYaml .Values.redis.statefulSet.podSecurityContext | nindent 8 }} containers: - name: {{ .Values.redis.name }} {{- with .Values.redis.statefulSet.extraEnv }} env: {{- toYaml . | nindent 12 }} {{- end }} image: "{{ .Values.images.redisImage.repository }}:{{ .Values.images.redisImage.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.images.redisImage.pullPolicy }} ports: - name: redis containerPort: {{ .Values.redis.containerPort }} protocol: TCP startupProbe: exec: command: - /bin/sh - -c - exec redis-cli ping failureThreshold: 6 periodSeconds: 10 timeoutSeconds: 1 readinessProbe: exec: command: - /bin/sh - -c - exec redis-cli ping failureThreshold: 6 periodSeconds: 10 timeoutSeconds: 1 livenessProbe: exec: command: - /bin/sh - -c - exec redis-cli ping failureThreshold: 6 periodSeconds: 10 timeoutSeconds: 1 resources: {{- toYaml .Values.redis.statefulSet.resources | nindent 12 }} securityContext: {{- toYaml .Values.redis.statefulSet.securityContext | nindent 12 }} {{- if .Values.redis.statefulSet.persistence.enabled }} volumeMounts: - mountPath: /data name: data {{- end }} {{- with .Values.redis.statefulSet.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.redis.statefulSet.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.redis.statefulSet.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} {{- if .Values.redis.statefulSet.persistence.enabled }} volumeClaimTemplates: - apiVersion: v1 kind: PersistentVolumeClaim metadata: name: data labels: {{- include "langsmith.labels" . | nindent 10 }} app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.redis.name }} spec: accessModes: - ReadWriteOnce resources: requests: storage: {{ .Values.redis.statefulSet.persistence.size }} {{- if .Values.redis.statefulSet.persistence.storageClassName }} storageClassName: {{ .Values.redis.statefulSet.persistence.storageClassName }} {{- end }} {{- end }} {{- end }}
0
public_repos/helm/charts/langsmith/templates
public_repos/helm/charts/langsmith/templates/redis/service.yaml
{{- if not .Values.redis.external.enabled }} apiVersion: v1 kind: Service metadata: name: {{ include "langsmith.fullname" . }}-{{ .Values.redis.name }} labels: {{- include "langsmith.labels" . | nindent 4 }} {{- with.Values.redis.service.labels }} {{- toYaml . | nindent 4 }} {{- end }} annotations: {{- include "langsmith.annotations" . | nindent 4 }} {{- with.Values.redis.service.annotations }} {{- toYaml . | nindent 4 }} {{- end }} spec: type: {{ .Values.redis.service.type }} ports: - name: redis port: {{ .Values.redis.service.port }} targetPort: redis protocol: TCP selector: {{- include "langsmith.selectorLabels" . | nindent 4 }} app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.redis.name }} {{- end }}
0
public_repos/helm/charts/langsmith/templates
public_repos/helm/charts/langsmith/templates/redis/secrets.yaml
{{- if not .Values.redis.external.existingSecretName }} apiVersion: v1 kind: Secret metadata: name: {{ include "langsmith.redisSecretsName" .}} labels: {{- include "langsmith.labels" . | nindent 4 }} annotations: {{- include "langsmith.annotations" . | nindent 4 }} data: {{- if .Values.redis.external.enabled }} connection_url: {{ .Values.redis.external.connectionUrl | b64enc }} {{- else }} connection_url: {{ printf "redis://%s-%s:%v" (include "langsmith.fullname" .) .Values.redis.name .Values.redis.containerPort | b64enc }} {{- end}} {{- end }}
0
public_repos/helm/charts/langsmith/templates
public_repos/helm/charts/langsmith/templates/queue/deployment.yaml
apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "langsmith.fullname" . }}-{{ .Values.queue.name }} labels: {{- include "langsmith.labels" . | nindent 4 }} {{- with.Values.queue.deployment.labels }} {{- toYaml . | nindent 4 }} {{- end }} annotations: {{- include "langsmith.annotations" . | nindent 4 }} {{- with.Values.queue.deployment.annotations }} {{- toYaml . | nindent 4 }} {{- end }} spec: {{- if not .Values.queue.autoscaling.enabled }} replicas: {{ .Values.queue.deployment.replicaCount }} {{- end }} selector: matchLabels: {{- include "langsmith.selectorLabels" . | nindent 6 }} app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.queue.name }} template: metadata: {{- with .Values.queue.deployment.annotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- with.Values.queue.deployment.labels }} {{- toYaml . | nindent 8 }} {{- end }} {{- include "langsmith.labels" . | nindent 8 }} app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.queue.name }} spec: {{- with .Values.images.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} securityContext: {{- toYaml .Values.queue.deployment.podSecurityContext | nindent 8 }} containers: - name: {{ .Values.queue.name }} command: - rq - worker - --with-scheduler - -u - $(REDIS_DATABASE_URI) - --serializer - lc_database.queue.serializer.ORJSONSerializer - --worker-class - lc_database.queue.worker.Worker - --connection-class - lc_database.queue.connection.RedisRetry env: {{- include "langsmith.commonEnv" . | nindent 12 }} image: "{{ .Values.images.backendImage.repository }}:{{ .Values.images.backendImage.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.images.backendImage.pullPolicy }} resources: {{- toYaml .Values.queue.deployment.resources | nindent 12 }} securityContext: {{- toYaml .Values.queue.deployment.securityContext | nindent 12 }} {{- with .Values.queue.deployment.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.queue.deployment.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.queue.deployment.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }}
0
public_repos/helm/charts/langsmith/templates
public_repos/helm/charts/langsmith/templates/queue/hpa.yaml
{{- if .Values.queue.autoscaling.enabled }} apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ include "langsmith.fullname" . }}-{{ .Values.queue.name }} labels: {{- include "langsmith.labels" . | nindent 4 }} spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: {{ include "langsmith.fullname" . }}-{{ .Values.queue.name }} minReplicas: {{ .Values.queue.autoscaling.minReplicas }} maxReplicas: {{ .Values.queue.autoscaling.maxReplicas }} metrics: {{- if .Values.queue.autoscaling.targetCPUUtilizationPercentage }} - type: Resource resource: name: cpu target: type: Utilization averageUtilization: {{ .Values.queue.autoscaling.targetCPUUtilizationPercentage }} {{- end }} {{- if .Values.queue.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory target: type: Utilization averageUtilization: {{ .Values.queue.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} {{- end }}
0
public_repos/helm/charts/langsmith/templates
public_repos/helm/charts/langsmith/templates/backend/run-migrations.yaml
apiVersion: batch/v1 kind: Job metadata: name: {{ include "langsmith.fullname" . }}-{{ .Values.backend.name }}-migrations labels: {{- include "langsmith.labels" . | nindent 4 }} {{- with.Values.backend.migrations.labels }} {{- toYaml . | nindent 4 }} {{- end }} annotations: "helm.sh/hook": post-install, post-upgrade "helm.sh/hook-weight": "-1" {{- include "langsmith.annotations" . | nindent 4 }} {{- with.Values.backend.migrations.annotations }} {{- toYaml . | nindent 4 }} {{- end }} spec: backoffLimit: 3 template: metadata: {{- with .Values.backend.migrations.annotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- with.Values.backend.migrations.labels }} {{- toYaml . | nindent 8 }} {{- end }} {{- include "langsmith.labels" . | nindent 8 }} app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.backend.name }} spec: restartPolicy: Never {{- with .Values.images.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} securityContext: {{- toYaml .Values.backend.migrations.podSecurityContext | nindent 8 }} containers: - name: {{ .Values.backend.name }} command: ["/bin/bash", "-c", "alembic upgrade head"] env: {{- include "langsmith.commonEnv" . | nindent 12 }} image: "{{ .Values.images.backendImage.repository }}:{{ .Values.images.backendImage.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.images.backendImage.pullPolicy }} resources: {{- toYaml .Values.backend.migrations.resources | nindent 12 }} securityContext: {{- toYaml .Values.backend.migrations.securityContext | nindent 12 }} {{- with .Values.backend.migrations.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.backend.migrations.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.backend.migrations.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }}
0
public_repos/helm/charts/langsmith/templates
public_repos/helm/charts/langsmith/templates/backend/deployment.yaml
apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "langsmith.fullname" . }}-{{ .Values.backend.name }} labels: {{- include "langsmith.labels" . | nindent 4 }} {{- with.Values.backend.deployment.labels }} {{- toYaml . | nindent 4 }} {{- end }} annotations: {{- include "langsmith.annotations" . | nindent 4 }} {{- with.Values.backend.deployment.annotations }} {{- toYaml . | nindent 4 }} {{- end }} spec: {{- if not .Values.backend.autoscaling.enabled }} replicas: {{ .Values.backend.deployment.replicaCount }} {{- end }} selector: matchLabels: {{- include "langsmith.selectorLabels" . | nindent 6 }} app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.backend.name }} template: metadata: {{- with .Values.backend.deployment.annotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- with.Values.backend.deployment.labels }} {{- toYaml . | nindent 8 }} {{- end }} {{- include "langsmith.labels" . | nindent 8 }} app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.backend.name }} spec: {{- with .Values.images.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} securityContext: {{- toYaml .Values.backend.deployment.podSecurityContext | nindent 8 }} containers: - name: {{ .Values.backend.name }} env: {{- include "langsmith.commonEnv" . | nindent 12 }} - name: OPENAI_API_KEY valueFrom: secretKeyRef: name: {{ include "langsmith.secretsName" . }} key: openai_api_key - name: PORT value: {{ .Values.backend.containerPort | quote }} {{- with .Values.backend.deployment.extraEnv }} {{- toYaml . | nindent 12 }} {{- end }} image: "{{ .Values.images.backendImage.repository }}:{{ .Values.images.backendImage.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.images.backendImage.pullPolicy }} ports: - name: backend containerPort: {{ .Values.backend.containerPort }} protocol: TCP startupProbe: httpGet: path: /ok port: {{ .Values.backend.containerPort }} failureThreshold: 6 periodSeconds: 10 timeoutSeconds: 1 livenessProbe: httpGet: path: /ok port: {{ .Values.backend.containerPort }} failureThreshold: 6 periodSeconds: 10 timeoutSeconds: 1 readinessProbe: httpGet: path: /ok port: {{ .Values.backend.containerPort }} failureThreshold: 6 periodSeconds: 10 timeoutSeconds: 1 resources: {{- toYaml .Values.backend.deployment.resources | nindent 12 }} securityContext: {{- toYaml .Values.backend.deployment.securityContext | nindent 12 }} {{- with .Values.backend.deployment.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.backend.deployment.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.backend.deployment.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }}
0
public_repos/helm/charts/langsmith/templates
public_repos/helm/charts/langsmith/templates/backend/api-service.yaml
{{- if .Values.config.oauth.enabled }} apiVersion: v1 kind: Service metadata: name: {{ include "langsmith.fullname" . }}-{{ .Values.backend.name }}-api labels: {{- include "langsmith.labels" . | nindent 4 }} {{- with.Values.backend.service.labels }} {{- toYaml . | nindent 4 }} {{- end }} annotations: {{- include "langsmith.annotations" . | nindent 4 }} {{- with.Values.backend.service.annotations }} {{- toYaml . | nindent 4 }} {{- end }} spec: type: {{ .Values.backend.service.type }} ports: - name: backend port: {{ .Values.backend.service.port }} targetPort: backend protocol: TCP selector: {{- include "langsmith.selectorLabels" . | nindent 4 }} app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.backend.name }}-api {{- end }}
0
public_repos/helm/charts/langsmith/templates
public_repos/helm/charts/langsmith/templates/backend/service.yaml
apiVersion: v1 kind: Service metadata: name: {{ include "langsmith.fullname" . }}-{{ .Values.backend.name }} labels: {{- include "langsmith.labels" . | nindent 4 }} {{- with.Values.backend.service.labels }} {{- toYaml . | nindent 4 }} {{- end }} annotations: {{- include "langsmith.annotations" . | nindent 4 }} {{- with.Values.backend.service.annotations }} {{- toYaml . | nindent 4 }} {{- end }} spec: type: {{ .Values.backend.service.type }} ports: - name: backend port: {{ .Values.backend.service.port }} targetPort: backend protocol: TCP selector: {{- include "langsmith.selectorLabels" . | nindent 4 }} app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.backend.name }}
0
public_repos/helm/charts/langsmith/templates
public_repos/helm/charts/langsmith/templates/backend/api-deployment.yaml
{{- if .Values.config.oauth.enabled }} apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "langsmith.fullname" . }}-{{ .Values.backend.name }}-api labels: {{- include "langsmith.labels" . | nindent 4 }} {{- with.Values.backend.deployment.labels }} {{- toYaml . | nindent 4 }} {{- end }} annotations: {{- include "langsmith.annotations" . | nindent 4 }} {{- with.Values.backend.deployment.annotations }} {{- toYaml . | nindent 4 }} {{- end }} spec: {{- if not .Values.backend.autoscaling.enabled }} replicas: {{ .Values.backend.deployment.replicaCount }} {{- end }} selector: matchLabels: {{- include "langsmith.selectorLabels" . | nindent 6 }} app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.backend.name }}-api template: metadata: {{- with .Values.backend.deployment.annotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- with.Values.backend.deployment.labels }} {{- toYaml . | nindent 8 }} {{- end }} {{- include "langsmith.labels" . | nindent 8 }} app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.backend.name }}-api spec: {{- with .Values.images.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} securityContext: {{- toYaml .Values.backend.deployment.podSecurityContext | nindent 8 }} containers: - name: {{ .Values.backend.name }} env: {{- include "langsmith.commonEnv" . | nindent 12 }} - name: OPENAI_API_KEY valueFrom: secretKeyRef: name: {{ include "langsmith.secretsName" . }} key: openai_api_key - name: PORT value: {{ .Values.backend.containerPort | quote }} - name: AUTH_TYPE value: api_key {{- with .Values.backend.deployment.extraEnv }} {{- toYaml . | nindent 12 }} {{- end }} image: "{{ .Values.images.backendImage.repository }}:{{ .Values.images.backendImage.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.images.backendImage.pullPolicy }} ports: - name: backend containerPort: {{ .Values.backend.containerPort }} protocol: TCP startupProbe: httpGet: path: /ok port: {{ .Values.backend.containerPort }} failureThreshold: 6 periodSeconds: 10 timeoutSeconds: 1 livenessProbe: httpGet: path: /ok port: {{ .Values.backend.containerPort }} failureThreshold: 6 periodSeconds: 10 timeoutSeconds: 1 readinessProbe: httpGet: path: /ok port: {{ .Values.backend.containerPort }} failureThreshold: 6 periodSeconds: 10 timeoutSeconds: 1 resources: {{- toYaml .Values.backend.deployment.resources | nindent 12 }} securityContext: {{- toYaml .Values.backend.deployment.securityContext | nindent 12 }} {{- with .Values.backend.deployment.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.backend.deployment.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.backend.deployment.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} {{- end }}
0
public_repos/helm/charts/langsmith/templates
public_repos/helm/charts/langsmith/templates/backend/hpa.yaml
{{- if .Values.backend.autoscaling.enabled }} apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ include "langsmith.fullname" . }}-{{ .Values.backend.name }} labels: {{- include "langsmith.labels" . | nindent 4 }} spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: {{ include "langsmith.fullname" . }}-{{ .Values.backend.name }} minReplicas: {{ .Values.backend.autoscaling.minReplicas }} maxReplicas: {{ .Values.backend.autoscaling.maxReplicas }} metrics: {{- if .Values.backend.autoscaling.targetCPUUtilizationPercentage }} - type: Resource resource: name: cpu target: type: Utilization averageUtilization: {{ .Values.backend.autoscaling.targetCPUUtilizationPercentage }} {{- end }} {{- if .Values.backend.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory target: type: Utilization averageUtilization: {{ .Values.backend.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} {{- end }}
0
public_repos/helm/charts/langsmith/templates
public_repos/helm/charts/langsmith/templates/postgres/stateful-set.yaml
{{- if not .Values.postgres.external.enabled }} apiVersion: apps/v1 kind: StatefulSet metadata: name: {{ include "langsmith.fullname" . }}-{{ .Values.postgres.name }} labels: {{- include "langsmith.labels" . | nindent 4 }} {{- with.Values.postgres.statefulSet.labels }} {{- toYaml . | nindent 4 }} {{- end }} annotations: {{- include "langsmith.annotations" . | nindent 4 }} {{- with.Values.postgres.statefulSet.annotations }} {{- toYaml . | nindent 4 }} {{- end }} spec: serviceName: {{ include "langsmith.fullname" . }}-{{ .Values.postgres.name }} replicas: 1 selector: matchLabels: {{- include "langsmith.selectorLabels" . | nindent 6 }} app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.postgres.name }} template: metadata: {{- with .Values.postgres.statefulSet.annotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- with.Values.postgres.statefulSet.labels }} {{- toYaml . | nindent 8 }} {{- end }} {{- include "langsmith.labels" . | nindent 8 }} app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.postgres.name }} spec: {{- with .Values.images.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} securityContext: {{- toYaml .Values.postgres.statefulSet.podSecurityContext | nindent 8 }} containers: - name: {{ .Values.postgres.name }} args: - postgres - -c - log_min_messages=WARNING - -c - client_min_messages=WARNING env: - name: POSTGRES_DB value: postgres - name: POSTGRES_PASSWORD value: postgres - name: POSTGRES_USER value: postgres - name: PGDATA value: /var/lib/postgresql/data/postgres {{- with .Values.postgres.statefulSet.extraEnv }} {{- toYaml . | nindent 12 }} {{- end }} image: "{{ .Values.images.postgresImage.repository }}:{{ .Values.images.postgresImage.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.images.postgresImage.pullPolicy }} ports: - name: postgres containerPort: {{ .Values.postgres.containerPort }} protocol: TCP startupProbe: exec: command: - /bin/sh - -c - exec pg_isready -d postgres -U postgres failureThreshold: 6 periodSeconds: 10 timeoutSeconds: 1 readinessProbe: exec: command: - /bin/sh - -c - exec pg_isready -d postgres -U postgres failureThreshold: 6 periodSeconds: 10 timeoutSeconds: 1 livenessProbe: exec: command: - /bin/sh - -c - exec pg_isready -d postgres -U postgres failureThreshold: 6 periodSeconds: 10 timeoutSeconds: 1 resources: {{- toYaml .Values.postgres.statefulSet.resources | nindent 12 }} securityContext: {{- toYaml .Values.postgres.statefulSet.securityContext | nindent 12 }} volumeMounts: - mountPath: /var/lib/postgresql/data name: data subPath: postgres {{- with .Values.postgres.statefulSet.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.postgres.statefulSet.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.postgres.statefulSet.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} volumeClaimTemplates: - apiVersion: v1 kind: PersistentVolumeClaim metadata: name: data labels: {{- include "langsmith.labels" . | nindent 10 }} app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.postgres.name }} spec: accessModes: - ReadWriteOnce resources: requests: storage: {{ .Values.postgres.statefulSet.persistence.size }} {{- if .Values.postgres.statefulSet.persistence.storageClassName }} storageClassName: {{ .Values.postgres.statefulSet.persistence.storageClassName }} {{- end }} {{- end}}
0
public_repos/helm/charts/langsmith/templates
public_repos/helm/charts/langsmith/templates/postgres/service.yaml
{{- if not .Values.postgres.external.enabled }} apiVersion: v1 kind: Service metadata: name: {{ include "langsmith.fullname" . }}-{{ .Values.postgres.name }} labels: {{- include "langsmith.labels" . | nindent 4 }} {{- with.Values.postgres.service.labels }} {{- toYaml . | nindent 4 }} {{- end }} annotations: {{- include "langsmith.annotations" . | nindent 4 }} {{- with.Values.postgres.service.annotations }} {{- toYaml . | nindent 4 }} {{- end }} spec: type: {{ .Values.postgres.service.type }} ports: - name: postgres port: {{ .Values.postgres.service.port }} targetPort: postgres protocol: TCP selector: {{- include "langsmith.selectorLabels" . | nindent 4 }} app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.postgres.name }} {{- end }}
0
public_repos/helm/charts/langsmith/templates
public_repos/helm/charts/langsmith/templates/postgres/secrets.yaml
{{- if not .Values.postgres.external.existingSecretName }} apiVersion: v1 kind: Secret metadata: name: {{ include "langsmith.postgresSecretsName" .}} labels: {{- include "langsmith.labels" . | nindent 4 }} annotations: {{- include "langsmith.annotations" . | nindent 4 }} data: {{- if .Values.postgres.external.enabled }} {{- if .Values.postgres.external.connectionUrl }} connection_url: {{ .Values.postgres.external.connectionUrl | b64enc }} {{- else }} connection_url: {{ printf "%s:%s@%s:%s/%s" .Values.postgres.external.user .Values.postgres.external.password .Values.postgres.external.host (toString .Values.postgres.external.port) .Values.postgres.external.database | b64enc }} {{- end }} {{- else }} connection_url: {{ printf "postgres:postgres@%s-%s:%s/postgres" (include "langsmith.fullname" .) .Values.postgres.name (toString .Values.postgres.service.port) | b64enc }} {{- end}} {{- end }}
0
public_repos/helm/charts/langsmith/templates
public_repos/helm/charts/langsmith/templates/frontend/deployment.yaml
apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "langsmith.fullname" . }}-{{ .Values.frontend.name }} labels: {{- include "langsmith.labels" . | nindent 4 }} {{- with.Values.frontend.deployment.labels }} {{- toYaml . | nindent 4 }} {{- end }} annotations: {{- include "langsmith.annotations" . | nindent 4 }} {{- with.Values.frontend.deployment.annotations }} {{- toYaml . | nindent 4 }} {{- end }} spec: {{- if not .Values.frontend.autoscaling.enabled }} replicas: {{ .Values.frontend.deployment.replicaCount }} {{- end }} selector: matchLabels: {{- include "langsmith.selectorLabels" . | nindent 6 }} app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.frontend.name }} template: metadata: annotations: checksum/config: {{ include (print $.Template.BasePath "/frontend/configmap.yaml") . | sha256sum }} {{- with .Values.frontend.deployment.annotations }} {{- toYaml . | nindent 8 }} {{- end }} labels: {{- with.Values.frontend.deployment.labels }} {{- toYaml . | nindent 8 }} {{- end }} {{- include "langsmith.labels" . | nindent 8 }} app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.frontend.name }} spec: {{- with .Values.images.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} securityContext: {{- toYaml .Values.frontend.deployment.podSecurityContext | nindent 8 }} containers: - name: {{ .Values.frontend.name }} env: - name: VITE_BACKEND_AUTH_TYPE {{- if .Values.config.oauth.enabled }} value: "oauth" {{- else }} value: "none" {{- end }} - name: VITE_BACKEND_URL value: "" - name: VITE_HUB_WEB_URL value: "" - name: VITE_OAUTH_CLIENT_ID valueFrom: secretKeyRef: key: oauth_client_id name: {{ include "langsmith.secretsName" .}} - name: VITE_OAUTH_ISSUER_URL valueFrom: secretKeyRef: key: oauth_issuer_url name: {{ include "langsmith.secretsName" .}} {{- with .Values.frontend.deployment.extraEnv }} {{- toYaml . | nindent 12 }} {{- end }} image: "{{ .Values.images.frontendImage.repository }}:{{ .Values.images.frontendImage.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.images.frontendImage.pullPolicy }} ports: - name: frontend containerPort: {{ .Values.frontend.containerPort }} protocol: TCP startupProbe: httpGet: path: / port: {{ .Values.frontend.containerPort }} failureThreshold: 6 periodSeconds: 10 timeoutSeconds: 1 livenessProbe: httpGet: path: / port: {{ .Values.frontend.containerPort }} failureThreshold: 6 periodSeconds: 10 timeoutSeconds: 1 readinessProbe: httpGet: path: / port: {{ .Values.frontend.containerPort }} failureThreshold: 6 periodSeconds: 10 timeoutSeconds: 1 resources: {{- toYaml .Values.frontend.deployment.resources | nindent 12 }} securityContext: {{- toYaml .Values.frontend.deployment.securityContext | nindent 12 }} volumeMounts: - mountPath: /etc/nginx/conf.d/default.conf name: nginx-conf subPath: nginx.conf {{- with .Values.frontend.deployment.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.frontend.deployment.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.frontend.deployment.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} volumes: - name: nginx-conf configMap: name: {{ include "langsmith.fullname" . }}-{{ .Values.frontend.name }} items: - key: nginx.conf path: nginx.conf
0
public_repos/helm/charts/langsmith/templates
public_repos/helm/charts/langsmith/templates/frontend/service.yaml
apiVersion: v1 kind: Service metadata: name: {{ include "langsmith.fullname" . }}-{{ .Values.frontend.name }} labels: {{- include "langsmith.labels" . | nindent 4 }} {{- with.Values.frontend.service.labels }} {{- toYaml . | nindent 4 }} {{- end }} annotations: {{- include "langsmith.annotations" . | nindent 4 }} {{- with.Values.frontend.service.annotations }} {{- toYaml . | nindent 4 }} {{- end }} spec: type: {{ .Values.frontend.service.type }} ports: - name: http port: {{ .Values.frontend.service.httpPort }} targetPort: frontend protocol: TCP - name: https port: {{ .Values.frontend.service.httpsPort }} targetPort: frontend protocol: TCP selector: {{- include "langsmith.selectorLabels" . | nindent 4 }} app.kubernetes.io/name: {{ include "langsmith.fullname" . }}-{{ .Values.frontend.name }}
0
public_repos/helm/charts/langsmith/templates
public_repos/helm/charts/langsmith/templates/frontend/configmap.yaml
apiVersion: v1 kind: ConfigMap metadata: name: {{ include "langsmith.fullname" . }}-{{ .Values.frontend.name }} labels: {{- include "langsmith.labels" . | nindent 4 }} data: nginx.conf: | map $http_x_api_key $has_api_key { default ""; "" ""; {{- if .Values.config.oauth.enabled }} "~.*" "-api"; {{- end }} } server { listen {{ .Values.frontend.containerPort }}; server_name localhost; location / { root /usr/share/nginx/html; index index.html index.htm; try_files $uri $uri/ /index.html; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } location ~ /api/playground/ { rewrite /api/playground/(.*) /$1 break; chunked_transfer_encoding off; proxy_set_header Connection ''; proxy_http_version 1.1; proxy_buffering off; proxy_cache off; proxy_pass http://{{ include "langsmith.fullname" . }}-{{ .Values.playground.name }}:{{ .Values.playground.service.port }}; } location = /api/playground { rewrite /api/playground / break; chunked_transfer_encoding off; proxy_set_header Connection ''; proxy_http_version 1.1; proxy_buffering off; proxy_cache off; proxy_pass http://{{ include "langsmith.fullname" . }}-{{ .Values.playground.name }}:{{ .Values.playground.service.port }}; } # A dummy location. Resolve hub-backend hostname location = /hub-backend-dns { proxy_pass http://{{ include "langsmith.fullname" . }}-{{ .Values.hubBackend.name }}:{{ .Values.hubBackend.service.port }}; } {{- if .Values.config.oauth.enabled }} # A dummy location. Resolve hub-backend api hostname location = /api-hub-backend-dns { proxy_pass http://{{ include "langsmith.fullname" . }}-{{ .Values.hubBackend.name }}-api:{{ .Values.hubBackend.service.port }}; } {{- end }} # Hub Backend Routes location ~ /api-hub { rewrite /api-hub/(.*) /$1 break; chunked_transfer_encoding off; proxy_set_header Connection ''; proxy_http_version 1.1; proxy_buffering off; proxy_cache off; proxy_pass http://{{ include "langsmith.fullname" . }}-{{ .Values.hubBackend.name }}$has_api_key:{{ .Values.hubBackend.service.port }}; } # A dummy location. Resolve backend hostname location = /backend-dns { proxy_pass http://{{ include "langsmith.fullname" . }}-{{ .Values.backend.name }}:{{ .Values.backend.service.port }}; } {{- if .Values.config.oauth.enabled }} # A dummy location. Resolve backend-api hostname location = /api-backend-dns { proxy_pass http://{{ include "langsmith.fullname" . }}-{{ .Values.backend.name }}-api:{{ .Values.backend.service.port }}; } {{- end }} # Backend Routes location ~ /api { rewrite /api/(.*) /$1 break; chunked_transfer_encoding off; proxy_set_header Connection ''; proxy_http_version 1.1; proxy_buffering off; proxy_cache off; proxy_pass http://{{ include "langsmith.fullname" . }}-{{ .Values.backend.name }}$has_api_key:{{ .Values.backend.service.port }}; } }
0
public_repos/helm/charts/langsmith/templates
public_repos/helm/charts/langsmith/templates/frontend/hpa.yaml
{{- if .Values.frontend.autoscaling.enabled }} apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ include "langsmith.fullname" . }}-{{ .Values.frontend.name }} labels: {{- include "langsmith.labels" . | nindent 4 }} spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: {{ include "langsmith.fullname" . }}-{{ .Values.frontend.name }} minReplicas: {{ .Values.frontend.autoscaling.minReplicas }} maxReplicas: {{ .Values.frontend.autoscaling.maxReplicas }} metrics: {{- if .Values.frontend.autoscaling.targetCPUUtilizationPercentage }} - type: Resource resource: name: cpu target: type: Utilization averageUtilization: {{ .Values.frontend.autoscaling.targetCPUUtilizationPercentage }} {{- end }} {{- if .Values.frontend.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory target: type: Utilization averageUtilization: {{ .Values.frontend.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} {{- end }}
0