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 parsing of partnerships #187

Closed sneakers-the-rat closed 1 month ago

sneakers-the-rat commented 1 month ago

Fix: https://github.com/pyOpenSci/pyosMeta/issues/186

sorry this is coming so late today, i have been helping everyone else will stuff all day long and haven't even gotten to any of my own work yet lmao, but since i caused this bug i wanted to fix ASAP.

so here's fix as discussed

so by making the model more strict we now can make the claim that "this key will always be this value or absent" and "if the string is within the tested boundaries of the regex pattern it will be present." We need to do that for the rest of the model now too - make it reflect the contract we want to make with anyone ingesting data from our packages.yaml file: eg. currently package_name is optional and defaults to a blank string, but we should actually never have a review with no package name. and so on. but that's enough for this v simple lil bug

lwasser commented 1 month ago

@sneakers-the-rat thank you for this!! it works perfectly. i'm going to merge now.

lwasser commented 1 month ago

you are also correct there are a few please where we could impose a Literal // set of accepted values. And also not accept a missing field such as package name and repo url (authors / maintainers too).