I was wondering if it's possible with Doxygen to generate documentation for Python methods as well. For example, I have a Flask web app that runs solely on functions, all these functions contain docstrings that I want to be generated into a nice format (with Doxygen), however currently I can only get it to do so for classes.
Is this possible?
Related
I'm developing a static analyzer tool in Python that analyzes Python code for a given .py file and extract the body of classes, methods, etc in order to analyze code metrics (methods size, inheritance, and so on).
I identified the library "Inspect" that seems to suit me. However, I noticed that all the examples provided in the official documentation and external website only use this library by passing concrete instances of objects or functions that they want to analyze; however, I would like to analyze the source code without creating concrete instances of them, to avoid possible compiler errors due to missing library or other factors.
There is possible alternative methods or libraries that I can try to do it?
I have a project that needs to automatically generate a python class according to some configuration files using python.
During my searches, I became familiar with Jinja2 which seems to be very popular for generating web pages, but I couldn't really find a similar case which uses Jinja to generate some python codes using Jinja (I know that it is definitely possible to do it, just the lack of examples made me hesitated).
Is it make sense to use Jinja2 for my case or is there any easier solution for generating python from python?!
You can use jinja to generate any text. I use jinja myself to generate python and there is at least one previous stack overflow post.
I have Automation Repository coded in Python. Now i want to use some of the RobotFramework features like, html for logs and output, xml creation. Will it be possible to use somehow the Robot features in my existing testcases written in Python Unittest library without re-writing these. Please let me know, if its the wrong way to approach this
Yes #rjha,
You can use your testcases written in python. Generally in robot framework we will import the libraries which are written in Python. Using the same concept we can use your testcases which are written in Python.
Here I'm using RED Editor in Eclipse, according to my experience to use modules which are created should be imported to your red.xml file and each method name would be your keyword and when you completed running execution from testsuite file, log.html and report.html will be generated which you want for results generation.
For Better testcase execution results import "Logging" module where you can use log.info, log.warn etc., in your testcases which will be displayed in generated html reports
enter image description here
My program’s documentation is mainly written in Sphinx, but it also includes two custom HTML pages:
an example report produced by the program;
an extended reference on certain features of the program.
These two HTML files are produced by the program itself, not by Sphinx.
I want to host my docs on Read the Docs, and it would be very convenient for me to build and host the two custom pages, versioned, together with the Sphinx docs.
My program is already installed in the RtD build environment as I have the Install Project option enabled. And since the RtD docs mention writing your own builder, I gather it might be possible to invoke my program from there and have it dump the HTML content in a specific place.
So I really have two questions:
Is this an appropriate use of Read the Docs? I guess it’s not designed to host arbitrary Web pages — but then again, those files are not arbitrary, they are an important part of the docs.
How would I implement it? I’m having a hard time making sense of the RtD API: is this “builder” related in any way to Sphinx builders? how do I hook it up to RtD? perhaps there is an example somewhere?
I achieved the desired result using Sphinx’s html_extra_path feature:
A list of paths that contain extra files [...] They are copied to the output directory.
To generate these files, I haven’t found a better place than right in my conf.py, which seems a bit precarious, but works so far. Of course, Install your project inside a virtualenv needs to be enabled in Read the Docs advanced settings.
Now my custom notices.html and showcase.html are treated just like the .html pages produced by Sphinx itself, with versioning and redirects: http://httpolice.readthedocs.io/page/notices.html
The advantages of this approach include:
Consistent docstring syntax everywhere
Centralsied documentation server; find all your docs in one place
Search and jump-to-source from any documented function or class; in either language
Are there any modules integrating with Sphinx or similar; which generate+put your JavaScript and Python documentation in one place?
I am not sure if your question is about public documentation or in-house documentation of some of your projects.
For the former you want to see this: http://devdocs.io/
Also devdocs document scrapers are open source, so you should be able to use them for your own projects to build custom devdocs.io.