Before writing any code, revisit your function specifications from last week and revise them if needed. As you do this, think critically about what function inputs you expect from the user and what your function is supposed to do (e.g., return).
Write a unit test function for each specified function, which is named after the function being tested (e.g., if the function is named foo then the unit test function is named test_foo). The unit test function should test 3 to 5 edge cases to ensure that the function returns what is expected to the user. When writing your tests, build them around your function specifications and requirements.
After writing your unit tests, write the internal code for your Python functions.
Write function code and tests in close temporal proximity with each other. The process of writing function code and test cases will be iterative; there will be several rounds of writing tests → function improvement → writing more tests → function improvement → writing more tests → function improvement, etc.
Make sure that the tests cover all branches (e.g., if your function has an if statement, you should have tests where the if statement is true, and where the if statement is false.
As you develop your code and test cases, update your code documentation so that it makes sense with any of the changes you have made. Do not forget to also document your test functions.
Check whether the code passes the unit tests you have written using the pytest package.
[ ] Exception handling:
The function should be written defensively. That is, it should handle incorrect input and errors detected during execution via throwing exceptions with useful error messages, and there should be tests to confirm that the exceptions result in the expected behaviour of the function.
[ ] Planning and organizing your work:
Any ideas/notes that you generate that are related to your assigned function should be recorded in the corresponding issue you created in milestone 1. The issue should be closed by the end of milestone 2.
If you think of new ideas or test cases and you do not have time to implement them in this milestone, create an issue for them which you can complete during the next milestone.
Function:
explore_numeric_columns
[ ] Write test cases and code iteratively:
Before writing any code, revisit your function specifications from last week and revise them if needed. As you do this, think critically about what function inputs you expect from the user and what your function is supposed to do (e.g., return).
Write a unit test function for each specified function, which is named after the function being tested (e.g., if the function is named foo then the unit test function is named test_foo). The unit test function should test 3 to 5 edge cases to ensure that the function returns what is expected to the user. When writing your tests, build them around your function specifications and requirements.
After writing your unit tests, write the internal code for your Python functions.
Write function code and tests in close temporal proximity with each other. The process of writing function code and test cases will be iterative; there will be several rounds of writing tests → function improvement → writing more tests → function improvement → writing more tests → function improvement, etc.
Make sure that the tests cover all branches (e.g., if your function has an if statement, you should have tests where the if statement is true, and where the if statement is false.
As you develop your code and test cases, update your code documentation so that it makes sense with any of the changes you have made. Do not forget to also document your test functions.
Check whether the code passes the unit tests you have written using the pytest package.
[ ] Exception handling:
The function should be written defensively. That is, it should handle incorrect input and errors detected during execution via throwing exceptions with useful error messages, and there should be tests to confirm that the exceptions result in the expected behaviour of the function.
[ ] Planning and organizing your work:
Any ideas/notes that you generate that are related to your assigned function should be recorded in the corresponding issue you created in milestone 1. The issue should be closed by the end of milestone 2.
If you think of new ideas or test cases and you do not have time to implement them in this milestone, create an issue for them which you can complete during the next milestone.