Remove outdated queries and update missing query references#3451
Open
mabijkerk wants to merge 13 commits into
Open
Remove outdated queries and update missing query references#3451mabijkerk wants to merge 13 commits into
mabijkerk wants to merge 13 commits into
Conversation
This query was no longer used anywhere
This query referred p2h for households which is no longer a technology in the model
Bio-oil in output of industry transformation has been changed to bionaphtha but this query had not yet been updated accordingly
The investment table has been hidden in ETModel for several years because of the cost data export introduction. Thetable can be retired. Query regeneration can still be done on modeling experiments repo
This query is no longer used anywhere and contained references to missing queries
3 tasks
noracato
approved these changes
Jun 23, 2026
aaccensi
approved these changes
Jun 23, 2026
aaccensi
left a comment
Member
There was a problem hiding this comment.
The new query_validation_spec looks good to me!
Regarding the renamed_functions_spec, I don't think we should delete it.
What it does is to check a list of GQL functions that have been renamed at some point in time are not still being used anywhere with the old name. If we ever make more of this name changes (or we know of a name change that has happened and wasn't included in this test) we should add them to the list:
- INPUT_LINKS → INPUT_EDGES
- LG → EDGE_GROUP
- LINK → EDGE
- LINK_GROUP → EG
- OUTPUT_LINKS → OUTPUT_EDGES
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Queries can reference other queries:
Q(query_key). Sometimes queries are removed or renamed. In this case, you have to do a manual check that they are no longer referenced by another query. There was no automatic check for this.Implemented changes
I had AI write a spec to check for missing queries referenced in queries. Some commments:
renamed_functions_spec, which seems somewhat similar but I don't really understand its purpose. Should we retire that spec @aaccensi?From the first spec run came 15 failures. These have been addressed in individual commits. Goes with the clean up of the investment table: quintel/etmodel#4735.
Review
Ideally, @aaccensi would check the spec and @kndehaan would check the actions for each query. I have added an Excel for this on OneDrive.
I would like to merge this with a merge commit and not squash the commits - to preserve commit history on the addressed queries.