Docserv is orchestrated through a docserv.ini file which contains all the options for the server and its targets.
The file src/docserv/docserv.py contains the class DocservConfig with the method parse_config() method. It reads such INI file and transforms it into a Python dictionary, validates the structure, converts data types, replaces placeholders etc.
The problem with this method is, it's very long, complicated and hard to maintain.
Possible Solution
The code has to be replaced by something more elaborate. We should delegate this to a project that can validate this structure.
Problem
Docserv is orchestrated through a
docserv.ini
file which contains all the options for the server and its targets.The file
src/docserv/docserv.py
contains the classDocservConfig
with the methodparse_config()
method. It reads such INI file and transforms it into a Python dictionary, validates the structure, converts data types, replaces placeholders etc.The problem with this method is, it's very long, complicated and hard to maintain.
Possible Solution
The code has to be replaced by something more elaborate. We should delegate this to a project that can validate this structure.
Possible projects to consider:
schema
, no doc availablejsonschema
, doccerberus
, docmarshmallow
, docpydantic
, docComparison of Solutions