On 13 June 2014 12:21, Nathann Cohen <nathann.co...@gmail.com> wrote:
> I cheated in all cases : > > For the optinal LP solvers I don't mind as there is a standard LP > solver that exposes the features : > > http://www.sagemath.org/doc/reference/numerical/index.html > > For the C libraries solving specfic graph problem there is in every > case a method of the Graph class (which appears in the doc). And it > either raises an exception when it is called, saying that the package > should be installed, or solves the problem in a different way. > > Whatever you do, add pieces of doc everywhere pointing toward the > absent features and explaining how to install them. > Cool, will keep this in mind. > > Nothing better. I would like a way to have the doc appear even in all > functions raise an exception, but I don't. If you actually need to > inherit from external code, I'm not very optimistic :-/ > We've actually just thought of a completely different approach that we _might_ or _might not_ go with. There are advantages (which include not having to deal with this problem at all) and disadvantages that we need to carefully consider (if it's of interest the idea is here: https://github.com/theref/sage-game-theory/issues/48). With regards to the optional compilation, I might have expressed myself poorly. We've found another solution. Would adding the following to all.py in our game_theory folder be 'acceptable' with regards to general Sage etiquette etc: from sage.misc.package import is_package_installed from cooperative_game import CooperativeGame if is_package_installed('gambit'): from normal_form_game import * normal_form_game.py is the module that imports and inherits from gambit. Thanks, Vince -- Dr Vincent Knight Cardiff School of Mathematics Senghennydd Road, Cardiff CF24 4AG (+44) 29 2087 5548 www.vincent-knight.com +Vincent Knight @drvinceknight Skype: drvinceknight -- 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 http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.