Skip to content

Commit

Permalink
edits made by running pre-commit (removing whitespace)
Browse files Browse the repository at this point in the history
  • Loading branch information
cadenmyers13 committed May 29, 2024
1 parent 149bc28 commit a2eba1a
Show file tree
Hide file tree
Showing 10 changed files with 53 additions and 52 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[run]
source =
source =
src/diffpy/pdfmorph/
[report]
omit =
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

- name: install requirements
run: >-
conda install -n build -c conda-forge
conda install -n build -c conda-forge
--file requirements/build.txt
--file requirements/run.txt
--file requirements/docs.txt
Expand All @@ -42,4 +42,3 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./doc/manual/build/html

74 changes: 41 additions & 33 deletions doc/manual/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,65 +13,68 @@
import sys
from pathlib import Path

sys.path.insert(0, str(Path('../../..').resolve()))
sys.path.insert(0, str(Path('../../../src').resolve()))
sys.path.insert(0, str(Path("../../..").resolve()))
sys.path.insert(0, str(Path("../../../src").resolve()))


# -- Project information -----------------------------------------------------

project = 'PDFmorph'
project_full = 'diffpy.pdfmorph'
copyright = '2009-2019, Trustees of Columbia University in the City of New York, all rights reserved.'
author = 'Chris Farrow, Christopher J. Wright, Pavol Juhás, Chia-Hao (Timothy) Liu, S. Matthew Román, Simon J.L. Billinge'
project = "PDFmorph"
project_full = "diffpy.pdfmorph"
copyright = "2009-2019, Trustees of Columbia University in the City of New York, all rights reserved."
author = "Chris Farrow, Christopher J. Wright, Pavol Juhás, Chia-Hao (Timothy) Liu, S. Matthew Román, Simon J.L. Billinge"

# The full version, including alpha/beta/rc tags
from importlib.metadata import version

fullversion = version(project_full)
# The short X.Y version.
version = ''.join(fullversion.split('.post')[:1])
version = "".join(fullversion.split(".post")[:1])
# The full version, including alpha/beta/rc tags.
release = fullversion

# Get current date for copyright
import time
today = time.strftime('%B %d, %Y', time.localtime())

today = time.strftime("%B %d, %Y", time.localtime())
year = today.split()[-1]
copyright = copyright.replace('%Y', year)
copyright = copyright.replace("%Y", year)


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.todo',
'sphinx.ext.viewcode',
'sphinx.ext.intersphinx',
'sphinx_rtd_theme',
'm2r',
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
"sphinx.ext.todo",
"sphinx.ext.viewcode",
"sphinx.ext.intersphinx",
"sphinx_rtd_theme",
"m2r",
]
napoleon_google_docstring = False
napoleon_use_param = False
napoleon_use_ivar = False

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

from jinja2 import Template, Environment, FileSystemLoader
from jinja2 import Environment, FileSystemLoader, Template

source_suffix = '.rst'
source_suffix = ".rst"

master_doc = 'index'
master_doc = "index"

language = 'en'
language = "en"
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['Thumbs.db', '.DS_Store']
exclude_patterns = ["Thumbs.db", ".DS_Store"]

pygments_style = 'sphinx'
pygments_style = "sphinx"

todo_include_todos = True

Expand All @@ -80,7 +83,8 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'

html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

html_theme_options = {}
Expand All @@ -90,25 +94,29 @@
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = []

htmlhelp_basename = 'PDFmorphdoc'
htmlhelp_basename = "PDFmorphdoc"

latex_documents = [
(master_doc, 'pdfmorph.tex', 'PDFmorph Documentation',
'author', 'manual'),
(master_doc, "pdfmorph.tex", "PDFmorph Documentation", "author", "manual"),
]

man_pages = [
(master_doc, 'pdfmorph', 'PDFmorph Documentation', [author], 1)
]
man_pages = [(master_doc, "pdfmorph", "PDFmorph Documentation", [author], 1)]

texinfo_documents = [
(master_doc, 'PDFmorph', 'PDFmorph Documentation', author,
'PDFmorph', 'One line description of project.', 'Miscellaneous'),
(
master_doc,
"PDFmorph",
"PDFmorph Documentation",
author,
"PDFmorph",
"One line description of project.",
"Miscellaneous",
),
]

epub_title = project
epub_author = author
epub_publisher = author
epub_copyright = copyright

epub_exclude_files = ['search.html']
epub_exclude_files = ["search.html"]
7 changes: 4 additions & 3 deletions run_tests.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
#!/usr/bin/env python

import sys

import pytest

if __name__ == '__main__':
if __name__ == "__main__":
# show output results from every test function
args = ['-v']
args = ["-v"]
# show the message output for skipped and expected failure tests
if len(sys.argv) > 1:
args.extend(sys.argv[1:])
print('pytest arguments: {}'.format(args))
print("pytest arguments: {}".format(args))
# # compute coverage stats for xpdAcq
# call pytest and exit with the return code from pytest so that
# travis will fail correctly if tests fail
Expand Down
2 changes: 1 addition & 1 deletion src/diffpy/pdfmorph/morphs/morphishape.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


"""class MorphISphere -- apply inverse spherical shape function
class MorphISpheroid -- apply inverse spheroidal shape function
class MorphISpheroid -- apply inverse spheroidal shape function
"""


Expand Down
1 change: 1 addition & 0 deletions src/diffpy/pdfmorph/tests/test_morphshape.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@


import os

import numpy
import pytest

Expand Down
6 changes: 1 addition & 5 deletions src/diffpy/pdfmorph/tests/test_pdfmorphapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@

import pytest

from diffpy.pdfmorph.pdfmorphapp import (
create_option_parser,
multiple_morphs,
single_morph,
)
from diffpy.pdfmorph.pdfmorphapp import create_option_parser, multiple_morphs, single_morph

thisfile = locals().get("__file__", "file.py")
tests_dir = Path(thisfile).parent.resolve()
Expand Down
6 changes: 1 addition & 5 deletions src/diffpy/pdfmorph/tests/test_pdfmorphio.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@
except ImportError:
pass

from diffpy.pdfmorph.pdfmorphapp import (
create_option_parser,
multiple_morphs,
single_morph,
)
from diffpy.pdfmorph.pdfmorphapp import create_option_parser, multiple_morphs, single_morph

thisfile = locals().get("__file__", "file.py")
tests_dir = Path(thisfile).parent.resolve()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,4 @@
"rstep": 0.01,
"rpoly": 0.7
}
}
}
2 changes: 1 addition & 1 deletion tutorial/sample_namesfile.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
"SaVe_MoRph_As": "this_also_works.extension",
"note": "Capitalization does NOT matter. The program is case insensitive."
}
}
}

0 comments on commit a2eba1a

Please sign in to comment.