ProjectPythia / projectpythia.github.io

https://projectpythia.org
Apache License 2.0
32 stars 19 forks source link

Fix resource gallery submission workflow #381

Closed erogluorhan closed 9 months ago

erogluorhan commented 9 months ago

Closes #369

This PR addresses the needs due to version changes in pydantic as suggested in the pydantic Migration Guide:

Note to reviewers: See

github-actions[bot] commented 9 months ago

👋 Thanks for opening this PR! The Cookbook will be automatically built with GitHub Actions. To see the status of your deployment, click below. 🔍 Git commit SHA: f9cce37722cfa5fd4efa0abd0624f0a1a77a8b5b ✅ Deployment Preview URL: https://projectpythia.github.io/_preview/381

erogluorhan commented 9 months ago

Note to reviewers:

This PR should be complete; and input submission validation should likely be running successfully. I am not 100% sure because when I bypassed branch protections and merged a prior PR into the main (FYI: later reverted) to see the things because testing this locally is quite hard and testing without merging into main is impossible, there was a serialization error at the final line of collect-user-submission.py, i.e. json.dump(inputs, f). See this

After that, this PR uses inputs = issue.submission.model_dump_json() rather than inputs = issue.submission.model_dump().

To test similar things locally, I used a sample github event payload file that had an issue creation event in it but could not replicate this serialization issue. I suggest that we merge this into main and see how it behaves, if things still don't get validated, we can follow up with an additional PR.

dcamron commented 9 months ago

Agreed! Thanks Orhan.