Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pure GraphQL Peloton update script #16

Merged
merged 31 commits into from
Dec 15, 2023
Merged

Conversation

trexfeathers
Copy link
Contributor

@trexfeathers trexfeathers commented Dec 8, 2023

Uses GraphQL for both queries and mutations. This allows the inclusion of Discussions, and greatly reduced runtime.

Uses sgqlc for a Pythonic representation of GraphQL.

This is a big change. I recommend reading through the main() function of update_project.py to get a feel for the workflow, before diving into how the individual queries/mutations are constructed.

The Peloton in its current guise has been successfully populated by this script on several occasions, both locally and via GitHub Actions.

GitHub actions examples:

Closes #14
Closes #12
Closes #11
Closes #10
Closes #9

@bjlittle bjlittle self-assigned this Dec 14, 2023
@bjlittle bjlittle self-requested a review December 14, 2023 14:42
peloton/update-schema.sh Outdated Show resolved Hide resolved
peloton/update-schema.sh Outdated Show resolved Hide resolved
Copy link
Member

@bjlittle bjlittle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@trexfeathers This is my first wave through, with only a few minor comments to service.

Pretty hard to get into, but I can see this code has been built up over a long period of time using graphql to query the repos. It's clear you've put a lot of effort into this, so thank-you 🍻

The structure looks good to me, with clean separation of concerns through your class hierarchy for non-mutable and mutable operations.

I'm keen to bank it so that we can all leverage it's benefit in the pelotons, and make course corrections as we go forwards 👍

peloton/update_project.py Outdated Show resolved Hide resolved
peloton/update_project.py Show resolved Hide resolved
peloton/update_project.py Outdated Show resolved Hide resolved
peloton/update_project.py Outdated Show resolved Hide resolved
peloton/update_project.py Outdated Show resolved Hide resolved
peloton/update_project.py Outdated Show resolved Hide resolved
peloton/update_project.py Outdated Show resolved Hide resolved
peloton/update_project.py Outdated Show resolved Hide resolved
peloton/update_project.py Outdated Show resolved Hide resolved
peloton/update_project.py Show resolved Hide resolved
@bjlittle bjlittle merged commit 15ef8fb into SciTools:main Dec 15, 2023
@bjlittle
Copy link
Member

@trexfeathers Awesome! Thanks for pushing this forwards, this'll make a huge difference to the peloton 🚀 🥳 🎉

@trexfeathers
Copy link
Contributor Author

Thanks @bjlittle!

I'll give the workflow_dispatch a whirl and see if everything is working in the 'real world'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants