Skip to content

Commit 542b1d6

Browse files
authored
Merge pull request #200 from zmx27/migration
chore: pre-commit auto fixes from prettier
2 parents 87f1bff + fe5f7ca commit 542b1d6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+90
-141
lines changed

.codecov.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
coverage:
22
status:
3-
project: # more options at https://docs.codecov.com/docs/commit-status
3+
project: # more options at https://docs.codecov.com/docs/commit-status
44
default:
55
target: auto # use the coverage from the base commit, fail if coverage is lower
6-
threshold: 0% # allow the coverage to drop by
6+
threshold: 0% # allow the coverage to drop by
77

88
comment:
99
layout: " diff, flags, files"
1010
behavior: default
1111
require_changes: false
12-
require_base: false # [true :: must have a base report to post]
13-
require_head: false # [true :: must have a head report to post]
12+
require_base: false # [true :: must have a base report to post]
13+
require_head: false # [true :: must have a head report to post]
1414
hide_project_coverage: false # [true :: only show coverage on the git diff aka patch coverage]

.github/ISSUE_TEMPLATE/release_checklist.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ assignees: ""
1212
- [ ] All the badges on the README are passing.
1313
- [ ] License information is verified as correct. If you are unsure, please comment below.
1414
- [ ] Locally rendered documentation contains all appropriate pages, including API references (check no modules are
15-
missing), tutorials, and other human written text is up-to-date with any changes in the code.
15+
missing), tutorials, and other human written text is up-to-date with any changes in the code.
1616
- [ ] Installation instructions in the README, documentation and on the website (e.g., diffpy.org) are updated.
1717
- [ ] Successfully run any tutorial examples or do functional testing with the latest Python version.
1818
- [ ] Grammar and writing quality are checked (no typos).
@@ -31,5 +31,5 @@ version information and details about the pre-release here:
3131

3232
<!-- Before closing this issue, please complete the following: -->
3333

34-
- [ ] Run tutorial examples and conduct functional testing using the installation guide in the README. Attach screenshots/results as comments.
35-
- [ ] Documentation (README, tutorials, API references, and websites) is deployed without broken links or missing figures.
34+
- [ ] Run tutorial examples and conduct functional testing using the installation guide in the README. Attach screenshots/results as comments.
35+
- [ ] Documentation (README, tutorials, API references, and websites) is deployed without broken links or missing figures.

.github/workflows/build-wheel-release-upload.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_dispatch:
55
push:
66
tags:
7-
- '*' # Trigger on all tags initially, but tag and release privilege are verified in _build-wheel-release-upload.yml
7+
- "*" # Trigger on all tags initially, but tag and release privilege are verified in _build-wheel-release-upload.yml
88

99
jobs:
1010
release:

.github/workflows/check-news-item.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Check for News
33
on:
44
pull_request_target:
55
branches:
6-
- main
6+
- main
77

88
jobs:
99
check-news-item:

.pre-commit-config.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
default_language_version:
2-
python: python3
2+
python: python3
33
ci:
4-
autofix_commit_msg: |
5-
[pre-commit.ci] auto fixes from pre-commit hooks
6-
autofix_prs: true
7-
autoupdate_branch: 'pre-commit-autoupdate'
8-
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
9-
autoupdate_schedule: monthly
10-
skip: [no-commit-to-branch]
11-
submodules: false
4+
autofix_commit_msg: |
5+
[pre-commit.ci] auto fixes from pre-commit hooks
6+
autofix_prs: true
7+
autoupdate_branch: "pre-commit-autoupdate"
8+
autoupdate_commit_msg: "[pre-commit.ci] pre-commit autoupdate"
9+
autoupdate_schedule: monthly
10+
skip: [no-commit-to-branch]
11+
submodules: false
1212
repos:
1313
- repo: https://github.com/pre-commit/pre-commit-hooks
1414
rev: v4.6.0
@@ -47,6 +47,6 @@ repos:
4747
- repo: https://github.com/codespell-project/codespell
4848
rev: v2.3.0
4949
hooks:
50-
- id: codespell
51-
additional_dependencies:
52-
- tomli
50+
- id: codespell
51+
additional_dependencies:
52+
- tomli

src/diffpy/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# See LICENSE.rst for license information.
1313
#
1414
##############################################################################
15-
1615
"""morph - tools for manipulating and comparing PDF data.
1716
1817
"""

src/diffpy/morph/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
# See LICENSE.rst for license information.
1313
#
1414
##############################################################################
15-
16-
"""Tools for manipulating and comparing PDF profiles"""
15+
"""Tools for manipulating and comparing PDF profiles."""
1716

1817
# key used when saving multiple morphs
1918
__save_morph_as__ = "save_morph_as"

src/diffpy/morph/log.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# See LICENSE.txt for license information.
1313
#
1414
##############################################################################
15-
1615
"""Configuration of loggers used in this package.
1716
1817
Logger instances:

src/diffpy/morph/morph_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555

5656
def morph_default_config(**kwargs):
57-
"""function to generate default morph configuration
57+
"""Function to generate default morph configuration.
5858
5959
Parameters
6060
----------
@@ -96,7 +96,7 @@ def morph(
9696
verbose=False,
9797
**kwargs,
9898
):
99-
"""function to perform PDF morphing.
99+
"""Function to perform PDF morphing.
100100
101101
Parameters
102102
----------

src/diffpy/morph/morph_helpers/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@
1010
# See LICENSE.txt for license information.
1111
#
1212
##############################################################################
13-
14-
"""List of helpers for certain morphing operations
15-
(currently only used for smear)."""
13+
"""List of helpers for certain morphing operations (currently only used for
14+
smear)."""
1615

1716
from diffpy.morph.morph_helpers.transformpdftordf import TransformXtalPDFtoRDF
1817
from diffpy.morph.morph_helpers.transformrdftopdf import TransformXtalRDFtoPDF

src/diffpy/morph/morph_helpers/transformpdftordf.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
# See LICENSE.txt for license information.
1313
#
1414
##############################################################################
15-
16-
17-
"""class TransformXtalPDFtoRDF -- Transform crystal PDFs to RDFs.
18-
"""
15+
"""Class TransformXtalPDFtoRDF -- Transform crystal PDFs to RDFs."""
1916

2017

2118
from diffpy.morph.morphs.morph import LABEL_GR, LABEL_RA, LABEL_RR, Morph
@@ -34,7 +31,6 @@ class TransformXtalPDFtoRDF(Morph):
3431
3532
With s = baselineslope,
3633
R(r) = r * (G(r) - r * s)
37-
3834
"""
3935

4036
# Define input output types

src/diffpy/morph/morph_helpers/transformrdftopdf.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
# See LICENSE.txt for license information.
1313
#
1414
##############################################################################
15-
16-
17-
"""class TransformXtalRDFtoPDF -- Transform crystal RDFs to PDFs.
18-
"""
15+
"""Class TransformXtalRDFtoPDF -- Transform crystal RDFs to PDFs."""
1916

2017

2118
import numpy
@@ -36,7 +33,6 @@ class TransformXtalRDFtoPDF(Morph):
3633
3734
With s = baselineslope,
3835
G(r) = R(r) / r + r * s
39-
4036
"""
4137

4238
# Define input output types

src/diffpy/morph/morph_io.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ def single_morph_output(
3434
verbose=False,
3535
stdout_flag=False,
3636
):
37-
"""Helper function for printing details about a single morph.
38-
Handles both printing to terminal and printing to a file.
37+
"""Helper function for printing details about a single morph. Handles both
38+
printing to terminal and printing to a file.
3939
4040
Parameters
4141
----------
@@ -136,9 +136,9 @@ def create_morphs_directory(save_directory):
136136

137137
def get_multisave_names(target_list: list, save_names_file=None, mm=False):
138138
"""Create or import a dictionary that specifies names to save morphs as.
139-
First attempt to import names from a specified file.
140-
If names for certain morphs not found, use default naming scheme:
141-
'Morph_with_Target_<target file name>.cgr'.
139+
First attempt to import names from a specified file. If names for certain
140+
morphs not found, use default naming scheme: 'Morph_with_Target_<target
141+
file name>.cgr'.
142142
143143
Used when saving multiple morphs.
144144

src/diffpy/morph/morphapp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ def __init__(self, *args, **kwargs):
4242
def custom_error(self, msg):
4343
"""custom_error(msg : string)
4444
45-
Print a message incorporating 'msg' to stderr and exit.
46-
Does not print usage.
45+
Print a message incorporating 'msg' to stderr and exit. Does
46+
not print usage.
4747
"""
4848
self.exit(2, "%s: error: %s\n" % (self.get_prog_name(), msg))
4949

src/diffpy/morph/morphs/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212
# See LICENSE.txt for license information.
1313
#
1414
##############################################################################
15-
16-
"""Definition of morphs.
17-
"""
15+
"""Definition of morphs."""
1816

1917

2018
from diffpy.morph.morphs.morph import Morph # noqa: F401

src/diffpy/morph/morphs/morph.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
# See LICENSE.txt for license information.
1313
#
1414
##############################################################################
15-
16-
1715
"""Morph -- base class for defining a morph.
1816
"""
1917

@@ -198,7 +196,7 @@ def checkConfig(self):
198196
return
199197

200198
def plotInputs(self, xylabels=True):
201-
"""Plot input arrays using matplotlib.pyplot
199+
"""Plot input arrays using matplotlib.pyplot.
202200
203201
Parameters
204202
----------
@@ -220,7 +218,7 @@ def plotInputs(self, xylabels=True):
220218
return rv
221219

222220
def plotOutputs(self, xylabels=True, **plotargs):
223-
"""Plot output arrays using matplotlib.pyplot
221+
"""Plot output arrays using matplotlib.pyplot.
224222
225223
Parameters
226224
----------

src/diffpy/morph/morphs/morphchain.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# See LICENSE.txt for license information.
1313
#
1414
##############################################################################
15-
1615
"""MorphChain -- Chain of morphs executed in order.
1716
"""
1817

src/diffpy/morph/morphs/morphfuncy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
class MorphFuncy(Morph):
55
"""Apply the user-supplied Python function to the y-coordinates of the
6-
morph data"""
6+
morph data."""
77

88
# Define input output types
99
summary = "Apply a Python function to the y-axis data"

src/diffpy/morph/morphs/morphishape.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,8 @@
1212
# See LICENSE.txt for license information.
1313
#
1414
##############################################################################
15-
16-
17-
"""class MorphISphere -- apply inverse spherical shape function
18-
class MorphISpheroid -- apply inverse spheroidal shape function
19-
"""
15+
"""Class MorphISphere -- apply inverse spherical shape function class
16+
MorphISpheroid -- apply inverse spheroidal shape function."""
2017

2118

2219
import numpy
@@ -26,7 +23,7 @@ class MorphISpheroid -- apply inverse spheroidal shape function
2623

2724

2825
class MorphISphere(Morph):
29-
"""Apply inverse spherical characteristic function to the morph
26+
"""Apply inverse spherical characteristic function to the morph.
3027
3128
Configuration Variables
3229
-----------------------
@@ -56,7 +53,7 @@ def morph(self, x_morph, y_morph, x_target, y_target):
5653

5754

5855
class MorphISpheroid(Morph):
59-
"""Apply inverse spherical characteristic function to the morph
56+
"""Apply inverse spherical characteristic function to the morph.
6057
6158
Configuration Variables
6259
-----------------------

src/diffpy/morph/morphs/morphresolution.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
# See LICENSE.txt for license information.
1313
#
1414
##############################################################################
15-
16-
17-
"""class MorphResolutionDamping -- apply resolution broadening to the morph
18-
"""
15+
"""Class MorphResolutionDamping -- apply resolution broadening to the morph."""
1916

2017

2118
import numpy

src/diffpy/morph/morphs/morphrgrid.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
# See LICENSE.txt for license information.
1313
#
1414
##############################################################################
15-
16-
17-
"""class MorphRGrid -- put morph and target on desired grid.
18-
"""
15+
"""Class MorphRGrid -- put morph and target on desired grid."""
1916

2017

2118
import numpy

src/diffpy/morph/morphs/morphscale.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
# See LICENSE.txt for license information.
1313
#
1414
##############################################################################
15-
16-
17-
"""class MorphScale -- scale the morph data
18-
"""
15+
"""Class MorphScale -- scale the morph data."""
1916

2017

2118
from diffpy.morph.morphs.morph import LABEL_GR, LABEL_RA, Morph

src/diffpy/morph/morphs/morphshape.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,8 @@
1212
# See LICENSE.txt for license information.
1313
#
1414
##############################################################################
15-
16-
17-
"""class MorphSphere -- apply a spherical shape function to the morph
18-
class MorphSpheroid -- apply a spheroidal shape function to the morph
19-
"""
15+
"""Class MorphSphere -- apply a spherical shape function to the morph class
16+
MorphSpheroid -- apply a spheroidal shape function to the morph."""
2017

2118

2219
import numpy
@@ -28,7 +25,7 @@ class MorphSpheroid -- apply a spheroidal shape function to the morph
2825

2926

3027
class MorphSphere(Morph):
31-
"""Apply a spherical characteristic function to the morph
28+
"""Apply a spherical characteristic function to the morph.
3229
3330
Configuration Variables
3431
-----------------------
@@ -56,7 +53,7 @@ def morph(self, x_morph, y_morph, x_target, y_target):
5653

5754

5855
class MorphSpheroid(Morph):
59-
"""Apply a spherical characteristic function to the morph
56+
"""Apply a spherical characteristic function to the morph.
6057
6158
Configuration Variables
6259
-----------------------
@@ -143,7 +140,6 @@ def _spheroidalCF2(r, psize, axrat):
143140
axrat -- The ratio of axis lengths
144141
145142
From Lei et al., Phys. Rev. B, 80, 024118 (2009)
146-
147143
"""
148144
pelpt = axrat
149145

src/diffpy/morph/morphs/morphshift.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
# See LICENSE.txt for license information.
1313
#
1414
##############################################################################
15-
16-
17-
"""class MorphShift -- shift the morph
18-
"""
15+
"""Class MorphShift -- shift the morph."""
1916

2017

2118
import numpy

0 commit comments

Comments
 (0)