documentation

How to add class-specific alias without generic alias using Roxygen2?

六月ゝ 毕业季﹏ 提交于 2019-11-30 22:32:30
问题 A simple example is that I have created an extension to show , which is a S4 base method. I don't want to cause a disambiguation fork by re-documenting show in my package, and I also want to consolidate the documentation of my extension to show in the documentation for the new class, myPkgSpClass , by adding an alias for show,myPkgSpClass-method . #' @export #' @aliases show,myPkgSpClass-method #' @rdname myPkgSpClass-class setMethod("show", "myPkgSpClass", function(object){ show(NA) }) The

How to document my method in Java like Java docs?

时光总嘲笑我的痴心妄想 提交于 2019-11-30 22:12:33
问题 I want that when i mouse over a method i would be able to see my documentation of what the method does like when i put the mouse over Java's method I know that /** */ is how its done but: How do you explain what the Params Stands for? How do you create a new line, or make a word bold or italic? 回答1: If you're using Eclipse as IDE, you just need to create a comment with /** and press enter and it will generate your code for your Javadoc, including parameters, return values, etc. You just need

Sphinx :ivar tag goes looking for cross-references

一世执手 提交于 2019-11-30 22:12:31
问题 I want to document Python object attributes with Sphinx. I understand I should use :ivar varname: description :ivar type varname: description However I'm seeing a weird behaviour, that is Sphinx searches my project for the variable name and tries to create symlinks. E.g. this code: class A(object): """ :ivar x: some description """ def __init__(self, x): self.x = x class B(object): def x(self): return 1 class C(object): def x(self): return 2 will cause this error: module1.py:docstring of

Documenting setter functions with roxygen

随声附和 提交于 2019-11-30 20:52:54
I have a function that does nothing more than ads a unique attr to any R object. Base demo: #' Setter function #' @param x an R object #' @param value a character value to set #' @export `foo<-` <- function(x, value){ attr(x, 'foo') <- value return(x) } This works like a charm except for generating a good Rd file, relevant part: \usage{ foo(var, value) <- value } And of course it triggers a warning while running R CMD check as it should be foo(var) <- value . Any hints would be really apprecieted! Update : thanks to richierocks it seems there is a fix You can use the roxygen tag @usage Here is

Conditional toctree in Sphinx

浪子不回头ぞ 提交于 2019-11-30 20:52:03
I want to do multiple versions of a documentation, which differ in the sections that are included. To achieve this I would usually use either the only directive or the ifconfig extension. However, I cannot use any of those in combination with the toctree directive. What I basically want is something like this: .. toctree:: :maxdepth: 2 intro strings datatypes numeric .. only:: university complex Is there a way to do that? As far as I know there is no way to do what you would like. I have been struggling with the same issue, see https://github.com/sphinx-doc/sphinx/issues/1717 . The reason is

Creating Documentation from VB Script Code [closed]

空扰寡人 提交于 2019-11-30 19:56:00
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . We have a large framework created using VB Script, which has been created and then maintained for the past few years. This code was initially well documented and all the initial functions and variables and files had good headers in them. Later in maintainence, the code got obfuscated by the coders not keeping

(Python-Sphinx) How to generate HTML Documentation?

笑着哭i 提交于 2019-11-30 19:55:51
问题 I'm working on a Python project using PyCharm and now I need to generate the corresponding API documentation. I'm documenting the code methods and classes using docstrings . I read about Sphinx and Doxygen, with Sphinx being the most recommended right now. I tried to configure Sphinx whitin PyCharm but I had no luck in getting it working. This is the project structure : and this was the I/O interaction with the command Sphinx Quickstart C:\Python\Python36\Scripts\sphinx-quickstart.exe Welcome

Is there a good way to produce documentation for swig interfaces?

你离开我真会死。 提交于 2019-11-30 18:51:10
I'd like to know if there are any good techniques for constructing/maintaining documentation on the interface. I'm building an interface from c++ code to python using swig; mostly I'm just %including the c++ header files. I'm dealing with at least dozens of classes and 100's of functions, so automated tools are preferred. Ideally, I'd like to use the doxygen formatted comments in the c++ headers to populate the docstrings in the python classes/methods. Alternately, generating separate documentation (in ascii, html...) would also be useful. It looks like this kind of functionality was supported

Best way to document “splatted” parameter with YARD? [closed]

感情迁移 提交于 2019-11-30 18:48:04
I have a method that should take 1+ parameters of any class, similar to Array#push : def my_push(*objects) raise ArgumentError, 'Needs 1+ arguments' if objects.empty? objects.each do |obj| puts "An object was pushed: #{obj.inspect}" @my_array.push obj end end What is the best way to document the method parameters using YARD syntax? Edit: I realize that my original question was a bit too vague and didn't quite specify what I was looking for. A better question would be, what is the best way to specify the arity of a method (1-∞ in this case) in YARD when using a splatted parameter? I know I

JavaDoc-like documentation for Objective-C in Xcode? [duplicate]

﹥>﹥吖頭↗ 提交于 2019-11-30 18:06:10
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: How to do the documentation in objective C? Is it possible to write class/method documentation in Objective-C in a way that Xcode 4 displays them in the quick help, and/or generates a doc document from it in the style of Apple's own documentation? 回答1: Displaying it live - not that I know of. But as for generating Apple like documentation, the best I have found is appledoc which I've been using for a year now.