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

Write description/ex of receive_match_attributes #1128

Merged
merged 3 commits into from
Sep 5, 2017

Conversation

drvinceknight
Copy link
Member

Note we only need to do this when the inputs from the match are used to
change some other variable.

Some other minor tweaks here:

  • Remove unneeded data file.
    This was checked in at some point but shouldn't have been.
  • Remove outdated documentation about repr.
    This is now done automatically by the parent class.
  • Make some minor stylistic changes.
    • PEP8 (column width)
    • Change to use class hyperlink instead of code syntax highlighting.

Note we only need to do this when the inputs from the match are used to
change some other variable.

Some other minor tweaks here:

- Remove unneeded data file.
  This was checked in at some point but shouldn't have been.
- Remove outdated documentation about repr.
  This is now done automatically by the parent class.
- Make some minor stylistic changes.
  - PEP8 (column width)
  - Change to use class hyperlink instead of code syntax highlighting.
the :code:`Random` strategy takes a parameter :code:`p` for how often it
cooperates, and the :code:`__repr__` method adds the value of this parameter to
the name::
Some strategies make specific use of the variables of a match to create their
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a bit more detail here. After:

+Some strategies make specific use of the variables of a match to create their
+own attributes.

Then:

In principle these attributes could change throughout a match or tournament if the match properties (like the game matrix) change, so we require that this logic live in the
the :code:receive_match_attributes method for correct dynamic updating. Here is how this is done for
+:class:Stalker <axelrod.strategies.stalker.Stalker>:

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! 👍

@drvinceknight drvinceknight force-pushed the document-receive-match-attributes branch from b626fa6 to 9ae4307 Compare September 4, 2017 17:50
@@ -24,7 +24,7 @@ script:
- cd docs; make html
# Run the test suit with coverage
- cd ..
- travis_wait 30 coverage run --source=axelrod -m unittest discover
- travis_wait 60 coverage run --source=axelrod -m unittest discover
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should work on decreasing the time it takes all the tests to run

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should work on decreasing the time it takes all the tests to run

That was mainly the purpose of the work I did on #1121.

There I reduced the test runs times on travis - where it's very long - from approx 40 mins to approx 20 mins. (Note that locally the full test suite takes about 10 mins on my small laptop - similar on appveyor.)

Just now it failed on a timeout which would have just been a random event. The 30 minute limit was arbitrary there's no reason not to increase it to 60. It hadn't timed out for a while since #1121 (before that it was essentially timing out every other run) but we'll keep an eye on it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was mainly the purpose of the work I did on #1121.

(Just in case you only read the title of that issue, the rest of the comments there detail the work I went through minimising test suite run time and why I did it there. 👍)

@meatballs meatballs merged commit e5f080f into master Sep 5, 2017
@meatballs meatballs deleted the document-receive-match-attributes branch September 5, 2017 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants