The GSoc’18 Coding period begins!
As planned for the Week 1, the CLI parsing of the modtool has been moved from Argparse to Click on the forked repository’s modtool branch. Moreover, I have also read about the existing plug-in architectures with Click and discussed the same with the mentors.
Click is based on decorators and uses the concept of groups (a type of Multicommand) and commands for the CLI parsing wherein several commands can be registered to a group and both groups and commands can have their specific options (optional) and arguments (generally mandatory, can be made optional).
Currently, no option (or argument) has been registered to the base group because of two main reasons:-
- Click does not possess the magical behavior to differentiate whether an option belongs to a group or a command. So, if we register options to the base group, the command will be gr_modtool –skip-lib -t general instead of gr_modtool add -t general –skip-lib.
- Some command may not require options like ‘skip-lib’ like gr_modtool info.
But to reduce the redundancy the options common to most of the commands have been registered to the commands as common_params.
In the initial phase of the week, I also faced difficulty in building the ‘python3’ branch of GNU Radio due to multiple installations of log4cpp (most probably) which was rectified with the able guidance of the mentors.
I also found an issue with str.translate(), the pull request has been sent.
Tasks for Week 2
- Bug fixes of the Click CLI, if any.
- Write the current modtool scripts as a plug-in architecture.
- Start working for external plug-ins.
- Bug fixes of the python3 branch, if any.
Link to the link to the updated Github project.