nexB/deltacode

Add Copyright class

johnmhoran opened this issue · 6 comments

  • Create Copyright class.
  • Add Copyright to File object.
  • Partial implementation of #43.

@MaJuRG File.to_dict() currently does not add the licenses key/value pair to the OrderedDict if the licenses value is an empty list. (Similar result for copyrights, which I'm basing on how we handle licenses.) See link.

It seems to me we'd want to display the key/value pairs for licenses and copyrights even if the values are an empty list, with a change like this:

        if self.licenses:
            d['licenses'] = [l.to_dict() for l in self.licenses]
        else:
            d['licenses'] = []

Does that make sense, or is it unnecessary? (The change does result in 21 failed tests, but that can be addressed.)

@johnmhoran that makes sense, I would say make this change

Thanks @MaJuRG . OK if I do so in this issue, or does it merit a separate issue? I suggest handling in this issue.

No this issue is fine.

👍

merged #85, closing.