Skip to content

Commit fcbe82c

Browse files
authored
Merge pull request #201 from zmx27/setup-CI
skpkg: setup CI after migrating tests, src, requirements, and .github folder
2 parents 542b1d6 + b3b1866 commit fcbe82c

File tree

10 files changed

+28
-26
lines changed

10 files changed

+28
-26
lines changed

.github/workflows/tests-on-pr.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
name: Tests on PR
22

33
on:
4-
push:
5-
branches:
6-
- main
74
pull_request:
85
workflow_dispatch:
96

107
jobs:
118
tests-on-pr:
12-
uses: Billingegroup/release-scripts/.github/workflows/_tests-on-pr.yml@v0
9+
uses: scikit-package/release-scripts/.github/workflows/_tests-on-pr.yml@v0
1310
with:
1411
project: diffpy.morph
1512
c_extension: false

.gitignore

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ __pycache__/
1010
.Python
1111
env/
1212
build/
13+
_build/
1314
develop-eggs/
1415
dist/
1516
downloads/
@@ -90,10 +91,3 @@ target/
9091

9192
# Ipython Notebook
9293
.ipynb_checkpoints
93-
94-
# version information
95-
setup.cfg
96-
/src/diffpy/*/version.cfg
97-
98-
# Rever
99-
rever/

.pre-commit-config.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,17 @@ repos:
5050
- id: codespell
5151
additional_dependencies:
5252
- tomli
53+
# prettier - multi formatter for .json, .yml, and .md files
54+
- repo: https://github.com/pre-commit/mirrors-prettier
55+
rev: f12edd9c7be1c20cfa42420fd0e6df71e42b51ea # frozen: v4.0.0-alpha.8
56+
hooks:
57+
- id: prettier
58+
additional_dependencies:
59+
- "prettier@^3.2.4"
60+
# docformatter - PEP 257 compliant docstring formatter
61+
- repo: https://github.com/s-weigand/docformatter
62+
rev: 5757c5190d95e5449f102ace83df92e7d3b06c6c
63+
hooks:
64+
- id: docformatter
65+
additional_dependencies: [tomli]
66+
args: [--in-place, --config, ./pyproject.toml]

requirements/build.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

requirements/docs.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
sphinx
22
sphinx_rtd_theme
3+
sphinx-copybutton
34
doctr
45
m2r

requirements/test.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ flake8
22
pytest
33
codecov
44
coverage
5-
pytest-env
65
pytest-cov
6+
pytest-env

src/diffpy/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
#!/usr/bin/env python
22
##############################################################################
33
#
4-
# (c) 2024 The Trustees of Columbia University in the City of New York.
4+
# (c) 2025 The Trustees of Columbia University in the City of New York.
55
# All rights reserved.
66
#
77
# File coded by: Billinge Group members and community contributors.
88
#
99
# See GitHub contributions for a more detailed list of contributors.
10-
# https://github.com/diffpy/diffpy.pdfmorph/graphs/contributors
10+
# https://github.com/diffpy/diffpy.morph/graphs/contributors
1111
#
1212
# See LICENSE.rst for license information.
1313
#
1414
##############################################################################
1515
"""morph - tools for manipulating and comparing PDF data.
16-
1716
"""
1817

1918

src/diffpy/morph/__init__.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
11
#!/usr/bin/env python
22
##############################################################################
33
#
4-
# (c) 2024 The Trustees of Columbia University in the City of New York.
4+
# (c) 2025 The Trustees of Columbia University in the City of New York.
55
# All rights reserved.
66
#
7-
# File coded by: Billinge Group members and community contributors.
7+
# File coded by: Sangjoon Lee, Simon Billinge, Billinge Group members.
88
#
99
# See GitHub contributions for a more detailed list of contributors.
1010
# https://github.com/diffpy/diffpy.morph/graphs/contributors
1111
#
1212
# See LICENSE.rst for license information.
1313
#
1414
##############################################################################
15-
"""Tools for manipulating and comparing PDF profiles."""
15+
"""Python package for manipulating and comparing PDF profiles."""
1616

1717
# key used when saving multiple morphs
1818
__save_morph_as__ = "save_morph_as"
1919

2020
# package version
21-
from diffpy.morph.version import __version__
21+
from diffpy.morph.version import __version__ # noqa
2222

2323
# silence the pyflakes syntax checker
2424
assert __version__ or True
2525

26-
2726
# End of file

src/diffpy/morph/version.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/usr/bin/env python
22
##############################################################################
33
#
4-
# (c) 2024 The Trustees of Columbia University in the City of New York.
4+
# (c) 2025 The Trustees of Columbia University in the City of New York.
55
# All rights reserved.
66
#
7-
# File coded by: Billinge Group members and community contributors.
7+
# File coded by: Sangjoon Lee, Simon Billinge, Billinge Group members.
88
#
99
# See GitHub contributions for a more detailed list of contributors.
10-
# https://github.com/diffpy/diffpy.pdfmorph/graphs/contributors
10+
# https://github.com/diffpy/diffpy.morph/graphs/contributors # noqa: E501
1111
#
1212
# See LICENSE.rst for license information.
1313
#

tests/test_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Unit tests for __version__.py."""
22

3-
import diffpy.morph
3+
import diffpy.morph # noqa
44

55

66
def test_package_version():

0 commit comments

Comments
 (0)