ACCESS-NRI / amami

Apache License 2.0
0 stars 0 forks source link

Unit testing exercise - um2nc callback_function() #45

Open truth-quark opened 2 weeks ago

truth-quark commented 2 weeks ago

As an initial unit testing exercise, let's start with a standalone function with only inputs/outputs. The um2nc callback_function() is a good one to try: https://github.com/ACCESS-NRI/amami/blob/main/amami/parsers/um2nc_parser.py#L33-L74

Let's split this into parts, so reviews/feedback can be staged between task blocks.

Bonus questions for reviews:

Part 1 Tasks - Initial unit testing (retrofitting style):

Can check & review here.

Part 2 Tasks - More unit testing for coverage:

Check & review here too.

Part 3 Tasks - Unit testing supporting refactoring:

Final wrap up