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

Update module 5: Testing your Code #88

Open
8 of 18 tasks
jemrobinson opened this issue Feb 16, 2022 · 1 comment
Open
8 of 18 tasks

Update module 5: Testing your Code #88

jemrobinson opened this issue Feb 16, 2022 · 1 comment

Comments

@jemrobinson
Copy link
Member

jemrobinson commented Feb 16, 2022

These changes will be coordinated by YOUR NAME HERE

General (applicable to every module)

  • Make each module independent of earlier ones (ie. do not rely on examples/specific code from earlier modules)
  • Ensure that each module has some small exercises (say 1x 5 min exercise per 45 mins or teaching); add a larger (optional) exercise per course for attendees to complete in their own time
  • Update to use more modern libraries and tools (eg. pandas/scipy/numba/poetry)
  • Add instructions to the notebooks that you should "Take 5 minutes to do this exercise"
  • Add estimated timing information at the top of each notebook
  • Switch to a colourblind-friendly colour scheme throughout
  • What do you wish people had told you about Python/coding in general?

Module 5: Testing your Code

  • The last exercise (DiffusionExample) is too hard and too long, and not particularly related to testing.
  • For the debugging section, there is not much in the notebook but we did a demo of the debugging capabilities in Jupyter lab.
  • Similarly for the Continuous Integration, there isn't much in the notebook, but we showed an example of a .travis.yml file and results page on travis-ci.com, and also did a live demo of a Github Action (checking for a README file) on a fork of the github-example repo that was created in the previous day's course.
  • 👍 for our inclusion of the GH Action example
  • No-one uses pdb on the commandline. We demo'd "here's how it could be done in pdb and here's how you probably would do it in an IDE", which I think was the right strategy.
    • definitely no-one runs pdb from inside a Jupyter notebook!
  • There is almost no real content in the CI notebook. The Memory and Profiling section doesn't really belong there and should be moved or removed.
    • Jack proposes moving this to programming for speed
  • The final notebook uses simulated annealing but doesn't say so. It is quite long so there is a reasonable probability that it will skipped on the day or need to be covered very quickly.
  • Replace all old py.test names with pytest
  • In the list of common testing frameworks: Make pytest the top of the list for Python, remove nose or replace it with nose2
  • check the frameworks and links for other languages are up to date
  • Remove all uses of nose in favour of pytest equivalents
@edwardchalstrey1
Copy link
Contributor

See also #131

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants