vincentarelbundock / pycountrycode

GNU General Public License v3.0
3 stars 3 forks source link

Issue 8/pass ci polars skip #11

Closed frank113 closed 11 months ago

frank113 commented 11 months ago

Summary

This PR addresses issue #8 to ensure that the CI checks pass. This PR is a stop-gap solution to clean up the CI checks so that future failures can be caught expeditiously. Some of the polars functionality blurs the line mentioned in the a comment in the parent issue. For a future PR it is my belief the polars tests should be re-worked. This PR keeps the polars functionality to ensure that scenarios are tested even if in a non-optimal way.

Changes Made

  1. Update formatting of countrycode to ensure that the linting CI check passes.
  2. Updated the test workflow to add steps to install polars and run tests denoted as *_polars
  3. Update custom_strategies to reflect the dictionary representation of codelist
  4. Add empty_string_to_null helper function to account for the dictionary representation of codelist coercing empty string values (previously seen as None natively) to None
  5. Migrate prior custom_strategies to custom_strategies_polars. Based on comments on the issue thread itself I would like to sunset these as soon as possible but am leaving them in for this PR until we have conversion unit tests for the dictionary representation of codelist
  6. Move test_numeric to test_conversion_polars. When using the dictionary representation of codelist the iso3n column was the string representation of a number rather than a number. We can solidify this behavior when porting the tests to not use polars
  7. Skip all tests that need polars if polars is not installed. The skips occur at the module and file levels.

Considerations

vincentarelbundock commented 11 months ago

Looks great, thanks a lot @frank113 , I really appreciate this!