<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Python toolbox documentation from within pyt file in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-toolbox-documentation-from-within-pyt-file/m-p/54060#M4263</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Python toolboxes are a great way to create custom, GUI toolboxes for ArcGIS without actually interacting with the GUI (since everything can be defined within the pyt file). Regrettably (and incomprehensibly) documenting a python toolbox does require the GUI (&lt;A href="http://desktop.arcgis.com/en/arcmap/10.3/analyze/creating-tools/documenting-a-tool-in-a-python-toolbox.htm"&gt;Documenting a tool in a Python toolbox&lt;/A&gt;). I'd like to document my toolbox as I'm developing it, and since my toolbox is constantly changing during development, I'd like code and documentation to live in the same file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This help page also states:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;For Python toolboxes, the documentation for the toolbox and tools are stored in .xml files that are associated with the toolbox and tools by name.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Since Python supports writing xml, it shouldn't be too hard to add documentation&amp;nbsp;&lt;EM&gt;within&amp;nbsp;&lt;/EM&gt;the pyt file and dynamically create the xml file. After all, a partially complete xml file is created every time I change my python toolbox. I would imagine an approach similar to &lt;A href="http://www.sphinx-doc.org/en/master/"&gt;Sphinx&amp;nbsp;&lt;/A&gt;or &lt;A href="https://cran.r-project.org/web/packages/roxygen2/vignettes/roxygen2.html"&gt;roxygen2 for R&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This actually is already proposed as an &lt;A _jive_internal="true" href="https://community.esri.com/ideas/15248-document-python-toolboxes-pyt-in-source-code"&gt;ArcGIS Idea&lt;/A&gt;, &lt;A href="https://community.esri.com/migrated-users/45316"&gt;Kory Kramer&lt;/A&gt;&amp;nbsp;suggested asking here.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How would something like this be achieved? I've attached&amp;nbsp;the automatically generated, partially complete xml file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Apr 2019 15:35:40 GMT</pubDate>
    <dc:creator>NilsRatnaweera1</dc:creator>
    <dc:date>2019-04-02T15:35:40Z</dc:date>
    <item>
      <title>Python toolbox documentation from within pyt file</title>
      <link>https://community.esri.com/t5/python-questions/python-toolbox-documentation-from-within-pyt-file/m-p/54060#M4263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Python toolboxes are a great way to create custom, GUI toolboxes for ArcGIS without actually interacting with the GUI (since everything can be defined within the pyt file). Regrettably (and incomprehensibly) documenting a python toolbox does require the GUI (&lt;A href="http://desktop.arcgis.com/en/arcmap/10.3/analyze/creating-tools/documenting-a-tool-in-a-python-toolbox.htm"&gt;Documenting a tool in a Python toolbox&lt;/A&gt;). I'd like to document my toolbox as I'm developing it, and since my toolbox is constantly changing during development, I'd like code and documentation to live in the same file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This help page also states:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;For Python toolboxes, the documentation for the toolbox and tools are stored in .xml files that are associated with the toolbox and tools by name.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Since Python supports writing xml, it shouldn't be too hard to add documentation&amp;nbsp;&lt;EM&gt;within&amp;nbsp;&lt;/EM&gt;the pyt file and dynamically create the xml file. After all, a partially complete xml file is created every time I change my python toolbox. I would imagine an approach similar to &lt;A href="http://www.sphinx-doc.org/en/master/"&gt;Sphinx&amp;nbsp;&lt;/A&gt;or &lt;A href="https://cran.r-project.org/web/packages/roxygen2/vignettes/roxygen2.html"&gt;roxygen2 for R&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This actually is already proposed as an &lt;A _jive_internal="true" href="https://community.esri.com/ideas/15248-document-python-toolboxes-pyt-in-source-code"&gt;ArcGIS Idea&lt;/A&gt;, &lt;A href="https://community.esri.com/migrated-users/45316"&gt;Kory Kramer&lt;/A&gt;&amp;nbsp;suggested asking here.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How would something like this be achieved? I've attached&amp;nbsp;the automatically generated, partially complete xml file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Apr 2019 15:35:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-toolbox-documentation-from-within-pyt-file/m-p/54060#M4263</guid>
      <dc:creator>NilsRatnaweera1</dc:creator>
      <dc:date>2019-04-02T15:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: Python toolbox documentation from within pyt file</title>
      <link>https://community.esri.com/t5/python-questions/python-toolbox-documentation-from-within-pyt-file/m-p/54061#M4264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;I've actually been able to solve this some lines of python code. See my stackoverflow answer:&amp;nbsp;&lt;/SPAN&gt;&lt;A class="" href="https://gis.stackexchange.com/a/321470/40929" style="color: #2989c5; text-decoration: none;" title="https://gis.stackexchange.com/a/321470/40929"&gt;arcpy - Python toolbox documentation from within pyt file - Geographic Information Systems Stack Exchange&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2019 13:05:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-toolbox-documentation-from-within-pyt-file/m-p/54061#M4264</guid>
      <dc:creator>NilsRatnaweera1</dc:creator>
      <dc:date>2019-05-02T13:05:20Z</dc:date>
    </item>
  </channel>
</rss>

