-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dictionary mapping player names to classes #479
Comments
You mentioned this in #683. I wonder if encouraging/adding a 'common names' section to the doc strings would be better? It can then be found by searching the strategy index page? Just a thought as I thought about this for a bit and wasn't sure how we'd be able to build the dictionary in a way that we'd be sure to not forget to add to it... (Would still be an improvement). |
I'm not sure either -- common names in the docstrings is fine. I'd like there to be a table in the docs that lists each strategy, the common names, and references for each. Then in the contributing docs, we'd have a warning and link to that page. This is a good problem to have -- the library has really grown! |
Yeah for sure: a good problem :) By a table you mean something more compact than http://axelrod.readthedocs.io/en/latest/reference/all strategies.html? We could write a Python script that writes that table to rst. We tried before but it's not possible to get read the docs to run that script but we could either just make sure people do it or possibly get Travis to do it and push a commit (maybe to open a PR?)... |
I like that idea. Maybe we can get sphinx to or modify |
Yeah sounds good. FWIW, Ctrl-f would work on the current strategy index On Tue, 9 Aug 2016, 00:50 Marc Harper, [email protected] wrote:
|
For now, sure. I guess I do have a slightly stronger opinion then about how the page looks. For strategies, something like:
For references, another table of the form We could also identify unimplemented and/or desired strategies as listed in #379. |
So I'm not 100% sure I see what you mean (but I think I do). If we're going to use the sphinx autodoc feature for this (which is what we are currently doing) then whatever we have must be in the docstrings of the class. So we we wouldn't be able to have a single big table (or two) with all that information in it. This is all automated by sphinx and as far as I know not 'hackable' (we tried a while back: the best we could do is write a script that wrote the rst file, which we had to remember to run). How about this: we add to the contribution documentation a 'strict' rst format for the docstrings of strategies and make sure all new strategies follow this (and eventually fix the old ones). So for example for Grudger we would have:
then (I think) it is possible for sphinx to use those references and have them as a single bibliography. This would also be a nice thing to have as it's own page:
|
Here are some screenshots showing how this looks: The bibliography: It lives in the reference section: Here's how the citations appear (just written in to the docstrings). Have put this on the 479 branch with a1dc343 it's pretty simple to implement and I do like the bibliography.rst. There I've just lazily copied the citations but that could have more details if we wanted it. (The references in bibliography.rst can be used anywhere in the documentation.) (My suggestion of using the header rst format doesn't work as Sphinx doesn't want a header in the docstring for the autodoc to work.) |
You're the docs master @drvinceknight so I'll defer to your best judgment on how to proceed. |
Ok so my suggestion would be:
Then the next step is to work through #225 which would be a big chunk of work :) I think I'd actually enjoy working through that slowly once I'm done with #675, but by all means if someone else wanted to pick that up that would be fine by me. |
On #474 @marcharper wrote:
The text was updated successfully, but these errors were encountered: