Skip to content

Commit 3af38ad

Browse files
sbillingezmx27pre-commit-ci[bot]
authored
Migration into main (#154)
* skpkg: setup CI after migrating tests, src, requirements, and .github folder (#151) * skpkg: migrate src folder * skpkg: migrate tests folder * skpkg: list dependencies in requirements folder * skpkg: add CI and issue/PR templates * skpkg: add pyproject.toml * skpkg: standardize files by removing examples and adding back necessary scripts * skpkg: modify copyright years and contributors in a missed file * style: changed line length to 115 and ran pre-commit again * fix: testing if adding .github/workflow will pass CI * [pre-commit.ci] auto fixes from pre-commit hooks --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * skpkg: add configuration files for pre-commit, readthedocs, codecov (#152) * skpkg: add config files for pre-commit * skpkg: add config files readthedocs, codecov, GitHub * style: remove stashed change indicators and modify code of conducts to pass pre-commit * skpkg: migrate documentation, README, and public static files (#153) * skpkg: migrate documentation * skpkg: add config files for authors, changelog, code of conduct, license * skpkg: add README.rst * skpkg: add news files * chore: add back necessary lines from the files * chore: fix files according to comments in the review --------- Co-authored-by: zmx27 <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 31c23a0 commit 3af38ad

39 files changed

+728
-155
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]

.codespell/ignore_words.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,5 @@
44
;; abbreviation for "materials" often used in a journal title
55
mater
66

7-
;; alternative use of socioeconomic
8-
socio-economic
9-
107
;; Frobenius norm used in np.linalg.norm
118
fro

.flake8

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# As of now, flake8 does not natively support configuration via pyproject.toml
2+
# https://github.com/microsoft/vscode-flake8/issues/135
13
[flake8]
24
exclude =
35
.git,

.github/ISSUE_TEMPLATE/release_checklist.md

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,41 @@ labels: "release"
66
assignees: ""
77
---
88

9-
### PyPI/GitHub release checklist:
9+
### PyPI/GitHub rc-release preparation checklist:
1010

1111
- [ ] All PRs/issues attached to the release are merged.
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.
16-
- [ ] Installation instructions in the README, documentation and on the website (e.g., diffpy.org) are updated.
15+
missing), tutorials, and other human-written text is up-to-date with any changes in the code.
16+
- [ ] Installation instructions in the README, documentation, and the website 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).
19+
- [ ] Install `pip install build twine`, run `python -m build` and `twine check dist/*` to ensure that the package can be built and is correctly formatted for PyPI release.
1920

20-
Please mention @sbillinge here when you are ready for PyPI/GitHub release. Include any additional comments necessary, such as
21-
version information and details about the pre-release here:
21+
Please tag the maintainer (e.g., @username) in the comment here when you are ready for the PyPI/GitHub release. Include any additional comments necessary, such as version information and details about the pre-release here:
2222

23-
### conda-forge release checklist:
23+
### PyPI/GitHub full-release preparation checklist:
2424

25-
<!-- After @sbillinge releases the PyPI package, please check the following when creating a PR for conda-forge release.-->
25+
- [ ] Create a new conda environment and install the rc from PyPI (`pip install <package-name>==??`)
26+
- [ ] License information on PyPI is correct.
27+
- [ ] Docs are deployed successfully to `https://<github-username-or-orgname>/<package-name>`.
28+
- [ ] Successfully run all tests, tutorial examples or do functional testing.
2629

30+
Please let the maintainer know that all checks are done and the package is ready for full release.
31+
32+
### conda-forge release preparation checklist:
33+
34+
<!-- After the maintainer releases the PyPI package, please check the following when creating a PR for conda-forge release.-->
35+
36+
- [ ] Ensure that the full release has appeared on PyPI successfully.
2737
- [ ] New package dependencies listed in `conda.txt` and `test.txt` are added to `meta.yaml` in the feedstock.
28-
- [ ] All relevant issues in the feedstock are addressed in the release PR.
38+
- [ ] Close any open issues on the feedstock. Reach out to the maintainer if you have questions.
39+
- [ ] Tag the maintainer for conda-forge release.
2940

3041
### Post-release checklist
3142

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

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.
45+
- [ ] Run tutorial examples and conduct functional testing using the installation guide in the README. Attach screenshots/results as comments.
46+
- [ ] Documentation (README, tutorials, API references, and websites) is deployed without broken links or missing figures.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
### What problem does this PR address?
2+
3+
<!-- Provide a brief overview and link to the issue. Attach outputs, including screenshots (before/after), if helpful for the reviewer. -->
4+
5+
### What should the reviewer(s) do?
6+
7+
<!-- Merge the code, provide feedback, initiate a discussion, etc. -->
8+
9+
<!--
10+
Use the following checklist items when applicable (select only what applies):
11+
- [ ] This PR introduces a public-facing change (e.g., figures, CLI input/output, API).
12+
- [ ] Documentation (e.g., tutorials, examples, README) has been updated.
13+
- [ ] A tracking issue or plan to update documentation exists.
14+
- [ ] This PR affects internal functionality only (no user-facing change).
15+
-->

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ 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:
11-
uses: Billingegroup/release-scripts/.github/workflows/_build-wheel-release-upload.yml@v0
11+
uses: scikit-package/release-scripts/.github/workflows/_build-wheel-release-upload.yml@v0
1212
with:
1313
project: diffpy.snmf
14+
c_extension: false
15+
maintainer_GITHUB_username: sbillinge
1416
secrets:
1517
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
1618
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: Check for News
33
on:
44
pull_request_target:
55
branches:
6-
- main
6+
- main
77

88
jobs:
9-
build:
10-
uses: Billingegroup/release-scripts/.github/workflows/_check-news-item.yml@v0
9+
check-news-item:
10+
uses: scikit-package/release-scripts/.github/workflows/_check-news-item.yml@v0
1111
with:
1212
project: diffpy.snmf

.github/workflows/matrix-and-codecov-on-merge-to-main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ on:
1111
workflow_dispatch:
1212

1313
jobs:
14-
coverage:
15-
uses: Billingegroup/release-scripts/.github/workflows/_matrix-and-codecov-on-merge-to-main.yml@v0
14+
matrix-coverage:
15+
uses: scikit-package/release-scripts/.github/workflows/_matrix-and-codecov-on-merge-to-main.yml@v0
1616
with:
1717
project: diffpy.snmf
1818
c_extension: false
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Deploy Documentation on Release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
docs:
8+
uses: scikit-package/release-scripts/.github/workflows/_publish-docs-on-release.yml@v0
9+
with:
10+
project: diffpy.snmf
11+
c_extension: false
12+
headless: false

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

Lines changed: 2 additions & 5 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:
11-
validate:
12-
uses: Billingegroup/release-scripts/.github/workflows/_tests-on-pr.yml@v0
8+
tests-on-pr:
9+
uses: scikit-package/release-scripts/.github/workflows/_tests-on-pr.yml@v0
1310
with:
1411
project: diffpy.snmf
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/

.isort.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[settings]
2-
line_length = 115
2+
# Keep import statement below line_length character limit
3+
line_length = 79
34
multi_line_output = 3
45
include_trailing_comma = True

.pre-commit-config.yaml

Lines changed: 26 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,20 @@ 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
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]

.readthedocs.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
3+
build:
4+
os: "ubuntu-22.04"
5+
tools:
6+
python: "latest"
7+
8+
python:
9+
install:
10+
- requirements: requirements/docs.txt
11+
12+
sphinx:
13+
configuration: doc/source/conf.py

CHANGELOG.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
=============
2-
Release Notes
2+
Release notes
33
=============
44

55
.. current developments

CODE_OF_CONDUCT.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Our Pledge
88
We as members, contributors, and leaders pledge to make participation in our
99
community a harassment-free experience for everyone, regardless of age, body
1010
size, visible or invisible disability, ethnicity, sex characteristics, gender
11-
identity and expression, level of experience, education, socio-economic status,
11+
identity and expression, level of experience, education, socioeconomic status,
1212
nationality, personal appearance, race, caste, color, religion, or sexual
1313
identity and orientation.
1414

LICENSE.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
BSD 3-Clause License
22

3-
Copyright (c) 2023-2024, The Trustees of Columbia University
4-
in the City of New York.
3+
Copyright (c) 2023-2025, The Trustees of Columbia University in the City of New York.
54
All rights reserved.
65

76
Redistribution and use in source and binary forms, with or without

README.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
:target: https://diffpy.github.io/diffpy.snmf
99
:height: 100px
1010

11-
|PyPi| |Forge| |PythonVersion| |PR|
11+
|PyPI| |Forge| |PythonVersion| |PR|
1212

1313
|CI| |Codecov| |Black| |Tracking|
1414

@@ -26,7 +26,7 @@
2626

2727
.. |PR| image:: https://img.shields.io/badge/PR-Welcome-29ab47ff
2828

29-
.. |PyPi| image:: https://img.shields.io/pypi/v/diffpy.snmf
29+
.. |PyPI| image:: https://img.shields.io/pypi/v/diffpy.snmf
3030
:target: https://pypi.org/project/diffpy.snmf/
3131

3232
.. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/diffpy.snmf
@@ -132,4 +132,9 @@ Before contributing, please read our `Code of Conduct <https://github.com/diffpy
132132
Contact
133133
-------
134134

135-
For more information on diffpy.snmf please visit the project `web-page <https://diffpy.github.io/>`_ or email Prof. Simon Billinge at [email protected].
135+
For more information on diffpy.snmf please visit the project `web-page <https://diffpy.github.io/>`_ or email Simon J.L. Billinge group at [email protected].
136+
137+
Acknowledgements
138+
----------------
139+
140+
``diffpy.snmf`` is built and maintained with `scikit-package <https://scikit-package.github.io/scikit-package/>`_.

0 commit comments

Comments
 (0)