Skip to content
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

Add custom matches #1397

Merged
merged 22 commits into from
Oct 27, 2021
Merged

Add custom matches #1397

merged 22 commits into from
Oct 27, 2021

Conversation

drvinceknight
Copy link
Member

This is an extension of #1394.

In practice it adds very little to the source code: just makes it possible to pass a match class to the Moran Process.

I originally wanted to do the same with the tournament however the way we calculate results for the tournament is a bit more complex and with 5.0.0 in mind might need a bit more discussion.

So this PR is mainly documentation with a tutorial to show how to reproduce the Krapohl, S., Ocelík, V. & Walentek, D.M. The instability of globalization: applying evolutionary game theory to global trade cooperation. Public Choice 188, 31–51 (2021). https://doi.org/10.1007/s11127-020-00799-1
paper

@drvinceknight
Copy link
Member Author

I do not know why the rtds sphinx docs build is failing. Here's the end of the traceback:

  File "/home/docs/checkouts/readthedocs.org/user_builds/axelrod/envs/1397/lib/python3.7/site-packages/sphinx/domains/std.py", line 638, in note_labels
    n = node.traverse(addnodes.toctree)[0]
TypeError: 'generator' object is not subscriptable

Exception occurred:
  File "/home/docs/checkouts/readthedocs.org/user_builds/axelrod/envs/1397/lib/python3.7/site-packages/sphinx/domains/std.py", line 638, in note_labels
    n = node.traverse(addnodes.toctree)[0]
TypeError: 'generator' object is not subscriptable
The full traceback has been saved in /tmp/sphinx-err-b26hdrli.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!

@marcharper
Copy link
Member

Exception occurred:
  File "/home/docs/checkouts/readthedocs.org/user_builds/axelrod/envs/1397/lib/python3.7/site-packages/sphinx/domains/std.py", line 638, in note_labels
    n = node.traverse(addnodes.toctree)[0]
TypeError: 'generator' object is not subscriptable

If it's a generator it needs to be in a list context before the first element can be accessed. Maybe bumping some versions up will help?

@drvinceknight
Copy link
Member Author

Maybe bumping some versions up will help?

I'll try a few things 👍

I have also set the configuration on rtds to no longer point at this
empty file.
@drvinceknight
Copy link
Member Author

Someone found the fix, it's related to sphinx-doc/sphinx@13803a7 I have pinned docutils.

@meatballs meatballs merged commit ecc7104 into dev Oct 27, 2021
@meatballs meatballs deleted the add-custom-matches branch October 27, 2021 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants