Remove outdated queries and update missing query references#3451
Remove outdated queries and update missing query references#3451mabijkerk 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
aaccensi
left a comment
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
kndehaan
left a comment
There was a problem hiding this comment.
Looking good! See file specific comments and here a general comment:
ETFlex queries are still mentioned in etsource/gqueries/README.mdown. Actually, this file is very outdated and can be removed. The most important part of this file are now in the docs. Can you remove this file as well?
There was a problem hiding this comment.
This query and the queries referenced by it are not used anymore, so isn't it better to remove them instead of correcting it?
There was a problem hiding this comment.
This query is not used anymore, crude_oil_in_source_of_biomass_products_industry_transformation_in_sankey is used instead. Should we therefore remove this query?
There was a problem hiding this comment.
All queries in this folder starting with emissions_overview don't seemed to be used anymore. Should we just remove them?
There was a problem hiding this comment.
This query is in the end used by a query that's not used anymore. Remove this as well?
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.