Cheers,
This looks much better :) I just installed SIMPSON, and I already
have NMRPipe and Sparky. But I'll skip RNMRTK, as there is no direct
download, and just ignore those missing file failures. For the tests,
the data looks like it must be unpacked and set up in the 'data'
directory. It seems like this is a hardcoded path. Anyway, I'm
testing now. Using Python 2.7, at the end I see:
"""
Ran 165 tests in 177.902s
FAILED (errors=21, failures=10)
"""
The errors are from the missing RNMRTK files. I'm not sure about the
failures though. With nosetests-3.4, I see:
"""
Ran 165 tests in 158.442s
FAILED (errors=21, failures=10)
"""
Anyway, despite the tests performing identically, the warning messages
were not exactly the same. The following is a significant message:
"""
/data/relax/nmrglue/edward-nmrglue/nmrglue/fileio/bruker.py:1538:
UserWarning: Unable to correctly parse line:##$LOCKED= True
warn("Unable to correctly parse line:" + line)
/data/relax/nmrglue/edward-nmrglue/nmrglue/fileio/bruker.py:1538:
UserWarning: Unable to correctly parse line:##$LOCSHFT= False
warn("Unable to correctly parse line:" + line)
/data/relax/nmrglue/edward-nmrglue/nmrglue/fileio/bruker.py:1538:
UserWarning: Unable to correctly parse line:##$PROSOL= False
warn("Unable to correctly parse line:" + line)
F/data/relax/nmrglue/edward-nmrglue/nmrglue/fileio/bruker.py:1538:
UserWarning: Unable to correctly parse line:##$LOCKED= False
warn("Unable to correctly parse line:" + line)
"""
Looking at the code, I can see that you are not decoding the Python 3
byte array. In relax (
http://www.nmr-relax.com), I simply use the
lines:
# Decode Python 3 byte arrays.
if hasattr(line, 'decode'):
line = line.decode()
This is essential whenever you read IO from a file, STDIN, etc. to
convert it to a unicode string. It allows for both Python 2 and 3
support. Without it, you will never match with checks such as:
line = f.readline().rstrip() # read a line
if line == '': # end of file found
break
if line[:6] == "##END=":
#print("End of file")
break
elif line[:2] == "$$":
dic["_comments"].append(line)
elif line[:2] == "##" and line[2] != "$":
dic["_coreheader"].append(line)
elif line[:3] == "##$":
try:
key, value = parse_jcamp_line(line, f)
dic[key] = value
except:
warn("Unable to correctly parse line:" + line)
else:
warn("Extraneous line:" + line)
Cheers,
Edward
P. S. Have you though of setting up an account for one of the other
open source infrastructure frameworks - Gnu Savannah
(
https://savannah.nongnu.org/), Gna! (
http://gna.org/), SourceForge
(
http://sourceforge.net/), etc. - and using the key pieces of open
source infrastructure missing from GitHub and Google forums? It could
even just be used for file uploads. I've heard others doing this to
fill in the missing parts. Though maybe GitHub have improved their
services since then, I haven't been following.