CI tool - Frappe Schema JSON Diff

Hi All,

Here is a CI tool for Frappe apps which displays JSON schema changes.
It will help in situations where tracking changes is complicated, as it provides a concise summary in one place.
Added, deleted, and copied JSON files have their git status and path displayed, while modified and renamed files get this and a diff visualization.
Exported customizations are specifically flagged.

It works by using an action to get a list of paths to files in the base and head commits, making the files available simultaneously, then passing the lists to a python script. The script performs a diff between files in each list and displays output.

Another library - DeepDiff - diffs elements via index, but FSJD accounts for Frappe’s docfield order changes, where diffing based on common key instead of index results in a more intuitive output.

Hopefully it can be useful!

GitHub Link

10 Likes

@roberp This really cool.

Export customizations are specifically flagged.

This means that the changes made in Customize From → Export Customizations will be diff’d by this tool?

Yes they are treated the same as other json in the diff except they get an additional line printed specifying Custom File

2 Likes

An update was just pushed fixing a couple v13 issues. If anyone uses this, feel free to submit any new issues that may arise or feature requests for v14 or v15.

I primarily use it in CLI now that that’s been added. It can also post summaries in PR comments.

1 Like