outcomesinsights / conceptql

A high-level language that allows researchers to unambiguously define their research algorithms.
MIT License
17 stars 6 forks source link

Ability to Diff ConceptQL Statements #200

Open aguynamedryan opened 5 years ago

aguynamedryan commented 5 years ago

I'd like a way to compare two ConceptQL statements and see how they differ.

Ideally, this diff would show the smallest amount of changes between two statements and intelligently compare a heterogeneous mix of arrays and hashes.

I've looked at:

They don't seem to be what I'd like.

Maybe incorporate this? https://github.com/liufengyun/hashdiff though I don't know how to make a good visualization for it.

aguynamedryan commented 5 years ago

I spoke with Jeremy on this and he feels that diffing two pretty-printed JSON statements might be the best bang for our buck. There are inevitably WAY more complicated ways to compare the differences between two trees, but without a vision of what we'd actually like to display to the user, we should probably stick with something simple.

aguynamedryan commented 5 years ago

Yesterday we discussed focusing on diffing the code sets used in an algorithm. This should be a lot easier to implement and yields the most benefit to a user.

Also, perhaps sorting the JSON statements before comparing will yield at least a bit of extra insight.