Closed erogluorhan closed 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
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.
Agreed! Thanks Orhan.
Closes #369
This PR addresses the needs due to version changes in pydantic as suggested in the pydantic Migration Guide:
__post_init_post_parse__()
and move its functionality into_get_inputs()
model_dump_json()
instead of deprecateddict()
gallery_generator.py
,resource_gallery.yaml
, andcollect-user-submission.py
files. This change also needed the ProjectPythia/.github/PR#63Note to reviewers: See