aerich icon indicating copy to clipboard operation
aerich copied to clipboard

Support pyproject.toml

Open ehdgua01 opened this issue 4 years ago • 3 comments

Do you have a plan to support pyproject.toml for config? Would I request PR If you don't have a plan?

ehdgua01 avatar Sep 26 '21 23:09 ehdgua01

That's good, see https://github.com/tortoise/aerich/commit/24c1f4cb7d8c12f4dcccb104cca0694b54e928db

long2ice avatar Sep 27 '21 03:09 long2ice

@long2ice Hi, First of all, thank you for your development. However, I think that should keep aerich.ini because that is useful when reducing config file(pyproject.toml) size and keep the backward compatibility.

I think this code can help you (https://github.com/PyCQA/isort/blob/995e016b9d888fea02bedeb5be8ea7f01b694b58/isort/settings.py#L736-L765)

Fyi, I suggest this library because that is faster than tomlkit(ref. https://github.com/hukkin/tomli#performance)

ehdgua01 avatar Sep 27 '21 03:09 ehdgua01

Second the suggestion for tomli over tomlkit.

Tomli is made for speed, tomlkit is a style preserving library. In my own experience, tomlkit takes around 12 seconds to parse a poetry.lock file, while tomli can parse poetry.lock in under a third of a second.

I've also never seen a library require tomlkit, either. Its always tomli or toml. However, toml is unmaintained, so the defacto standard has become tomli.

onerandomusername avatar Nov 16 '21 05:11 onerandomusername