Skip to content

Conversation

njv299
Copy link
Contributor

@njv299 njv299 commented Jul 22, 2021

Adds FileType values allowed by spec but not currently listed in FileType class.

Resolves issue #186

Signed-off-by: Nathan Voss nathan@finitestate.io

Signed-off-by: Nathan Voss <nathan@finitestate.io>
Copy link
Contributor

@tardyp tardyp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good.

As we are now python3 only, we could migrate this class to enum to get better repr()

we can even use enum's auto
https://docs.python.org/3/library/enum.html#enum.auto

BINARY = 2
ARCHIVE = 3
OTHER = 4
APPLICATION = 5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks compliant to the spec:

https://spdx.github.io/spdx-spec/4-file-information/

SOURCE if the file is human readable source code (.c, .html, etc.); BINARY if the file is a compiled object, target image or binary executable (.o, .a, etc.); ARCHIVE if the file represents an archive (.tar, .jar, etc.); APPLICATION if the file is associated with a specific application type (MIME type of application/*); AUDIO if the file is associated with an audio file (MIME type of audio/* , e.g. .mp3); IMAGE if the file is associated with an picture image file (MIME type of image/*, e.g., .jpg, .gif); TEXT if the file is human readable text file (MIME type of text/*); VIDEO if the file is associated with a video file type (MIME type of video/*); DOCUMENTATION if the file serves as documentation; SPDX if the file is an SPDX document; OTHER if the file doesn't fit into the above categories (generated artifacts, data files, etc.) 
Copy link
Member

@pombredanne pombredanne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks .. merging

@pombredanne pombredanne merged commit a811208 into spdx:master Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants