2020-05-25-online

Day 6 questions and feedback

Left-over questions from day 5

Icebreaker: What from CodeRefinery are you going to use in the near future?

Automated testing

https://coderefinery.github.io/testing/

Motivation

https://coderefinery.github.io/testing/01-motivation/

Exercise

https://coderefinery.github.io/testing/03-pytest/

Question about the exercise: I understand how a simple test in a small code can be implemented, but we work with very large codes (hundred thousand lines) and just to compile this already takes time on an HPC (then any run takes also time). What sort of test can be made in this case?

pytest example.py


- Is the name `pre-commit` important to the functionality? If so, what other names exists?
  - Yes the names are important and for other samples have a look in `.git/hooks`, also see: https://coderefinery.github.io/git-collaborative/05-hooks/

- How do we locate (which line) errors in big code chunks ?
  - If you have a "trace" like the one below, then I typically read it from the end up. So first question: when you experience an error, do you see a "traceback" like the one below?

- Within conda with pytest installed:

$ pytest -v example.py Traceback (most recent call last): … File “/usr/lib/python2.7/dist-packages/pytest.py”, line 13, in from _pytest.fixtures import fixture, yield_fixture File "/usr/lib/python2.7/dist-packages/_pytest/fixtures.py", line 842, in class FixtureFunctionMarker(object): File "/usr/lib/python2.7/dist-packages/_pytest/fixtures.py", line 844, in FixtureFunctionMarker params = attr.ib(convert=attr.converters.optional(tuple)) TypeError: attrib() got an unexpected keyword argument 'convert' ```

Exercise: full-cycle collaborative workflow

https://coderefinery.github.io/testing/05-gh-actions/

Modular code development session

We will follow https://github.com/coderefinery/modular-type-along

Questions to the audience

What does “modular code development” mean for you?

What best practices can you recommend to arrive at well structured, modular code in your favourite programming language?

What do you know now that you wish somebody told you earlier?

Do you design a new code project on paper before coding? Discuss pros and cons.

Do you build your code top-down or bottom-up? Discuss pros and cons.

Would you prefer your code to be 2x slower if it was easier to read it?

Comments during live-demo

Feedback

One good thing and one thing to be improved. Focus on how to improve.

About our material

About the day-to-day mechanics (registration, breakout rooms, helping)

From learners

From helpers

From people watching the stream

From instructors and CR staff

Other topics/workshops/lessons you are interested in

Can you join us in CarpentryCon2020@home?