As planned for Week 8, YAML Generator
has been added to the ModTool and the basic grc_xml
template has been replaced with the grc_yaml
template.
Since, the branch next
contains YAML
only, the grc_xml_generator
has been replaced with a grc_yaml_generator
. The CLI command has been changed from makexml
to makeyaml
. Similarly, the API or the core class has been changed from ModToolMakeXML
to ModToolMakeYAML
. The python library pyyaml
has been used to dump the dictionary into YAML data
. The generated YAML scripts
are in strict correspondence to the existing YAML files
in the next
.
Since it is not possible to manage the order of entries using the traditional dictionary which stores the entries in the sorted manner according to the keys
, I have used an OrderedDict
to manage the dictionary entries. For implementing an OrderedDict
with pyyaml
, I have added a special representer
to the traditional Dumper
. The data_flow_style
has been kept as False
.
The template grc_xml
has been replaced with the template grc_yml
which gives the brief description of the YAML file
that needs to be added for grc
support.
Moreover, I have slightly modified the CMakeLists
and the directory structure. The modtool configuration file has been moved to the base modtool
folder. The CMakeLists.txt
of the base modtool
folder adds the sub_directories
for the installation. The README.modtool
has also been updated.
I have also replaced all possible %s
, %d
with str.format()
in the python modules of the core
as well as tools
.
The entire work for gr_modtool overhaul
has been rebased to the branch next
from the branch python3
and the pull request with current work status has been made.
Tasks for Week 9
- Bug fixes of the PR (if any).
- Create an XML to YAML converter (CLI option as well as API support).
- Start working on the GUI.
I have updated the GitHub project and the code can be followed in the forked repository swapnil_next branch.