pyOpenSci / pyosMeta

A package that updates pyOpenSci contributor and package metadata on our website
BSD 3-Clause "New" or "Revised" License
4 stars 17 forks source link

Fix: clean data accepted key #131

Closed lwasser closed 6 months ago

lwasser commented 6 months ago

closes #129

this fixes a bug in our workflow related to older issues with different formats for the date accepted key. it adds a helper clean function to the utils_clean module that looks for any key that begins with date_accepted and removes anything following it. this will simplify both our pydantic model ingest and also make it easy to add other scenarios if people modify that line.

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 57.05%. Comparing base (8d62417) to head (3dacca6).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #131 +/- ## ========================================== + Coverage 47.56% 57.05% +9.48% ========================================== Files 7 7 Lines 473 482 +9 Branches 74 76 +2 ========================================== + Hits 225 275 +50 + Misses 244 202 -42 - Partials 4 5 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

willingc commented 6 months ago

Looks like some sort of test issue.

lwasser commented 6 months ago

yes! so essentially what i fixed here - there was a test that i didn't update. BUT i didn't see that it wasn't updated because it was not named correctly for pytest / vscode to find it when i ran the tests. So i just fixed that all by

  1. fixing the test that should have been fixed
  2. fixing the test suite setup (renaming the file to start with test_) so it ran when i ran tests locally. it's all green now - i shall merge given an approval. thank you so much! i'm happy with this fix as it's much easier to troubleshoot (and test) now. ✨

thank you so much!

lwasser commented 6 months ago

all green ✅ merging! this one feels good as it feels like a good fix with a clean(er) fix implementation!