UCL-ARC / shortlister

0 stars 0 forks source link

Start the program, accepting a command-line argument for the role directory #3

Closed tamuri closed 1 month ago

tamuri commented 1 month ago

I would like to start the program on the command-line like this:

python main.py path/to/test_role

This will allow the program to work with several different roles.

The Python argparse module will be useful to handle the arguments.

shiyingwucl commented 1 month ago

I've updated main.py to handle parsing in role directory as argument when running the file, parsing in an empty directory will result in FileNotFoundError, so maybe exception handling could be something to implement in the future?

tamuri commented 1 month ago

Yes, that's fine. You could check if the directory doesn't exist and print a nice message before using the argument.