diff --git a/.github/workflows/tests-on-pr.yml b/.github/workflows/tests-on-pr.yml index 8d0a909f..9d7879ea 100644 --- a/.github/workflows/tests-on-pr.yml +++ b/.github/workflows/tests-on-pr.yml @@ -1,15 +1,12 @@ name: Tests on PR on: - push: - branches: - - main pull_request: workflow_dispatch: jobs: tests-on-pr: - uses: Billingegroup/release-scripts/.github/workflows/_tests-on-pr.yml@v0 + uses: scikit-package/release-scripts/.github/workflows/_tests-on-pr.yml@v0 with: project: diffpy.morph c_extension: false diff --git a/.gitignore b/.gitignore index a25212ea..099e2948 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ __pycache__/ .Python env/ build/ +_build/ develop-eggs/ dist/ downloads/ @@ -90,10 +91,3 @@ target/ # Ipython Notebook .ipynb_checkpoints - -# version information -setup.cfg -/src/diffpy/*/version.cfg - -# Rever -rever/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 194374f9..0e4a84d1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -50,3 +50,17 @@ repos: - id: codespell additional_dependencies: - tomli + # prettier - multi formatter for .json, .yml, and .md files + - repo: https://github.com/pre-commit/mirrors-prettier + rev: f12edd9c7be1c20cfa42420fd0e6df71e42b51ea # frozen: v4.0.0-alpha.8 + hooks: + - id: prettier + additional_dependencies: + - "prettier@^3.2.4" + # docformatter - PEP 257 compliant docstring formatter + - repo: https://github.com/s-weigand/docformatter + rev: 5757c5190d95e5449f102ace83df92e7d3b06c6c + hooks: + - id: docformatter + additional_dependencies: [tomli] + args: [--in-place, --config, ./pyproject.toml] diff --git a/requirements/build.txt b/requirements/build.txt deleted file mode 100644 index f72d870d..00000000 --- a/requirements/build.txt +++ /dev/null @@ -1,2 +0,0 @@ -python -setuptools diff --git a/requirements/docs.txt b/requirements/docs.txt index ab17b1c8..5f34c6ed 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -1,4 +1,5 @@ sphinx sphinx_rtd_theme +sphinx-copybutton doctr m2r diff --git a/requirements/test.txt b/requirements/test.txt index f33bd0e3..a7277865 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -2,5 +2,5 @@ flake8 pytest codecov coverage -pytest-env pytest-cov +pytest-env diff --git a/src/diffpy/__init__.py b/src/diffpy/__init__.py index a14a0c96..a1bb822e 100644 --- a/src/diffpy/__init__.py +++ b/src/diffpy/__init__.py @@ -1,19 +1,18 @@ #!/usr/bin/env python ############################################################################## # -# (c) 2024 The Trustees of Columbia University in the City of New York. +# (c) 2025 The Trustees of Columbia University in the City of New York. # All rights reserved. # # File coded by: Billinge Group members and community contributors. # # See GitHub contributions for a more detailed list of contributors. -# https://github.com/diffpy/diffpy.pdfmorph/graphs/contributors +# https://github.com/diffpy/diffpy.morph/graphs/contributors # # See LICENSE.rst for license information. # ############################################################################## """morph - tools for manipulating and comparing PDF data. - """ diff --git a/src/diffpy/morph/__init__.py b/src/diffpy/morph/__init__.py index c87d5b6c..48455828 100644 --- a/src/diffpy/morph/__init__.py +++ b/src/diffpy/morph/__init__.py @@ -1,10 +1,10 @@ #!/usr/bin/env python ############################################################################## # -# (c) 2024 The Trustees of Columbia University in the City of New York. +# (c) 2025 The Trustees of Columbia University in the City of New York. # All rights reserved. # -# File coded by: Billinge Group members and community contributors. +# File coded by: Sangjoon Lee, Simon Billinge, Billinge Group members. # # See GitHub contributions for a more detailed list of contributors. # https://github.com/diffpy/diffpy.morph/graphs/contributors @@ -12,16 +12,15 @@ # See LICENSE.rst for license information. # ############################################################################## -"""Tools for manipulating and comparing PDF profiles.""" +"""Python package for manipulating and comparing PDF profiles.""" # key used when saving multiple morphs __save_morph_as__ = "save_morph_as" # package version -from diffpy.morph.version import __version__ +from diffpy.morph.version import __version__ # noqa # silence the pyflakes syntax checker assert __version__ or True - # End of file diff --git a/src/diffpy/morph/version.py b/src/diffpy/morph/version.py index effe3cd5..f40af37f 100644 --- a/src/diffpy/morph/version.py +++ b/src/diffpy/morph/version.py @@ -1,13 +1,13 @@ #!/usr/bin/env python ############################################################################## # -# (c) 2024 The Trustees of Columbia University in the City of New York. +# (c) 2025 The Trustees of Columbia University in the City of New York. # All rights reserved. # -# File coded by: Billinge Group members and community contributors. +# File coded by: Sangjoon Lee, Simon Billinge, Billinge Group members. # # See GitHub contributions for a more detailed list of contributors. -# https://github.com/diffpy/diffpy.pdfmorph/graphs/contributors +# https://github.com/diffpy/diffpy.morph/graphs/contributors # noqa: E501 # # See LICENSE.rst for license information. # diff --git a/tests/test_version.py b/tests/test_version.py index 38aa5669..68915adc 100644 --- a/tests/test_version.py +++ b/tests/test_version.py @@ -1,6 +1,6 @@ """Unit tests for __version__.py.""" -import diffpy.morph +import diffpy.morph # noqa def test_package_version():