documentation

show *only* docstring in Sphinx documentation

為{幸葍}努か 提交于 2019-12-02 18:51:20
Sphinx has a feature called automethod that extracts the documentation from a method's docstring and embeds that into the documentation. But it not only embeds the docstring, but also the method signature (name + arguments). How do I embed only the docstring (excluding the method signature)? ref: http://sphinx.pocoo.org/ext/autodoc.html I think what you're looking for is: from sphinx.ext import autodoc class DocsonlyMethodDocumenter(autodoc.MethodDocumenter): def format_args(self): return None autodoc.add_documenter(DocsonlyMethodDocumenter) per the current sources this should allow overriding

How “self-documenting” can code be without being annoying? [closed]

北慕城南 提交于 2019-12-02 18:49:46
I am not sure what the best practices are here, but I often see abbreviated variable names especially when the scope is small. So (to use simple Ruby examples) instead of def add_location(name, coordinates) , I see things like def add_loc(name, coord) —and I might even see something like def add_loc(n, x, y) . I imagine that longer names might tire a person out when they're accustomed to seeing abbreviations. Does verbosity help readability, or does it just hurt everyone's eyes?—Do people prefer abbreviations and shortened names over longer names? Personally, I would MUCH rather see longer

Whole site compilation of markdown/pandoc? [closed]

只愿长相守 提交于 2019-12-02 18:24:06
With Sphinx-doc , you can create a bunch of ReStructureText files, with an index.rst file which includes a table of contents macro that auto generates a table of contents from the other included files, and a conf.py that acts as a compilation config. You can then compile the lot into a single python-doc-style site, complete with index, navigation tools, and a search function. Is there any comparable tool for markdown (preferably pandoc-style markdown)? Some static site generators that work with Markdown : Jekyll is very popular and also the engine behind GitHub pages . Python variants: Hyde or

Creating html doc from postman collection [closed]

匆匆过客 提交于 2019-12-02 18:10:32
I've developed a pretty extense API, and I have it on Postman, which works pretty nice. Now I have to generate an html doc to keep it versioned inside /docs along with my sources. Is there a tool or a way to achieve this? I really don't want to write all this documentation. Sharing the postman collection is not an option. I recently had the same problem and I did not find anything. So I created a simple tool to do it. It is a very basic javascript application written with react.js. At the moment it is very basic, but I'm working on it, so any feature request is welcome. You can use it for free

how to generate api documentation [closed]

回眸只為那壹抹淺笑 提交于 2019-12-02 17:58:25
I need to write some api documentation for a REST API that I've created. Are there tools that will stub out a nice html output similar in style to the underscore api documentation? Or perhaps something that will output something as a twitter bootstrap styled html? I see that docco does annoated code, but I'm actually just looking to document the API only. Ideally I'd like to point a tool at the controller file and have it generate documentation about the methods and routes but not show any source code unless I specifically call out examples. apiDoc creates a documentation from API annotations

auto-document exceptions on methods in C#/.NET [closed]

你离开我真会死。 提交于 2019-12-02 17:58:15
I would like some tool, preferably one that plugs into VS 2008/2010, that will go through my methods and add XML comments about the possible exceptions they can throw. I don't want the <summary> or other XML tags to be generated for me because I'll fill those out myself, but it would be nice if even on private / protected methods I could see which exceptions could be thrown. Otherwise I find myself going through the methods and hovering on all the method calls within them to see the list of exceptions, then updating that method's <exception list to include those. Maybe a VS macro could do this

Linking to other packages in documentation in roxygen2 in R

给你一囗甜甜゛ 提交于 2019-12-02 17:49:56
I am wondering it there exists a method to link to function from other package when I'm trying to write a documentation for new package using roxygen2 . Something like \link{pck=PACKAGE_NAME, fun=FUNCTION_NAME} ? You have to type \link[pkg]{function} e.g. \link[stringi]{stri_c} In addition to the answer by potockan : Some packages document several functions in a single help page. For example, the trim function from Bioconductor package GenomicRanges is documented in intra-range-methods (which is also the name of a help page from other packages such as IRanges ). To link to the right page with

Using OpenGL with Python [closed]

妖精的绣舞 提交于 2019-12-02 17:37:21
So, I only know how to use Python, but I also know how to model in 3d. I've heard of OpenGL and I really want to learn how to use, because it seems very useful (I want to create simple games with it...). I found PyOpenGL, Python bindings for OpenGL, but I couldn't find any "real" documentation, so the only option is to study code examples and tutorials written in C++ or something. But, as I said, I only know how to use Python. What can I do about that? You should go on and read a OpenGL tutorial . Here's a pyopengl demo ; other samples are over here . Also, you can use pygame together with

How can I reference the value of a final static field in the class?

被刻印的时光 ゝ 提交于 2019-12-02 17:22:12
Using JavaDoc, how can I reference the value of a final static field in the class? I want the ??? in this example replaced by the value of the field STATIC_FIELD . /** * This is a simple class with only one static field with the value ???. */ public class Simple { /** * We can reference the value with {@value} here, * but how do we reference it in the class JavaDoc? */ public static final String STATIC_FIELD = "simple static field"; } Do you mean {@value #STATIC_FIELD} ? 来源: https://stackoverflow.com/questions/7868991/how-can-i-reference-the-value-of-a-final-static-field-in-the-class

Where can i find a good in depth guide to C# 3? [closed]

ε祈祈猫儿з 提交于 2019-12-02 17:11:42
It seems that C# 3 hit me without me even noticing, could you guys tell me about good in depth guides to C# 3? from lambda to linq to everything else that was introduced with the third version of the language. Printed books would be nice, but online guides would be even better! ScottGu has some great posts on C# 3: The C# ?? null coalescing operator (and using it with LINQ) LINQ to SQL: Part 8 (this is an 8 part series, check the top of the post for links to the first 7) Automatic Properties, Object Initializers, and Collection Initializers Extension Methods Lambda Expressions Query Syntax