Skip to content

Validate Docserv INI structure #306

@tomschr

Description

@tomschr

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 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.

Possible projects to consider:

Comparison of Solutions

Project Doc Learning
jsonschema extensive and detailed Steeper (JSON Schema standard)
Cerberus Clear & straightforward Easy & intuitive
marshmallow Comprehensive, plenty of examples, FAQ, Guides Moderate
pydantic Excellent, lots of examples Easy to moderate
schema Sufficient Easy

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2: soonPretty importantenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions