Add file type signatures to binary files#1031
Conversation
9d34ece to
b50d5bf
Compare
There was a problem hiding this comment.
I'm OK with oxli and CountGraph being used internally, but it seems problematic to put them in diagnostic/error output, no?
There was a problem hiding this comment.
Okay. We can change it back during the planned renames.
|
|
Could you add some discussion about implementation and implications moving forward? How does this break backwards compatibility, etc. etc.? |
|
Discussion in the docs or here? Old counting table and presence tables will not be loadable with khmer 2.0. Likewise counting table and presence tables created with 2.0 will not load with khmer 1.4 and prior. |
|
On Tue, May 26, 2015 at 10:48:22AM -0700, Michael R. Crusoe wrote:
Here is fine. OK, anything else we should know? :) |
|
To add the header to an old file: |
|
Marginally related to this PR: What is the official procedure to add this signature to libmagic? |
|
@luizirber I just left a comment in the tracking issue #519 (comment) |
|
Hmm.. I just noticed that we do include the sub-file type as the second field. I'm going to switch to 'OXLI' as the signature. According to the |
|
|
@ctb @luizirber ready for review & merge |
|
Somewhere in the back of my mind I remember being told to include a non-printable character in the magic string for binary files, as it helps some things (like grep) detect a file is a binary one. I have no idea if it's relevant here, but I know the likes of BAM, gz etc do so. [citation needed] |
|
On Tue, May 26, 2015 at 12:44:02PM -0700, Michael R. Crusoe wrote:
also, labels - see #1021. |
|
@kdmurray91 Good point, though our versioning & subtype bytes that follow the magic are not in the printable ASCII range so we are already fine on the point. For example, |
0290083 to
b813793
Compare
|
@ctb updated for the recently merged labels/tags format. Ready for review & merge |
|
Other than the comments, looks good. Note that this PR passes the truncation tests I'm adding in #1048 too, so +1 that :) |
20af055 to
04a33a4
Compare
|
@ctb comments are addressed; ready for review & merge |
There was a problem hiding this comment.
Should this be merged? If so, please add to ChangeLog.
There was a problem hiding this comment.
Thanks for catching that. Probably shouldn't be merged as not everyone will have git-merge-changelog installed. I've moved it to my personal site-wide configuration file.
There was a problem hiding this comment.
On Sun, Jun 14, 2015 at 12:34:20PM -0700, Michael R. Crusoe wrote:
@@ -1 +1,2 @@
khmer/_version.py export-subst
+ChangeLog merge=merge-changelogThanks for catching that. Probably shouldn't be merged as not everyone will have git-merge-changelog installed. I've moved it to my personal site-wide configuration file.
(It doesn't seem to be a problem for merging, note; I ran a merge with it
set, and no problem.)
There was a problem hiding this comment.
Good to know. Something to investigate for another day.
On Sun, Jun 14, 2015 at 12:36 PM C. Titus Brown notifications@github.com
wrote:
In .gitattributes
#1031 (comment):@@ -1 +1,2 @@
khmer/_version.py export-subst
+ChangeLog merge=merge-changelogOn Sun, Jun 14, 2015 at 12:34:20PM -0700, Michael R. Crusoe wrote: > @@ -1
+1,2 @@ > khmer/_version.py export-subst > +ChangeLog merge=merge-changelog
Thanks for catching that. Probably shouldn't be merged as not everyone will
have git-merge-changelog installed. I've moved it to my personal site-wide
configuration file.
(It doesn't seem to be a problem for merging, note; I ran a merge with it
set, and no problem.)—
Reply to this email directly or view it on GitHub
https://github.com/dib-lab/khmer/pull/1031/files#r32383396.Michael R. Crusoe: Programmer & Bioinformatician crusoe@ucdavis.edu
mcrusoe@msu.edu
The lab for Data Intensive Biology; University of California, Davis
https://impactstory.org/MichaelRCrusoe http://twitter.com/biocrusoe
|
Other than the .gitattributes change, LGTM. Please go ahead and merge (after fixing .gitattributes thing one way or another) |
with magic file
2aa5787 to
8718de6
Compare
|
Jenkins, test this please |
Add file type signatures to binary files
|
@ctb, thanks! |
Closes #519