UCL / rsd-engineeringcourse

Course materials for Research Software Engineering course.
http://github-pages.ucl.ac.uk/rsd-engineeringcourse/
Other
108 stars 97 forks source link

Exercise: Refactoring The Bad Boids #109

Closed mattagape closed 5 years ago

mattagape commented 5 years ago
  1. Bad_Boids - Why is the traceback shown?

  2. Bad_Boids - should we declare a bird package? In the Regression Test section following this it uses before=deepcopy(boids.boids) - why do we need boids.boids rather than just boids?

  3. What exactly are we storing in the regression test yaml?

  4. The link under "Start Refactoring" is broken.

ageorgou commented 5 years ago
  1. The main code doesn't run because of a problem in animate, probably from switching to Python 3. We can change the last line from scatter.set_offsets(zip(boids[0],boids[1])) to scatter.set_offsets(list(zip(boids[0],boids[1]))) (explicitly create a list from zipping the boids[0] and boids[1]).

  2. The test in the GH repository is slightly different to the one on the page.

  3. The test uses nose whereas we've only used pytest in the course.

dpshelio commented 5 years ago
  1. should be fixed now... and a graph added for the notebook and page.
  2. They are not running cells, and everything works using the repository where that's shown. We need boids.boids because the file that we are loading is called boids, and from there we are using the variable boids.
  3. That a single step changes from one position to the next. So it stores all the positions and velocities before and after running. See the content of fixture.yml
  4. fixed

@ageorgou

  1. thanks
  2. Updated
  3. I'm not changing that as pytest run it fine. And it's good they are exposed to it.