The awesome week with lots of learning experience.
As planned for the Week 2, gr_modtool’s CLI has been re-written as a plug-in architecture. Now the
cli() function of
modtool_base.py is called whenever
gr_modtool is referenced on the command line. If no further command is mentioned, it shows the help page with available modtool commands. If a command is also given like
gr_modtool add, the
cli() function of the respective plugin is called.
I have also worked on adding space for external plugins where I rewrote functions of the class
click.Group() to achieve the functionality of external plugins along with an internal plug-in architecture for ease of adding modules in-tree. The external plug-in thing uses
iter_entry_points for accessing the main module. The only problem that I am facing it that it does not recognize
gnuradio.modtool package so I will have read about the implementation of
iter_entry_points. The same has been tested creating a
modtool_base.py locally, installing it with the setuptools and changing the directory path from where the plug-ins are loaded. The latter works absolutely fine with the external plug-ins since the package name is recognized correctly.
All the bugs of the CLI have been fixed and it is most likely that I will submit a pull request will the external plugins working by the next week.
Moreover, I have also worked on SequenceCompleter for python3 branch this week. Here is the pull request for the same.
Pull request 1788 has been merged to the python3 branch.
Tasks for Week 3
- Fix the issue with loading external plug-ins.
- Work on separating the CLI portion from the core Modtool classes, i.e., the modtool directory will be split into two sub-directories, one with the core modtool classes and other with the click CLI code.
- Start working on Modtool tests which will test basic syntax errors, whether a required function is called with the required number of arguments, etc.
- Work on documenting the current Modtool architecture and the methodology for extending external plug-ins possibly along with a video tutorial.
Link to forked repository’s working branch.
Link to the updated Github project.