diff --git a/MANIFEST b/MANIFEST index 16da33b8..573c0fb6 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,39 +1,5 @@ # file GENERATED by distutils, do NOT edit setup.py -<<<<<<< HEAD -testsuite/__init__.py -testsuite/analyze_tests.py -testsuite/crossref_test.py -testsuite/data_tests.py -testsuite/dfr_reader_test.py -testsuite/mallet_reader_test.py -testsuite/networks_test.py -testsuite/simple_graph.py -testsuite/wos_reader_test.py -testsuite/writers_test.py -tethne/__init__.py -tethne/__main__.py -tethne/builders.py -tethne/data.py -tethne/workflow.py -tethne/analyze/__init__.py -tethne/analyze/collection.py -tethne/analyze/graph.py -tethne/matrices/__init__.py -tethne/matrices/dfr.py -tethne/networks/__init__.py -tethne/networks/authors.py -tethne/networks/helpers.py -tethne/networks/papers.py -tethne/networks/terms.py -tethne/networks/topics.py -tethne/readers/__init__.py -tethne/readers/dfr.py -tethne/readers/mallet.py -tethne/readers/pubmed.py -tethne/readers/wos.py -tethne/services/__init__.py -======= tethne/__init__.py tethne/__main__.py tethne/analyze/__init__.py @@ -77,7 +43,6 @@ tethne/readers/scopus.py tethne/readers/wos.py tethne/services/__init__.py tethne/services/dspace.py ->>>>>>> c9995a4e3bdcee8d8bdecc731621bb27394cbcdb tethne/services/geocode.py tethne/utilities/__init__.py tethne/writers/__init__.py diff --git a/setup.py b/setup.py index 53bbe971..52b3e72e 100644 --- a/setup.py +++ b/setup.py @@ -36,13 +36,13 @@ version=VERSION, packages = PACKAGES, install_requires=[ - "networkx >= 1.8.1", - "matplotlib >= 1.3.1", - "tables >= 3.1.1", - "Unidecode >= 0.04.16", - "geopy >= 0.99", + "networkx>=1.8.1", + "matplotlib>=1.3.1", + "tables>=3.1.1", + "Unidecode>=0.04.16", + "geopy>=0.99", "nltk", - "scipy==0.14.0", - "numpy==1.8.1", + "scipy>=0.14.0", + "numpy>=1.8.1", ], ) \ No newline at end of file diff --git a/tethne/writers/corpora.py b/tethne/writers/corpora.py index 92715329..556fb688 100644 --- a/tethne/writers/corpora.py +++ b/tethne/writers/corpora.py @@ -56,7 +56,11 @@ def word(s): # Write metadata. meta = [ str(p) ] if metadata is not None: - meta += [ str(metadict[p][f]) for f in metakeys ] + if p in metadict: + for f in metakeys: + if f in metadict[p]: meta.append(str(metadict[p][f])) + else: meta.append('') + metaFile.write('\t'.join(meta) + '\n') except AttributeError: # .iteritems() raises an AttributeError if ngrams