Skip to content

add run.txt and test.txt into requirement, lint check other files #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions devutils/prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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.
Expand Down
3 changes: 3 additions & 0 deletions diffpy.srmise/requirements/run.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
matplotlib-base
numpy
scipy
5 changes: 5 additions & 0 deletions diffpy.srmise/requirements/test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
flake8
pytest
codecov
coverage
pytest-env
12 changes: 5 additions & 7 deletions diffpy/srmise/applications/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -652,7 +650,7 @@ def format_option(self, option):
return "".join(result)


### End class
# End class

if __name__ == "__main__":
main()
9 changes: 5 additions & 4 deletions doc/manual/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
Loading