Hey Peleg, Here is what I think is going on, the @doc_index is modifying the method degeneracy, i.e., it creates a new method with the same name of "degeneracy" and has a link back to the actual method. Then the new degeneracy also gets assigned to the name linkage. Now when the documentation is built, both of the modified functions link to the same actual method, which gets put into the doc twice, and it is the last one (in this case, linkage) that remains.
So I would say this is a bug in @doc_index decorator, and you will need to go into that code and give it the ability to handle proper aliases. Best, Travis On Wednesday, December 7, 2016 at 8:59:33 AM UTC-6, Peleg Michaeli wrote: > > I have an ongoing problem with understanding how I should treat aliases in > Sage. > > I have implemented a new method for Graph, named *degeneracy*. Another > term which is sometimes used to describe degeneracy is *linkage*. So I > have something like: > > @doc_index("Degeneracy") > def degeneracy(self): > r""" > ... > """ > return ... > > linkage = degeneracy > > I have tried something similar while implementing a couple of > isoperimetric numbers of graphs (see > https://trac.sagemath.org/ticket/21942). > > However, after building the docs I see in > doc/sage/html/en/reference/graphs/sage/graphs/graph.html, under the heading > Degeneracy, two methods: cores() (which was there, I have just modified its > doc_index) and linkage(). No degeneracy(). I would be the best to have > there degeneracy() only, but perhaps even having both is acceptable; but > not only linkage() (which is just an alias, in my opinion it is a much less > common term, at least in the community of graph theorists). > > Have I done anything wrong here? > > > Thanks, > Peleg. > > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.