pimutils / pimutils/vdirsyncer

Switch to a different config format

Open
#141 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cat: ui in progress type: bug type: enhancement
Dominant language
Python
Stars
1.9k
Forks
185
Avg merge
11h 49m
Merged PRs (30d)
1

Description

The current ConfigParser spaghetti tries to mimick most of TOMLs behavior, with section categories (storage, pair) and type guessing.

ConfigObj doesn't seem to be an option because its "static" spec file doesn't work well with just passing all kwargs to storage classes, it probably doesn't get in the way, but doesn't solve any problems either.

What I'd basically need is something like the current INI-format, but with some kind of type system (i.e. like in JSON, a value unambiguously maps to a type, which probably means strings have to be quoted)

The options:

  • TOML: Basically has everything I need, but extremely unstable IMO, and
    hardly a minimal config format. Python parsers exist, but AFAICT none of them
    are really well-written. The most popular one seems to be
    https://github.com/uiri/toml.

    Leftover issue: toml-lang/toml#271 especially troubling in our case when
    specifying paths and URLs.

  • YAML: External dependency is huge, config format technically fulfills our needs, but is a very far
    departure from INI-like formats. It looks similar to Python, but in this context I don't like its syntax.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test entry point is named. Start by reading the current ConfigParser-based configuration handling and comparing the stated TOML and YAML options, then define the required type behavior and compatibility scope before implementation; done means the selected format replaces the current INI-like parsing without losing the needed storage and pair options.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.