Commit 7cbe2d7
authored
Write a new documentation page with branch info (#1367)
* Write a new documentation page with branch info
This is related to #1352.
Once this PR is merged we should:
- Change github default branch to `dev`
- Delete `master`
- Confirm that read the docs is looking at `release`
Am I missing anything?
We should also remove the release process information from the wiki
(assuming we're happy with what I've written here).
Finally, once #1360 is done we should make sure we update the docs with
the relevant information.
* Remove ambiguous `very`.
* Remove hypothesis version specification in docs.
This is actually no longer correct since #1288
* Test properties not affected by floating point error
This build found a particular failing example of
`TestTournament.test_seeding_equality` https://github.com/Axelrod-Python/Axelrod/pull/1368/checks?check_run_id=975415322
Upon closer investigation it looks like that was not due to seeding but
due to the floating point error of some calculations made by the result
set.
I investigated using:
```
import axelrod as axl
import numpy as np
seed = 2
repetitions = 10
rng = axl.RandomGenerator(seed=seed)
players = [axl.Random(rng.random()) for _ in range(8)]
tournament1 = axl.Tournament(
players=players,
turns=10,
repetitions=repetitions,
seed=seed
)
tournament2 = axl.Tournament(
players=players,
turns=10,
repetitions=repetitions,
seed=seed
)
for _ in range(4):
results1 = tournament1.play(processes=2, progress_bar=False)
results2 = tournament2.play(processes=2, progress_bar=False)
assert results1.wins == results2.wins
assert results1.match_lengths == results2.match_lengths
assert results1.scores == results2.scores
assert np.allclose(results1.normalised_scores, results2.normalised_scores)
assert np.allclose(results1.ranking, results2.ranking)
assert results1.ranked_names == results2.ranked_names
assert results1.payoffs == results2.payoffs
assert results1.payoff_matrix == results2.payoff_matrix
assert np.allclose(results1.payoff_stddevs, results2.payoff_stddevs)
assert results1.score_diffs == results2.score_diffs
assert results1.payoff_diffs_means == results2.payoff_diffs_means
assert results1.cooperation == results2.cooperation
assert results1.normalised_cooperation == results2.normalised_cooperation
assert results1.vengeful_cooperation == results2.vengeful_cooperation
assert results1.cooperating_rating == results2.cooperating_rating
assert results1.good_partner_matrix == results2.good_partner_matrix
assert results1.good_partner_rating == results2.good_partner_rating
assert np.allclose(results1.eigenmoses_rating, results2.eigenmoses_rating)
assert np.allclose(results1.eigenjesus_rating, results2.eigenjesus_rating)
```
Note I'm using `np.isclose` for some properties.
In this commit:
- I add the specific seed for which the error was found as a hypothesis
example (`seed=2`).
- Replace the `results1 == results2` check with just a check of some
properties (from which the others are essentially calculated).
- Added `progress_bar=False`
* Add instructions for using venv.
* s/requirements/requirements.txt
* Spell requirements correctly..1 parent c0d7752 commit 7cbe2d7
File tree
5 files changed
+53
-18
lines changed- axelrod/tests/unit
- docs/tutorials/contributing
5 files changed
+53
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
750 | 750 | | |
751 | 751 | | |
752 | 752 | | |
| 753 | + | |
753 | 754 | | |
754 | 755 | | |
755 | 756 | | |
756 | 757 | | |
757 | 758 | | |
758 | 759 | | |
759 | | - | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
760 | 766 | | |
761 | 767 | | |
762 | 768 | | |
| |||
776 | 782 | | |
777 | 783 | | |
778 | 784 | | |
779 | | - | |
780 | | - | |
781 | | - | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
782 | 791 | | |
783 | 792 | | |
784 | 793 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | 7 | | |
12 | 8 | | |
13 | 9 | | |
| |||
73 | 69 | | |
74 | 70 | | |
75 | 71 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
Lines changed: 38 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
0 commit comments