chrismheiser / lipdnet

All things related to Lipd.net and the LiPD Playground
http://www.lipd.net
1 stars 1 forks source link

Changelogging #86

Open nickmckay opened 4 years ago

nickmckay commented 4 years ago

I've been implementing a changelogging system in LiPD files, that would be good to incorporate into the playground. The big ideas:

  1. It compares changes (in key fields, not all) between to instances of a file and documents them into a list called "changelog" in the base. It also versions the file, and keeps track of some other metadata.
  2. The idea would be that in the playground, if someone loads a file, you would compare the loaded file to the one they write out, and then add it to the log.
  3. For new files, it would initialize the changelog.

For now, this is only implemented in R, but I hope to grow it. You can see the code for the R implementation here

A file with change logs is attached. 3MPond.Pellatt.2000.zip

chrismheiser commented 4 years ago

I think this is very doable, but I have some follow-up questions.

  1. Which key fields do you want to start with? What's the important info worth noting?
  2. What granularity should the changelog note? If this is an automatic diff system, we'll have to provide the rules with some consistency across different keys. I think logging something like "KEY: changed to " could get more cumbersome than helpful if the values are too lengthy. Whereas something like "Updated " may not be useful enough.
nickmckay commented 4 years ago
  1. It's presently set up to do all of the metadata fields, except for those that are automatically calculated. At the base level I specify a few important fields and ignore the rest. Take a look at the R code linked in the original post for details. For the paleo(or chron)Data values, I don't record the changes, only that they changed, which is sufficient, and helps with verbosity. I also check the structure of the file and look for changes there (number of tables, paleodatas, etc).
  2. The "key changed from x to y" is fine for metadata, for values or tables, fine to say "Column: values changed" or "paleodata table added"