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

bug: Problem with how partners field is parsed + tests #186

Closed lwasser closed 1 month ago

lwasser commented 1 month ago

Right now, the partners field for astropy specifically, looks like this as an output:

https://github.com/pyOpenSci/pyopensci.github.io/blob/main/_data/packages.yml#L81

  partners:
    - 'astropy: link-coming soon-to standards'

this is breaking the build on the astropy side of things - see here.

the partners field should always serialize to single word partner names like this:

  partners:
    - 'astropy: link-coming soon-to standards'

note: We should add some tests to ensure that the model captures / serializes fields correctly. let's start with a test for the partners field when this is fixed.

cc: @pllim

pllim commented 1 month ago

Thanks! Does this mean my patch over at https://github.com/astropy/astropy.github.com/pull/605 is irrelevant or still applies?

lwasser commented 1 month ago

@pllim your patch accounts for this bug. but once we fix this bug your patch won't be necessary if that makes sense. so if you are ok with it potentially taking a bit of time to fix this bug depending on who has time -- (i'm at scipy) - then you dont need that patch!

we should be able to fix this quickly once we have time. we just need to make the partners field a Literal as @sneakers-the-rat mentioned and a validator that just uses "starts with" i think the check / clean / ingest the correct partner value

pllim commented 1 month ago

Well, the website isn't showing anything is kinda shocking, so I think I will just merge what I have downstream so things are fixed for now. If the patch is compatible with your future fix, then it does not hurt anyway, right? Thanks for the advice!

lwasser commented 1 month ago

nope - it will NOT hurt to merge that! i'm sorry about this complication. we are working on tests for this build so we know about these changes in the future BEFORE they are ingested into our website build!!