Skip to content

Commit dc202d5

Browse files
add run.txt and test.txt into requirement, lint check for conf.py, extract.py, and prep.py (#17)
1 parent fd65cf6 commit dc202d5

File tree

5 files changed

+20
-13
lines changed

5 files changed

+20
-13
lines changed

Diff for: devutils/prep.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def rm(directory, filerestr):
8888
rm("../doc/examples/output", r"known_dG.*\.pwa")
8989
rm("../doc/examples/output", r"unknown_dG.*\.pwa")
9090

91-
### Testing examples
91+
# Testing examples
9292
examples = Test()
9393
test_names = [
9494
"extract_single_peak",
@@ -110,7 +110,7 @@ def rm(directory, filerestr):
110110

111111
examples.report()
112112

113-
### Convert output of example files to Unix-style endlines for sdist.
113+
# Convert output of example files to Unix-style endlines for sdist.
114114
if os.linesep != "\n":
115115
print("==== Scrubbing Endlines ====")
116116
# All *.srmise and *.pwa files in examples directory.

Diff for: diffpy.srmise/requirements/run.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
matplotlib-base
2+
numpy
3+
scipy

Diff for: diffpy.srmise/requirements/test.txt

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
flake8
2+
pytest
3+
codecov
4+
coverage
5+
pytest-env

Diff for: diffpy/srmise/applications/extract.py

+5-7
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
#
1212
##############################################################################
1313

14-
from optparse import OptionGroup, OptionParser
14+
import textwrap
15+
from optparse import IndentedHelpFormatter, OptionGroup, OptionParser
1516

1617
import matplotlib.pyplot as plt
1718
import numpy as np
@@ -539,7 +540,7 @@ def main():
539540
cov = None
540541
if options.performextraction:
541542
cov = ext.extract()
542-
out = ext.extracted
543+
ext.extracted
543544

544545
if options.savefile is not None:
545546
try:
@@ -591,13 +592,10 @@ def parsepars(mp, parseq):
591592
return mp.actualize(pars, "internal", free=free)
592593

593594

594-
### Class to preserve newlines in optparse
595+
# Class to preserve newlines in optparse
595596
# Borrowed, with minor changes, from
596597
# http://groups.google.com/group/comp.lang.python/browse_frm/thread/6df6e6b541a15bc2/09f28e26af0699b1
597598

598-
import textwrap
599-
from optparse import IndentedHelpFormatter
600-
601599

602600
class IndentedHelpFormatterWithNL(IndentedHelpFormatter):
603601
def _format_text(self, text):
@@ -652,7 +650,7 @@ def format_option(self, option):
652650
return "".join(result)
653651

654652

655-
### End class
653+
# End class
656654

657655
if __name__ == "__main__":
658656
main()

Diff for: doc/manual/source/conf.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
import sys
1717
import time
1818

19+
from setup import versiondata
20+
1921
# If extensions (or modules to document with autodoc) are in another directory,
2022
# add these directories to sys.path here. If the directory is relative to the
2123
# documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -59,7 +61,6 @@
5961
# |version| and |release|, also used in various other places throughout the
6062
# built documents.
6163
sys.path.insert(0, os.path.abspath("../../.."))
62-
from setup import versiondata
6364

6465
fullversion = versiondata.get("DEFAULT", "version")
6566
# The short X.Y version.
@@ -205,11 +206,11 @@
205206

206207
latex_elements = {
207208
# The paper size ('letterpaper' or 'a4paper').
208-
#'papersize': 'letterpaper',
209+
# 'papersize': 'letterpaper',
209210
# The font size ('10pt', '11pt' or '12pt').
210-
#'pointsize': '10pt',
211+
# 'pointsize': '10pt',
211212
# Additional stuff for the LaTeX preamble.
212-
#'preamble': '',
213+
# 'preamble': '',
213214
}
214215

215216
# Grouping the document tree into LaTeX files. List of tuples

0 commit comments

Comments
 (0)