-
Notifications
You must be signed in to change notification settings - Fork 11
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
Sort output of data #50
Comments
Yeah, we should use ordered dicts instead of the standard dicts. Ideally implementing an order logic |
Hmmm now you mention it, what version of python is it running on? Dicts should be ordered by default since like, 3.6 or something? |
We are on the python installed here: https://github.com/PokeAPI/api-data/blob/master/updater%2FDockerfile#L4 Which I think might be the latest. But not 100% sure. I'll check when I have time |
We had this discussion already in the past via email or GH issue, but we couldn't determine why they would get shuffled anyways |
It should definitely be beyond the version we need. I do remember the discussion, and reviewing a few of the diffs today made me realise it is still a pain point. I opened the issue with a bit of hope that someone in the community could pick it up. |
Sometimes the data gets scrambled even if there's no modification to it. This isn't the best also for caching purposes. We could also look into tools that diff JSON files, such as https://github.com/josephburnett/jd |
Related to this issue is the fact that ditto produces data but when it pushes it up - the ordering isn't maintained and the diff is very large and hard to read - with most of it just being existing content shuffled around.
Ideally we'd like to provide a
--sort
option to the ditto tool that orders the output of data somehow.The text was updated successfully, but these errors were encountered: