Closed frank113 closed 1 year ago
This looks fantastic! Thanks a ton for taking the time to write this. I really appreciate it!
Ooops, sounds like miscommunication. Adrien and I are not working on plots for pycountrycode
. We are improving the Python port of my marginaleffects
package for R
. Eventually, the online "book" will be fully bilingual R/Python, like this page:
The R package is quite robust, thanks for the heads up! The bilingual approach seems to be increasingly common in the data world -- curious to see how the split settles.
Summary
This PR partially addresses issue #4 by adding property-based tests utilizing
hypothesis
andpytest
.Issues Addressed
4
Changes Made
hypothesis
in bothpoetry.lock
and underdev
inpyproject.toml
tests/custom_strategies.py
iso3c
toiso3n
conversion. This replaces the priortest_numeric
unit testiso3c
tofips
conversioncountrycode
function will returnNone
codelist
dataframe has dimensions of 291 by 624. This test is included to protect against small, accidentical changes to the underlyingcsv
file.Considerations
iso3c
toiso3n
using the provided tests as a boilerplate. Given the repetitive nature of the property-based tests these tests can be present, albeit not exhaustive.codelist
can be accounted for within this frameworkOther
Looking forward to learning more about the plot functionality you mentioned in an issue thread!