nexB/deltacode

Add Scanfile paths to deltacode output

steven-esser opened this issue · 4 comments

In order to see if we ran deltacode on the correct files, we should list the scanfile paths in the output somewhere at the top.

@MaJuRG I'm currently working on #87 (add ScanCode paths to DeltaCode output) (branched from the refactor branch since the latter is not yet merged into develop). Issue #2 (report scan options) is related, so I've tackled both in the sample output below, all under a new key, deltacode_input. Please let me know what you think when you have the chance.

{
  "deltacode_notice": [omitted to save space in this GH comment]
  "deltacode_options": {
    "--all-delta-types": false
  },
  "deltacode_version": "1.0.0.post22.c35d313.dirty.20180321193150",
  "deltacode_input": {
    "new_scan_info": {
      "location": "C:/code/nexb/ScanCode_output/scans/zlib-1.2.11.json",
      "scancode_version": "2.9.0b1.post32.fea65d35a",
      "scancode_options": {
        "--license": true,
        "--package": true,
        "--json-pp": "C:\\code\\nexb\\dev\\deltacode\\tests\\data\\deltacode\\zlib-1.2.11.json",
        "--copyright": true,
        "input": "C:\\Users\\JMH\\Downloads\\nexB\\zlib-1.2.11",
        "--info": true
      }
    },
    "old_scan_info": {
      "location": "C:/code/nexb/ScanCode_output/scans/zlib-1.2.9.json",
      "scancode_version": "2.9.0b1.post32.fea65d35a",
      "scancode_options": {
        "--license": true,
        "--package": true,
        "--json-pp": "C:\\code\\nexb\\dev\\deltacode\\tests\\data\\deltacode\\zlib-1.2.9.json",
        "--copyright": true,
        "input": "C:\\Users\\JMH\\Downloads\\nexB\\zlib-1.2.9",
        "--info": true
      }
    }
  },
  "deltacode_errors": [],
  "deltas": [
    {
. . .

My primary goal in addressing these two issues together was to reach agreement on the desired structure and content of the JSON output -- I can tackle these issues individually if that's preferable from a development/GH record perspective.

This seems a little too complex to me. I am not 100% how we address this yet but I think for now atleast for #87, we can simply add the old and new paths to our deltacode_options variable.

We can probably wait on #2 for a bit, until we have some discussion on cross-project data file headers.

ack.