pylipp / financeager

Organize your finances easily - from the command line!
GNU General Public License v3.0
82 stars 22 forks source link

Replace use of schematics library #48

Closed pylipp closed 4 years ago

pylipp commented 4 years ago

financeager.period uses the schematics package to perform validation of data (i.e. standard and recurrent entries). There are a couple of issues with the library:

  1. When running tests (e.g. python -m test.test_period) a bunch of warnings is emitted about deprecated functionality of library (however the functionality complained about is used internally (?), not at the API level). See schematics/schematics#571.
  2. The schematics project has not seen a release in over a year, and the activity on the repository is little.
  3. There is a workaround of a schematics bug to perform validation at https://github.com/pylipp/financeager/blob/a19ee4fefdd0d1f1892f81615c96904bbeea0dcc/financeager/period.py#L154-L158.

It could be considered to replace the usage of schematics with e.g.

  1. marshmallow. 4.2k stars, last release in Nov 2019, 141 contributors.
  2. pydantic which does validation via type annotations (Python >= 3.6 only). 1.7k stars, last release in Nov 2019, 85 contributors
  3. voluptuous. 1.5k stars, last release in Aug 2019, 61 contributors.
  4. cerberus 1.9k stars, last release in Oct 2019, 52 contributors.
  5. schema 1.9k stars, last release in Sep 2019, 50 contributors. It has to be estimated how much effort the migration would be (probably little since only to Schemas are used).