Skip to content

chore: pre-commit auto fixes from prettier #200

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
Jun 10, 2025
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
8 changes: 4 additions & 4 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
coverage:
status:
project: # more options at https://docs.codecov.com/docs/commit-status
project: # more options at https://docs.codecov.com/docs/commit-status
default:
target: auto # use the coverage from the base commit, fail if coverage is lower
threshold: 0% # allow the coverage to drop by
threshold: 0% # allow the coverage to drop by

comment:
layout: " diff, flags, files"
behavior: default
require_changes: false
require_base: false # [true :: must have a base report to post]
require_head: false # [true :: must have a head report to post]
require_base: false # [true :: must have a base report to post]
require_head: false # [true :: must have a head report to post]
hide_project_coverage: false # [true :: only show coverage on the git diff aka patch coverage]
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/release_checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ assignees: ""
- [ ] All the badges on the README are passing.
- [ ] License information is verified as correct. If you are unsure, please comment below.
- [ ] Locally rendered documentation contains all appropriate pages, including API references (check no modules are
missing), tutorials, and other human written text is up-to-date with any changes in the code.
missing), tutorials, and other human written text is up-to-date with any changes in the code.
- [ ] Installation instructions in the README, documentation and on the website (e.g., diffpy.org) are updated.
- [ ] Successfully run any tutorial examples or do functional testing with the latest Python version.
- [ ] Grammar and writing quality are checked (no typos).
Expand All @@ -31,5 +31,5 @@ version information and details about the pre-release here:

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

- [ ] Run tutorial examples and conduct functional testing using the installation guide in the README. Attach screenshots/results as comments.
- [ ] Documentation (README, tutorials, API references, and websites) is deployed without broken links or missing figures.
- [ ] Run tutorial examples and conduct functional testing using the installation guide in the README. Attach screenshots/results as comments.
- [ ] Documentation (README, tutorials, API references, and websites) is deployed without broken links or missing figures.
2 changes: 1 addition & 1 deletion .github/workflows/build-wheel-release-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
push:
tags:
- '*' # Trigger on all tags initially, but tag and release privilege are verified in _build-wheel-release-upload.yml
- "*" # Trigger on all tags initially, but tag and release privilege are verified in _build-wheel-release-upload.yml

jobs:
release:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-news-item.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Check for News
on:
pull_request_target:
branches:
- main
- main

jobs:
check-news-item:
Expand Down
24 changes: 12 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
default_language_version:
python: python3
python: python3
ci:
autofix_commit_msg: |
[pre-commit.ci] auto fixes from pre-commit hooks
autofix_prs: true
autoupdate_branch: 'pre-commit-autoupdate'
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
autoupdate_schedule: monthly
skip: [no-commit-to-branch]
submodules: false
autofix_commit_msg: |
[pre-commit.ci] auto fixes from pre-commit hooks
autofix_prs: true
autoupdate_branch: "pre-commit-autoupdate"
autoupdate_commit_msg: "[pre-commit.ci] pre-commit autoupdate"
autoupdate_schedule: monthly
skip: [no-commit-to-branch]
submodules: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
Expand Down Expand Up @@ -47,6 +47,6 @@ repos:
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
additional_dependencies:
- tomli
- id: codespell
additional_dependencies:
- tomli
1 change: 0 additions & 1 deletion src/diffpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See LICENSE.rst for license information.
#
##############################################################################

"""morph - tools for manipulating and comparing PDF data.

"""
Expand Down
3 changes: 1 addition & 2 deletions src/diffpy/morph/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
# See LICENSE.rst for license information.
#
##############################################################################

"""Tools for manipulating and comparing PDF profiles"""
"""Tools for manipulating and comparing PDF profiles."""

# key used when saving multiple morphs
__save_morph_as__ = "save_morph_as"
Expand Down
1 change: 0 additions & 1 deletion src/diffpy/morph/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See LICENSE.txt for license information.
#
##############################################################################

"""Configuration of loggers used in this package.

Logger instances:
Expand Down
4 changes: 2 additions & 2 deletions src/diffpy/morph/morph_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@


def morph_default_config(**kwargs):
"""function to generate default morph configuration
"""Function to generate default morph configuration.

Parameters
----------
Expand Down Expand Up @@ -96,7 +96,7 @@ def morph(
verbose=False,
**kwargs,
):
"""function to perform PDF morphing.
"""Function to perform PDF morphing.

Parameters
----------
Expand Down
5 changes: 2 additions & 3 deletions src/diffpy/morph/morph_helpers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
# See LICENSE.txt for license information.
#
##############################################################################

"""List of helpers for certain morphing operations
(currently only used for smear)."""
"""List of helpers for certain morphing operations (currently only used for
smear)."""

from diffpy.morph.morph_helpers.transformpdftordf import TransformXtalPDFtoRDF
from diffpy.morph.morph_helpers.transformrdftopdf import TransformXtalRDFtoPDF
Expand Down
6 changes: 1 addition & 5 deletions src/diffpy/morph/morph_helpers/transformpdftordf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
# See LICENSE.txt for license information.
#
##############################################################################


"""class TransformXtalPDFtoRDF -- Transform crystal PDFs to RDFs.
"""
"""Class TransformXtalPDFtoRDF -- Transform crystal PDFs to RDFs."""


from diffpy.morph.morphs.morph import LABEL_GR, LABEL_RA, LABEL_RR, Morph
Expand All @@ -34,7 +31,6 @@ class TransformXtalPDFtoRDF(Morph):

With s = baselineslope,
R(r) = r * (G(r) - r * s)

"""

# Define input output types
Expand Down
6 changes: 1 addition & 5 deletions src/diffpy/morph/morph_helpers/transformrdftopdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
# See LICENSE.txt for license information.
#
##############################################################################


"""class TransformXtalRDFtoPDF -- Transform crystal RDFs to PDFs.
"""
"""Class TransformXtalRDFtoPDF -- Transform crystal RDFs to PDFs."""


import numpy
Expand All @@ -36,7 +33,6 @@ class TransformXtalRDFtoPDF(Morph):

With s = baselineslope,
G(r) = R(r) / r + r * s

"""

# Define input output types
Expand Down
10 changes: 5 additions & 5 deletions src/diffpy/morph/morph_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ def single_morph_output(
verbose=False,
stdout_flag=False,
):
"""Helper function for printing details about a single morph.
Handles both printing to terminal and printing to a file.
"""Helper function for printing details about a single morph. Handles both
printing to terminal and printing to a file.

Parameters
----------
Expand Down Expand Up @@ -136,9 +136,9 @@ def create_morphs_directory(save_directory):

def get_multisave_names(target_list: list, save_names_file=None, mm=False):
"""Create or import a dictionary that specifies names to save morphs as.
First attempt to import names from a specified file.
If names for certain morphs not found, use default naming scheme:
'Morph_with_Target_<target file name>.cgr'.
First attempt to import names from a specified file. If names for certain
morphs not found, use default naming scheme: 'Morph_with_Target_<target
file name>.cgr'.

Used when saving multiple morphs.

Expand Down
4 changes: 2 additions & 2 deletions src/diffpy/morph/morphapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def __init__(self, *args, **kwargs):
def custom_error(self, msg):
"""custom_error(msg : string)

Print a message incorporating 'msg' to stderr and exit.
Does not print usage.
Print a message incorporating 'msg' to stderr and exit. Does
not print usage.
"""
self.exit(2, "%s: error: %s\n" % (self.get_prog_name(), msg))

Expand Down
4 changes: 1 addition & 3 deletions src/diffpy/morph/morphs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
# See LICENSE.txt for license information.
#
##############################################################################

"""Definition of morphs.
"""
"""Definition of morphs."""


from diffpy.morph.morphs.morph import Morph # noqa: F401
Expand Down
6 changes: 2 additions & 4 deletions src/diffpy/morph/morphs/morph.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
# See LICENSE.txt for license information.
#
##############################################################################


"""Morph -- base class for defining a morph.
"""

Expand Down Expand Up @@ -198,7 +196,7 @@ def checkConfig(self):
return

def plotInputs(self, xylabels=True):
"""Plot input arrays using matplotlib.pyplot
"""Plot input arrays using matplotlib.pyplot.

Parameters
----------
Expand All @@ -220,7 +218,7 @@ def plotInputs(self, xylabels=True):
return rv

def plotOutputs(self, xylabels=True, **plotargs):
"""Plot output arrays using matplotlib.pyplot
"""Plot output arrays using matplotlib.pyplot.

Parameters
----------
Expand Down
1 change: 0 additions & 1 deletion src/diffpy/morph/morphs/morphchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See LICENSE.txt for license information.
#
##############################################################################

"""MorphChain -- Chain of morphs executed in order.
"""

Expand Down
2 changes: 1 addition & 1 deletion src/diffpy/morph/morphs/morphfuncy.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

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

# Define input output types
summary = "Apply a Python function to the y-axis data"
Expand Down
11 changes: 4 additions & 7 deletions src/diffpy/morph/morphs/morphishape.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@
# See LICENSE.txt for license information.
#
##############################################################################


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


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


class MorphISphere(Morph):
"""Apply inverse spherical characteristic function to the morph
"""Apply inverse spherical characteristic function to the morph.

Configuration Variables
-----------------------
Expand Down Expand Up @@ -56,7 +53,7 @@ def morph(self, x_morph, y_morph, x_target, y_target):


class MorphISpheroid(Morph):
"""Apply inverse spherical characteristic function to the morph
"""Apply inverse spherical characteristic function to the morph.

Configuration Variables
-----------------------
Expand Down
5 changes: 1 addition & 4 deletions src/diffpy/morph/morphs/morphresolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
# See LICENSE.txt for license information.
#
##############################################################################


"""class MorphResolutionDamping -- apply resolution broadening to the morph
"""
"""Class MorphResolutionDamping -- apply resolution broadening to the morph."""


import numpy
Expand Down
5 changes: 1 addition & 4 deletions src/diffpy/morph/morphs/morphrgrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
# See LICENSE.txt for license information.
#
##############################################################################


"""class MorphRGrid -- put morph and target on desired grid.
"""
"""Class MorphRGrid -- put morph and target on desired grid."""


import numpy
Expand Down
5 changes: 1 addition & 4 deletions src/diffpy/morph/morphs/morphscale.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
# See LICENSE.txt for license information.
#
##############################################################################


"""class MorphScale -- scale the morph data
"""
"""Class MorphScale -- scale the morph data."""


from diffpy.morph.morphs.morph import LABEL_GR, LABEL_RA, Morph
Expand Down
12 changes: 4 additions & 8 deletions src/diffpy/morph/morphs/morphshape.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@
# See LICENSE.txt for license information.
#
##############################################################################


"""class MorphSphere -- apply a spherical shape function to the morph
class MorphSpheroid -- apply a spheroidal shape function to the morph
"""
"""Class MorphSphere -- apply a spherical shape function to the morph class
MorphSpheroid -- apply a spheroidal shape function to the morph."""


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


class MorphSphere(Morph):
"""Apply a spherical characteristic function to the morph
"""Apply a spherical characteristic function to the morph.

Configuration Variables
-----------------------
Expand Down Expand Up @@ -56,7 +53,7 @@ def morph(self, x_morph, y_morph, x_target, y_target):


class MorphSpheroid(Morph):
"""Apply a spherical characteristic function to the morph
"""Apply a spherical characteristic function to the morph.

Configuration Variables
-----------------------
Expand Down Expand Up @@ -143,7 +140,6 @@ def _spheroidalCF2(r, psize, axrat):
axrat -- The ratio of axis lengths

From Lei et al., Phys. Rev. B, 80, 024118 (2009)

"""
pelpt = axrat

Expand Down
5 changes: 1 addition & 4 deletions src/diffpy/morph/morphs/morphshift.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
# See LICENSE.txt for license information.
#
##############################################################################


"""class MorphShift -- shift the morph
"""
"""Class MorphShift -- shift the morph."""


import numpy
Expand Down
Loading