{ "info": { "author": "Eric W. Brown", "author_email": "UNKNOWN", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Environment :: Plugins", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "Natural Language :: English", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX", "Operating System :: Unix", "Programming Language :: Python", "Topic :: Software Development :: Documentation" ], "description": "doxypypy\n========\n\n*A more Pythonic version of doxypy, a Doxygen filter for Python.*\n\nIntent\n------\n\nFor now Doxygen_ has limited support for Python. It recognizes Python comments,\nbut otherwise treats the language as being more or less like Java. It doesn't\nunderstand basic Python syntax constructs like docstrings, keyword arguments,\ngenerators, nested functions, decorators, or lambda expressions. It likewise\ndoesn't understand conventional constructs like doctests or ZOPE-style\ninterfaces. It does however support inline filters that can be used to make\ninput source code a little more like what it's expecting.\n\nThe excellent doxypy_ makes it possible to embed Doxygen commands in Python\ndocstrings, and have those docstrings converted to Doxygen-recognized comments\non the fly per Doxygen's regular input filtering process. It however does not\naddress any of the other previously mentioned areas of difficulty.\n\nThis project started off as a fork of doxypy but quickly became quite distinct.\nIt shares little (if any) of the same code at this point (but maintains the\noriginal license just in case). It is meant to support all the same command\nline options as doxypy, but handle additional Python syntax beyond docstrings.\n\nAdditional Syntax Supported\n---------------------------\n\nPython can have functions and classes within both functions and classes.\nDoxygen best understands this concept via its notion of namespaces. This filter\nthus can supply Doxygen tags marking namespaces on every function and class.\nThis addresses the issue of Doxygen merging inner functions' documentation with\nthe documentation of the parent.\n\nPython class members whose names begin with a double-underscore are mangled\nand kept private by the language. Doxygen does not understand this natively\nyet, so this filter additionally provides Doxygen tags to label such variables\nas private.\n\nPython frequently embeds doctests within docstrings. This filter makes it\ntrivial to mark off such sections of the docstring so they get displayed as\ncode.\n\nZOPE-style interfaces overload class definitions to be interface definitions,\nuse embedded variable assignments to identify attributes, and use specific\nfunction calls to indicate interface adherence. Furthermore, they frequently\ndon't have any code beyond their docstrings, so naively removing docstrings\nwould result in broken Python. This filter has basic understanding of these\ninterfaces and treats them accordingly, supplying Doxygen tags as appropriate.\n\nFundamentally Python docstrings are meant for humans and not machines, and ought\nnot to have special mark-up beyond conventional structured text. This filter\nheuristically examines Python docstrings, and ones like the sample for complex\nin `PEP 257`_ or that generally follow the stricter `Google Python Style Guide`_\nwill get appropriate Doxygen tags automatically added.\n\nHow It Works\n------------\n\nThis project takes a radically different approach than doxypy. Rather than use\nregular expressions tied to a state machine to figure out syntax, Python's own\nAbstract Syntax Tree module is used to extract items of interest. If the\n`autobrief` option is enabled, docstrings are parsed via a set of regular\nexpressions and a producer / consumer pair of coroutines.\n\nExample\n-------\n\nThis filter will correctly process code like the following working (albeit\ncontrived) example:\n\n.. code-block:: python\n\n def myfunction(arg1, arg2, kwarg='whatever.'):\n \"\"\"\n Does nothing more than demonstrate syntax.\n\n This is an example of how a Pythonic human-readable docstring can\n get parsed by doxypypy and marked up with Doxygen commands as a\n regular input filter to Doxygen.\n\n Args:\n arg1: A positional argument.\n arg2: Another positional argument.\n\n Kwargs:\n kwarg: A keyword argument.\n\n Returns:\n A string holding the result.\n\n Raises:\n ZeroDivisionError, AssertionError, & ValueError.\n\n Examples:\n >>> myfunction(2, 3)\n '5 - 0, whatever.'\n >>> myfunction(5, 0, 'oops.')\n Traceback (most recent call last):\n ...\n ZeroDivisionError: integer division or modulo by zero\n >>> myfunction(4, 1, 'got it.')\n '5 - 4, got it.'\n >>> myfunction(23.5, 23, 'oh well.')\n Traceback (most recent call last):\n ...\n AssertionError\n >>> myfunction(5, 50, 'too big.')\n Traceback (most recent call last):\n ...\n ValueError\n \"\"\"\n assert isinstance(arg1, int)\n if arg2 > 23:\n raise ValueError\n return '{0} - {1}, {2}'.format(arg1 + arg2, arg1 / arg2, kwarg)\n\nThere are a few points to note:\n\n1. No special tags are used. Best practice human-readable section headers\nare enough.\n\n2. Some flexibility is allowed. Most common names for sections are accepted,\nand items and descriptions may be separated by either colons or dashes.\n\n3. The brief must be the first item and be no longer than one line.\n\n4. Everything thrown into an examples section will be treated as code, so it's\nthe perfect place for doctests.\n\nAdditional more comprehensive examples can be found in the test area.\n\nPreviewing doxypypy Output\n--------------------------\n\nAfter successful installation, doxypypy can be run from the command line to\npreview the filtered results with:\n\n.. code-block:: shell\n\n python -m doxypypy.doxypypy -a -c file.py\n\nTypically you'll want to redirect output to a file for viewing in a text editor:\n\n.. code-block:: shell\n\n python -m doxypypy.doxypypy -a -c file.py > file.py.out\n\nInvoking doxypypy from Doxygen\n------------------------------\n\nTo make Doxygen run your Python code through doxypypy, set the FILTER\\_PATTERNS\ntag in your Doxyfile as follows:\n\n.. code-block:: shell\n\n FILTER_PATTERNS = *.py=py_filter\n\n`py_filter` must be available in your path as a shell script (or Windows batch\nfile). If you wish to run `py_filter` in a particular directory you can include\nthe full or relative path.\n\nFor Unix-like operating systems, `py_filter` should like something like this:\n\n.. code-block:: shell\n\n #!/bin/bash\n python -m doxypypy.doxypypy -a -c $1\n\nIn Windows, the batch file should be named `py_filter.bat`, and need only\ncontain the one line:\n\n.. code-block:: shell\n\n python -m doxypypy.doxypypy -a -c %1\n\nRunning Doxygen as usual should now run all Python code through doxypypy. Be\nsure to carefully browse the Doxygen output the first time to make sure that\nDoxygen properly found and executed doxypypy.\n\n.. _Doxygen: http://www.stack.nl/~dimitri/doxygen/\n.. _doxypy: https://github.com/Feneric/doxypy\n.. _PEP 257: http://www.python.org/dev/peps/pep-0257/\n.. _Google Python Style Guide: http://google-styleguide.googlecode.com/svn/trunk/pyguide.html?showone=Comments#Comments", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Feneric/doxypypy", "keywords": "Doxygen filter Python documentation", "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "doxypypy", "package_url": "https://pypi.org/project/doxypypy/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/doxypypy/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/Feneric/doxypypy" }, "release_url": "https://pypi.org/project/doxypypy/0.8.8.6/", "requires_dist": null, "requires_python": null, "summary": "A Doxygen filter for Python", "version": "0.8.8.6" }, "last_serial": 1559492, "releases": { "0.8.7": [ { "comment_text": "", "digests": { "md5": "8fbce93cb8a2b2037fcf075d378ad72f", "sha256": "5e25f01b2e17f412ba02738f978d9b30b7aa80ca4ee2c4dd5cf7470b78f521b7" }, "downloads": -1, "filename": "doxypypy-0.8.7.tar.gz", "has_sig": false, "md5_digest": "8fbce93cb8a2b2037fcf075d378ad72f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26443, "upload_time": "2015-05-20T20:29:24", "url": "https://files.pythonhosted.org/packages/f1/87/09f89b5c5473382e7fd65301c555902fb7ad91deece4760b1b8928a32934/doxypypy-0.8.7.tar.gz" } ], "0.8.8": [], "0.8.8.5": [ { "comment_text": "", "digests": { "md5": "61b2eca2c2ce5222dfbbfbf9d7d23449", "sha256": "36766f22b87e470d2c5ae5347953ed8d0b80ba431c89e5cf664a98a339cf5d65" }, "downloads": -1, "filename": "doxypypy-0.8.8.5.tar.gz", "has_sig": false, "md5_digest": "61b2eca2c2ce5222dfbbfbf9d7d23449", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26997, "upload_time": "2015-05-21T19:48:44", "url": "https://files.pythonhosted.org/packages/46/ea/71be4dd6916f8161a9f0d7dfe0dc28064ad58216b5f2c887aea9e32f2c50/doxypypy-0.8.8.5.tar.gz" } ], "0.8.8.6": [ { "comment_text": "", "digests": { "md5": "6b3fe4eff5d459400071b626333fe15f", "sha256": "627571455c537eb91d6998d95b32efc3c53562b2dbadafcb17e49593e0dae01b" }, "downloads": -1, "filename": "doxypypy-0.8.8.6.tar.gz", "has_sig": false, "md5_digest": "6b3fe4eff5d459400071b626333fe15f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39019, "upload_time": "2015-05-23T14:41:35", "url": "https://files.pythonhosted.org/packages/8b/83/143fb6af67f59d8dd2d8f3d1725bf1d534ae53bb4d652194b6fb9bdfacf7/doxypypy-0.8.8.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6b3fe4eff5d459400071b626333fe15f", "sha256": "627571455c537eb91d6998d95b32efc3c53562b2dbadafcb17e49593e0dae01b" }, "downloads": -1, "filename": "doxypypy-0.8.8.6.tar.gz", "has_sig": false, "md5_digest": "6b3fe4eff5d459400071b626333fe15f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39019, "upload_time": "2015-05-23T14:41:35", "url": "https://files.pythonhosted.org/packages/8b/83/143fb6af67f59d8dd2d8f3d1725bf1d534ae53bb4d652194b6fb9bdfacf7/doxypypy-0.8.8.6.tar.gz" } ] }