Skip to content

Commit 3f12010

Browse files
committed
Run black .
1 parent c03973c commit 3f12010

File tree

3 files changed

+67
-57
lines changed

3 files changed

+67
-57
lines changed

doc/source/conf.py

+36-25
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,18 @@
1212
#
1313
import sys
1414
import os
15-
sys.path.insert(0, os.path.abspath('../..'))
15+
16+
sys.path.insert(0, os.path.abspath("../.."))
1617

1718

1819
# -- Project information -----------------------------------------------------
1920

20-
project = 'snmf'
21-
copyright = '2009-2023, Trustees of Columbia University in the City of New York, all rights reserved.'
22-
author = 'Ran Gu, Adeolu Ajayi, Qiang Du, Simon J.L. Billinge'
21+
project = "snmf"
22+
copyright = "2009-2023, Trustees of Columbia University in the City of New York, all rights reserved."
23+
author = "Ran Gu, Adeolu Ajayi, Qiang Du, Simon J.L. Billinge"
2324

2425
# The full version, including alpha/beta/rc tags
25-
release = '0.1.0'
26+
release = "0.1.0"
2627

2728

2829
# -- General configuration ---------------------------------------------------
@@ -31,65 +32,75 @@
3132
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3233
# ones.
3334
import sphinx_rtd_theme
34-
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.napoleon',
35-
'sphinx.ext.todo', 'sphinx.ext.viewcode',
36-
'sphinx.ext.intersphinx', 'm2r']
35+
36+
extensions = [
37+
"sphinx.ext.autodoc",
38+
"sphinx.ext.napoleon",
39+
"sphinx.ext.todo",
40+
"sphinx.ext.viewcode",
41+
"sphinx.ext.intersphinx",
42+
"m2r",
43+
]
3744
napoleon_google_docstring = False
3845
napoleon_use_param = False
3946
napoleon_use_ivar = False
4047

4148
# Add any paths that contain templates here, relative to this directory.
42-
templates_path = ['_templates']
49+
templates_path = ["_templates"]
4350

4451
from jinja2 import Template, Environment, FileSystemLoader
4552

46-
source_suffix = '.rst'
53+
source_suffix = ".rst"
4754

48-
master_doc = 'index'
55+
master_doc = "index"
4956

50-
language = 'en'
57+
language = "en"
5158
# List of patterns, relative to source directory, that match files and
5259
# directories to ignore when looking for source files.
5360
# This pattern also affects html_static_path and html_extra_path.
54-
exclude_patterns = ['Thumbs.db', '.DS_Store']
61+
exclude_patterns = ["Thumbs.db", ".DS_Store"]
5562

56-
pygments_style = 'sphinx'
63+
pygments_style = "sphinx"
5764

5865
todo_include_todos = True
5966

6067
# -- Options for HTML output -------------------------------------------------
6168

6269
# The theme to use for HTML and HTML Help pages. See the documentation for
6370
# a list of builtin themes.
64-
html_theme = 'sphinx_rtd_theme'
71+
html_theme = "sphinx_rtd_theme"
6572
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
6673

6774
html_theme_options = {}
6875

6976
# Add any paths that contain custom static files (such as style sheets) here,
7077
# relative to this directory. They are copied after the builtin static files,
7178
# so a file named "default.css" will overwrite the builtin "default.css".
72-
html_static_path = ['_static']
79+
html_static_path = ["_static"]
7380

74-
htmlhelp_basename = 'snmfdoc'
81+
htmlhelp_basename = "snmfdoc"
7582

7683
latex_documents = [
77-
(master_doc, 'snmf.tex', 'Snmf Documentation',
78-
'author', 'manual'),
84+
(master_doc, "snmf.tex", "Snmf Documentation", "author", "manual"),
7985
]
8086

81-
man_pages = [
82-
(master_doc, 'snmf', 'Snmf Documentation', [author], 1)
83-
]
87+
man_pages = [(master_doc, "snmf", "Snmf Documentation", [author], 1)]
8488

8589
texinfo_documents = [
86-
(master_doc, 'snmf', 'Snmf Documentation', author,
87-
'snmf', 'One line description of project.', 'Miscellaneous'),
90+
(
91+
master_doc,
92+
"snmf",
93+
"Snmf Documentation",
94+
author,
95+
"snmf",
96+
"One line description of project.",
97+
"Miscellaneous",
98+
),
8899
]
89100

90101
epub_title = project
91102
epub_author = author
92103
epub_publisher = author
93104
epub_copyright = copyright
94105

95-
epub_exclude_files = ['search.html']
106+
epub_exclude_files = ["search.html"]

run_tests.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,15 @@
33
import sys
44
import pytest
55

6-
if __name__ == '__main__':
6+
if __name__ == "__main__":
77
# show output results from every test function
8-
args = ['-v']
8+
args = ["-v"]
99
# show the message output for skipped and expected failure tests
1010
if len(sys.argv) > 1:
1111
args.extend(sys.argv[1:])
12-
print('pytest arguments: {}'.format(args))
12+
print("pytest arguments: {}".format(args))
1313
# # compute coverage stats for xpdAcq
1414
# call pytest and exit with the return code from pytest so that
1515
# travis will fail correctly if tests fail
1616
exit_res = pytest.main(args)
1717
sys.exit(exit_res)
18-

setup.py

+28-28
Original file line numberDiff line numberDiff line change
@@ -16,49 +16,49 @@
1616
# with open(os.path.join(MYDIR, 'requirements/run.txt')) as fp:
1717
# requirements = [line.strip() for line in fp]
1818

19-
with open(os.path.join(MYDIR, 'README.md')) as fp:
19+
with open(os.path.join(MYDIR, "README.md")) as fp:
2020
long_description = fp.read()
2121

2222

2323
# define distribution
2424
setup(
2525
name="diffpy.snmf",
26-
version='0.0.1',
27-
packages=find_packages(exclude=['tests', 'applications']),
26+
version="0.0.1",
27+
packages=find_packages(exclude=["tests", "applications"]),
2828
entry_points={
2929
# define console_scripts here, see setuptools docs for details.
30-
'console_scripts': [
31-
'snmf = diffpy.snmf.stretchednmfapp:main',
30+
"console_scripts": [
31+
"snmf = diffpy.snmf.stretchednmfapp:main",
3232
],
3333
},
34-
test_suite='tests',
34+
test_suite="tests",
3535
# install_requires=requirements,
36-
author='Ran Gu, Simon J.L. Billinge',
37-
author_email='[email protected]',
38-
maintainer='Simon J.L. Billinge',
39-
maintainer_email='[email protected]',
40-
url='https://github.com/diffpy/diffpy.snmf',
36+
author="Ran Gu, Simon J.L. Billinge",
37+
author_email="[email protected]",
38+
maintainer="Simon J.L. Billinge",
39+
maintainer_email="[email protected]",
40+
url="https://github.com/diffpy/diffpy.snmf",
4141
description="A python package implementing the stretched NMF algorithm.",
42-
long_description = long_description,
43-
long_description_content_type = 'text/x-rst',
44-
license='BSD',
42+
long_description=long_description,
43+
long_description_content_type="text/x-rst",
44+
license="BSD",
4545
keywords="diffpy PDF",
46-
classifiers = [
46+
classifiers=[
4747
# List of possible values at
4848
# http://pypi.python.org/pypi?:action=list_classifiers
49-
'Development Status :: 4 - Beta',
50-
'Environment :: Console',
51-
'Intended Audience :: Science/Research',
52-
'License :: OSI Approved :: BSD License',
53-
'Operating System :: MacOS :: MacOS X',
54-
'Operating System :: Microsoft :: Windows',
55-
'Operating System :: POSIX',
56-
'Operating System :: Unix',
57-
'Programming Language :: Python :: 3.9',
58-
'Programming Language :: Python :: 3.10',
59-
'Programming Language :: Python :: 3.11',
60-
'Topic :: Scientific/Engineering :: Chemistry',
61-
'Topic :: Scientific/Engineering :: Physics',
49+
"Development Status :: 4 - Beta",
50+
"Environment :: Console",
51+
"Intended Audience :: Science/Research",
52+
"License :: OSI Approved :: BSD License",
53+
"Operating System :: MacOS :: MacOS X",
54+
"Operating System :: Microsoft :: Windows",
55+
"Operating System :: POSIX",
56+
"Operating System :: Unix",
57+
"Programming Language :: Python :: 3.9",
58+
"Programming Language :: Python :: 3.10",
59+
"Programming Language :: Python :: 3.11",
60+
"Topic :: Scientific/Engineering :: Chemistry",
61+
"Topic :: Scientific/Engineering :: Physics",
6262
],
6363
)
6464

0 commit comments

Comments
 (0)