[RFC] Splitting zones.json into multiple files #2962
-
DescriptionCurrently, In most use cases, we only need to import something about a zone and not everything. Secondly, we it's currently more difficult to automate the review process because of this (we can't auto-apply labels as easily). Motivation for changing this
The Proposal: Split into multiple filesI think splitting the file into multiple files would help with the above. Here's how it could be done (let me know if I missed something):
Downsides
Tasks
Dunno if this should be an issue, but what do you think @Kongkille, @FelixDQ and anyone else? |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 6 replies
-
I think this makes a lot of sense, @FelixDQ spent some time also on these config files so I'm curious whether there are any downsides to consider. |
Beta Was this translation helpful? Give feedback.
-
I think this makes a lot of sense. |
Beta Was this translation helpful? Give feedback.
-
I’m unsure about the actual value of splitting this. In terms of tooling, we would likely require a custom bot anyway... In terms of contribution, then I see some value that information for one zone is colocated in one file (currently zones.json). If we want to split, then we could considering if one file per zone would be better. On a related note: wouldn’t it make sense if the references (currently in DATA_SOURCES.md would be located in zones.json or the country zone files). We can always auto generate DATA_SOURCES on merge if we like to have this in a markdown file. |
Beta Was this translation helpful? Give feedback.
-
If we end up doing this I would suggest using camelCase keys. Ping me if you would like me to update the schemata. I think a contributors array per zone in zones.json alone would be enough. |
Beta Was this translation helpful? Give feedback.
-
If we do decide to split these (which it think we should) we should try to do it in a way so we include as little unnecessary data in the frontend as possible. As far as I know the only keys from For The other keys are either not used at all for the frontend or they are passed through it via the history file, like the capacities for both zones and exchanges so we should try and keep these in separate files to ensure we don't bloat the frontend unnecessarily. Another option would be to include all of these in the state and/or history information (most already are) for each country and skip using the Both of these options can be combined to some degree as well. |
Beta Was this translation helpful? Give feedback.
-
I created a different RFC at #4396 for historical capacities that directly relates to this discussion. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
zones.json
andexchanges.json
was split #4435 and the oldzones.json
andexchange.json
will be removed in #4655.