As planned for week 7, the logger
has been updated with ANSI colors, the modtool tests have been updated with Pylint tests (currently errors only) and the issue with the rename module has been solved (PR has been submitted).
ModTool tests for the API classes ModToolNewModule
and ModToolAdd
have been updated with the Pylint tests. They use the function py_run
of the module epylint
of the pylint
package. To silence the configuration file alert as well as silently run the tests, the pylint_stderr
is stored but not printed. For verbose testing, it can also be printed (not aware of the use case). Currently, only the error messages of the pylint_stdout
are printed as stdout
for testing the ModTool generated scripts. The only issue is that the Pylint tests usually take a lot of time.
The logger gnuradio.modtool
is now equipped with ANSI colors. The work has been done by overriding the StreamHandler
class method emit
. Even the input statements have ANSI colors. Now, there is a separate ModToolException
for the CLI modules which raises the exception in red
color. The redundancy in similar styling of input has been sorted with a separate function cli_input
in the base CLI module. The colors are emitted using click.style
which comes with an optional dependency colorama
. So, no colors appear if colorama
is not installed.
The issue regarding the renaming of the regex pattern instead of the entire blockname has been sorted by generating a list of block candidates
for renaming. A special feature of alternative suggestions
has been added so that the user faces minimum difficulty. The pull request also includes the py3k compatible Sequence Completion of the blocknames
for the modules rename
, rm
, makexml
and disable
.
I have also made a pull request regarding the lint fixes in the generated python scripts and a pull request for relative import of modules in python scripts. All the PRs have been moved to the next
.
In the meantime, I also read about YAML serialization
and also went through some of the blocks in the next
for clear understanding.
Tasks for Week 8
- Add a YAML generator as a CLI command.
- Bug fixes, if any.
I have updated the GitHub project and the code can be followed in the forked repository core_cli branch.