Add Typer CLI App code#217
Conversation
martin-martin
left a comment
There was a problem hiding this comment.
Hi @lpozo thanks for moving your code to the materials repo. There are a couple of leftover inconsistencies resulting from the recent changes based on the previous TR round, e.g. in Step 7 you didn't yet update the list-all command to list:
(venv) ➜ source_code_step_7 git:(typer-cli-python) ✗ python -m rptodo list
Usage: rptodo [OPTIONS] COMMAND [ARGS]...
Try 'rptodo --help' for help.
Error: No such command 'list'.
(venv) ➜ source_code_step_7 git:(typer-cli-python) ✗ python -m rptodo --help
Usage: rptodo [OPTIONS] COMMAND [ARGS]...
Options:
-v, --version Show the application's version and exit.
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or
customize the installation.
--help Show this message and exit.
Commands:
add Add a new to-do with a DESCRIPTION.
clear Remove all to-dos.
complete Complete a to-do by setting it as done using its TODO_ID.
init Initialize the to-do database.
list-all List all to-dos.
remove Remove a to-do using its TODO_ID.
And there is an issue with the tests as well related to a difference between "get" and "buy" milk 🥛 .
Please double-check each step and make sure that both the code as well as the tests work as expected in the updated tutorial.
requirements.txt File
I was also wondering what might be the best way to mention the Requirements file. You never created a requirements.txt file in the tutorial, but you're including it in the final source code. However, it's not present in any of the other source code folders.
Since you're already including a lot of empty files in all of the source code folders, which I don't find ideal, but makes sense when following your SbSP where you set up the structure at the beginning, you might want to create a requirements.txt file right after installing the dependencies. Then you could add it to the relevant folders.
Also note the comment about poetry in your requirements.txt file.
Where to put new files:
my-awesome-articleHow to merge your changes: