Lab: One command for the shelf each morning
Module 11 · Lab · About 90 minutes · Needs: Modules 1 to 10, and the Module 10 lab (thebooknookfolder in your Drive, withtools.pyandtests/)
What you are building
Real projects outlive the tools they were written with. The Python Software Foundation's page "Sunsetting Python 2" (python.org, https://www.python.org/doc/sunset-python-2/) announced that Python 2 would get no more fixes after 1 January 2020. Code written for it had to be moved to Python 3, and the projects that moved most easily were the ones that were organised into modules and had tests to prove each change.
Booknook is now that kind of project. Amira's last request is "Give me one command each morning." This lab adds a command-line tool: a program you run by typing its name and a few words, with no notebook needed.
python -m booknook report
python -m booknook overdue
python -m booknook lend B16 M02
python -m booknook return L41Two new modules do the work, built only on the earlier ones: report.py writes the morning report, and __main__.py reads the command. A new test file checks every command, and a README.md tells Amira how to run it.
Open a new Colab notebook, call it module-11-lab.ipynb, and run each cell in order.