-
Notifications
You must be signed in to change notification settings - Fork 72
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
Fix #673 - error catching bug #674
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 3 files reviewed, 2 unresolved discussions (waiting on @OlafSzmidt)
aimmo-game-worker/avatar_runner.py, line 12 at r1 (raw file):
self.avatar = avatar def process_avatar_turn(self, world_map, avatar_state):
Agree that this is the right way round.
aimmo-game-worker/tests/test_avatar_runner.py, line 10 at r1 (raw file):
def test_runner_does_not_crash_on_code_errors(self): class Avatar(object): def process_avatar_turn(self, world_map, avatar_state):
Should this not still be handle_turn
, as this is an Avatar
not an AvatarRunner
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 3 files reviewed, 3 unresolved discussions (waiting on @OlafSzmidt)
aimmo-game-worker/avatar_runner.py, line 17 at r1 (raw file):
from avatar import Avatar self.avatar = Avatar() return self.avatar.handle_turn(world_map, avatar_state)
was this switch made to reflect the dummy avatar code? maybe we also need to check our teaching materials too if you are changing this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 3 files at r1.
Reviewable status: 2 of 3 files reviewed, 3 unresolved discussions (waiting on @riaJha97 and @OlafSzmidt)
aimmo-game-worker/tests/test_avatar_runner.py, line 10 at r1 (raw file):
Previously, NiallEgan (Niall Egan) wrote…
Should this not still be
handle_turn
, as this is anAvatar
not anAvatarRunner
.
Yeah I agree, it should still be called handle_turn()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 2 of 3 files reviewed, 2 unresolved discussions (waiting on @riaJha97, @NiallEgan, and @OlafSzmidt)
aimmo-game-worker/avatar_runner.py, line 12 at r1 (raw file):
Previously, NiallEgan (Niall Egan) wrote…
Agree that this is the right way round.
Good! :)
aimmo-game-worker/avatar_runner.py, line 17 at r1 (raw file):
Previously, mrniket (Niket Shah) wrote…
was this switch made to reflect the dummy avatar code? maybe we also need to check our teaching materials too if you are changing this
Our dummy avatar code is:
def handle_turn(self, world_view, events):
Which is even worse
aimmo-game-worker/tests/test_avatar_runner.py, line 10 at r1 (raw file):
Previously, NiallEgan (Niall Egan) wrote…
Should this not still be
handle_turn
, as this is anAvatar
not anAvatarRunner
.
Ah, of course... Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 2 of 3 files reviewed, 2 unresolved discussions (waiting on @riaJha97, @NiallEgan, and @mrniket)
aimmo-game-worker/avatar_runner.py, line 17 at r1 (raw file):
Previously, OlafSzmidt (Olaf Szmidt) wrote…
Our dummy avatar code is:
def handle_turn(self, world_view, events):
Which is even worse
and the teaching materials?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 2 of 3 files reviewed, 2 unresolved discussions (waiting on @riaJha97, @NiallEgan, and @OlafSzmidt)
aimmo-game-worker/tests/test_avatar_runner.py, line 15 at r2 (raw file):
runner = AvatarRunner(Avatar()) action = runner.process_avatar_turn({}, {})
maybe an improvement on this is to include the names of the parameters. This might just be a personal preference though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 2 of 3 files reviewed, 2 unresolved discussions (waiting on @riaJha97, @NiallEgan, and @OlafSzmidt)
aimmo-game-worker/avatar_runner.py, line 17 at r1 (raw file):
Previously, mrniket (Niket Shah) wrote…
and the teaching materials?
Teaching materials are avatar_state, world_map
. But I'm still not convinced that's what our code is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r2.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @NiallEgan and @mrniket)
aimmo-game-worker/tests/test_avatar_runner.py, line 15 at r2 (raw file):
Previously, mrniket (Niket Shah) wrote…
maybe an improvement on this is to include the names of the parameters. This might just be a personal preference though
might make it more readable indeed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 2 of 3 files reviewed, 2 unresolved discussions (waiting on @CelineBoudier, @NiallEgan, and @mrniket)
aimmo-game-worker/tests/test_avatar_runner.py, line 15 at r2 (raw file):
Previously, CelineBoudier (Celine Boudier) wrote…
might make it more readable indeed
Done;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 2 of 3 files reviewed, 2 unresolved discussions (waiting on @CelineBoudier, @NiallEgan, and @mrniket)
aimmo-game-worker/avatar_runner.py, line 17 at r1 (raw file):
Previously, OlafSzmidt (Olaf Szmidt) wrote…
Teaching materials are
avatar_state, world_map
. But I'm still not convinced that's what our code is.
So if you switch these two around, we will have to change the teaching materials. If you don't, we change our example avatars' code. However, as you pointed out the example avatars code is already wrong so I would just change the example avatars' code and not this or the teaching materials
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r3.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @NiallEgan and @OlafSzmidt)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @NiallEgan and @mrniket)
aimmo-game-worker/avatar_runner.py, line 17 at r1 (raw file):
Previously, mrniket (Niket Shah) wrote…
So if you switch these two around, we will have to change the teaching materials. If you don't, we change our example avatars' code. However, as you pointed out the example avatars code is already wrong so I would just change the example avatars' code and not this or the teaching materials
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r3, 4 of 4 files at r4.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @NiallEgan and @mrniket)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @NiallEgan)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 3 files at r1, 1 of 1 files at r3, 4 of 4 files at r4.
Reviewable status:complete! all files reviewed, all discussions resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! all files reviewed, all discussions resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! all files reviewed, all discussions resolved
As described in #673. Does some changes to how we catch errors, refactors method names and (please check) flips method params around because I thought they were wrong.
This change is![Reviewable](https://camo.githubusercontent.com/23b05f5fb48215c989e92cc44cf6512512d083132bd3daf689867c8d9d386888/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)