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

Correcting instructions for adding strategy to library. #627

Merged
merged 2 commits into from
Jun 10, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions docs/tutorials/contributing/strategy/adding_the_new_strategy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,16 @@ in the :code:`axelrod/strategies/_strategies.py` file.

If you have added your strategy to a file that already existed (perhaps you
added a new variant of :code:`titfortat` to the :code:`titfortat.py` file),
add a line similar to::
simply add your strategy to the list of strategies already imported from
`<file_name>.py`::

from <file_name> import *
from <file_name> import <list-of-strategies>

Where :code:`file_name.py` is the name of the file you created. So for the
:code:`TitForTat` strategy which is written in the :code:`titfortat.py` file we
have::
If you have added your strategy to a new file then simply add a line similar to
above with your new strategy.

from titfortat import *

Once you have done that (**and you need to do this even if you have added a
strategy to an already existing file**), you need to add the class itself to
the :code:`strategies` list.
Once you have done that, you need to add the class itself to the
:code:`strategies` list (in `axelrod/strategies/_strategies.py`).

Finally, if you have created a new module (a new :code:`<strategy.py>` file)
please add it to the `docs/references/all_strategies.rst` file so that it will
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/contributing/strategy/running_tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Each can be run individually::
Furthermore the documentation is also doctested, to run those tests you can run
the script::

$ sh doctest
$ python doctests.py

Note that this project is being taken care off by `travis-ci
<https://travis-ci.org/>`_, so all tests will be run automatically when opening
Expand Down