cldf / pycldf

python package to read and write CLDF datasets
https://cldf.clld.org
Apache License 2.0
15 stars 7 forks source link

proof-of-concept #135

Closed xrotwang closed 3 years ago

xrotwang commented 3 years ago

addresses cldf/cldf#109

codecov-commenter commented 3 years ago

Codecov Report

Merging #135 (032345f) into master (29828c4) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #135   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           25        25           
  Lines         2253      2300   +47     
=========================================
+ Hits          2253      2300   +47     
Impacted Files Coverage Δ
src/pycldf/dataset.py 100.00% <100.00%> (ø)
src/pycldf/orm.py 100.00% <100.00%> (ø)
tests/test_orm.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 29828c4...032345f. Read the comment docs.

xrotwang commented 3 years ago

@Anaphory having played around with the "typed-value" implementation a bit, I must say that I really like it. It even provides a short-hand notation for categorical parameters (in case there's no other metadata attached to the categories than just their names): https://github.com/cldf/pycldf/pull/135/commits/032345fed1b29a8799233d1961f492d7b992a540#diff-85bf2019559734a47ac9b8e371220fa7bfe3ed59b5d4401f61f49bdb0a264df7

I think I'll merge this and make it an unspecified (but on track for standardization) feature of pycldf.

Anaphory commented 3 years ago

Cool! Yes, I also thought about the implication to make categorical parameters with it and put on my agenda that I should explain it to David when he's less busy with other stuff. His main gripe with the previous suggestion was the need for two columns, so I'll se whether highly restricted per-parameter-typed values are the correct way for him to describe his data.