UCL / rsd-engineeringcourse

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

Energy classroom exercise #85

Open mattagape opened 6 years ago

mattagape commented 6 years ago
  1. likelyhood should be likelihood

  2. The text says "Given a vector n of positive integers, and of arbitrary length" <-- what do these integers represent? Number of particles at each position (vector index)? (we have to look at the code to see what he means)

  3. The starting point is given as: def energy(density, coeff=1.0): But I don't think coefficient is used anywhere. It isn't defined properly either. It made me look ahead to the solution to see what it was used for (it wasn't).

  4. Not sure what the point of def test_derivative(): is. I understand d(n^2-1)/dn = 2n but why are we doing this at all?

  5. Test coverage. When I ran it I got:

    
    eduroam-int-dhcp-97-231-100:diffusion matthewgillman$ py.test --cov
    ================================================= test session starts =================================================
    platform darwin -- Python 3.6.5, pytest-3.5.1, py-1.5.3, pluggy-0.6.0
    rootdir: /Users/matthewgillman/Desktop/MPHYG001/rsd-engineeringcourse/diffusion, inifile:
    plugins: remotedata-0.2.1, openfiles-0.3.0, doctestplus-0.1.3, cov-2.5.1, arraydiff-0.2
    collected 6 items                                                                                                     

test_model.py ...... [100%]

---------- coverage: platform darwin, python 3.6.5-final-0 ----------- Name Stmts Miss Cover

init.py 0 0 100% model.py 10 0 100% test_model.py 32 0 100%

TOTAL 42 0 100%

============================================== 6 passed in 0.03 seconds ===============================================



I didn't get all the extra output in the notes.
ageorgou commented 6 years ago
dpshelio commented 6 years ago