diff --git a/devutils/prep.py b/devutils/prep.py index 49afb2c..af3b446 100644 --- a/devutils/prep.py +++ b/devutils/prep.py @@ -88,7 +88,7 @@ def rm(directory, filerestr): rm("../doc/examples/output", r"known_dG.*\.pwa") rm("../doc/examples/output", r"unknown_dG.*\.pwa") - ### Testing examples + # Testing examples examples = Test() test_names = [ "extract_single_peak", @@ -110,7 +110,7 @@ def rm(directory, filerestr): examples.report() - ### Convert output of example files to Unix-style endlines for sdist. + # Convert output of example files to Unix-style endlines for sdist. if os.linesep != "\n": print("==== Scrubbing Endlines ====") # All *.srmise and *.pwa files in examples directory. diff --git a/diffpy.srmise/requirements/run.txt b/diffpy.srmise/requirements/run.txt new file mode 100644 index 0000000..5306b5d --- /dev/null +++ b/diffpy.srmise/requirements/run.txt @@ -0,0 +1,3 @@ +matplotlib-base +numpy +scipy diff --git a/diffpy.srmise/requirements/test.txt b/diffpy.srmise/requirements/test.txt new file mode 100644 index 0000000..6f9ccf8 --- /dev/null +++ b/diffpy.srmise/requirements/test.txt @@ -0,0 +1,5 @@ +flake8 +pytest +codecov +coverage +pytest-env diff --git a/diffpy/srmise/applications/extract.py b/diffpy/srmise/applications/extract.py index 6b89be9..482ad9b 100755 --- a/diffpy/srmise/applications/extract.py +++ b/diffpy/srmise/applications/extract.py @@ -11,7 +11,8 @@ # ############################################################################## -from optparse import OptionGroup, OptionParser +import textwrap +from optparse import IndentedHelpFormatter, OptionGroup, OptionParser import matplotlib.pyplot as plt import numpy as np @@ -539,7 +540,7 @@ def main(): cov = None if options.performextraction: cov = ext.extract() - out = ext.extracted + ext.extracted if options.savefile is not None: try: @@ -591,13 +592,10 @@ def parsepars(mp, parseq): return mp.actualize(pars, "internal", free=free) -### Class to preserve newlines in optparse +# Class to preserve newlines in optparse # Borrowed, with minor changes, from # http://groups.google.com/group/comp.lang.python/browse_frm/thread/6df6e6b541a15bc2/09f28e26af0699b1 -import textwrap -from optparse import IndentedHelpFormatter - class IndentedHelpFormatterWithNL(IndentedHelpFormatter): def _format_text(self, text): @@ -652,7 +650,7 @@ def format_option(self, option): return "".join(result) -### End class +# End class if __name__ == "__main__": main() diff --git a/doc/manual/source/conf.py b/doc/manual/source/conf.py index 965010c..d856aef 100644 --- a/doc/manual/source/conf.py +++ b/doc/manual/source/conf.py @@ -16,6 +16,8 @@ import sys import time +from setup import versiondata + # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. @@ -59,7 +61,6 @@ # |version| and |release|, also used in various other places throughout the # built documents. sys.path.insert(0, os.path.abspath("../../..")) -from setup import versiondata fullversion = versiondata.get("DEFAULT", "version") # The short X.Y version. @@ -205,11 +206,11 @@ latex_elements = { # The paper size ('letterpaper' or 'a4paper'). - #'papersize': 'letterpaper', + # 'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). - #'pointsize': '10pt', + # 'pointsize': '10pt', # Additional stuff for the LaTeX preamble. - #'preamble': '', + # 'preamble': '', } # Grouping the document tree into LaTeX files. List of tuples