Skip to content

Commit 26b7439

Browse files
authored
Merge pull request #113 from diffpy/migration
chore: bring code up to latest group standards
2 parents c35e9e5 + 75f570d commit 26b7439

File tree

232 files changed

+6520
-5491
lines changed

Some content is hidden

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

232 files changed

+6520
-5491
lines changed

.codecov.yml

Lines changed: 11 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,14 @@
1-
# codecov can find this file anywhere in the repo, so we don't need to clutter
2-
# the root folder.
3-
#comment: false
4-
5-
codecov:
6-
notify:
7-
require_ci_to_pass: no
8-
91
coverage:
102
status:
11-
patch:
3+
project: # more options at https://docs.codecov.com/docs/commit-status
124
default:
13-
target: '80'
14-
if_no_uploads: error
15-
if_not_found: success
16-
if_ci_failed: failure
17-
project:
18-
default: false
19-
library:
20-
target: auto
21-
if_no_uploads: error
22-
if_not_found: success
23-
if_ci_failed: failure
24-
paths: '!*/tests/.*'
25-
26-
tests:
27-
target: 97.9%
28-
paths: '*/tests/.*'
29-
30-
flags:
31-
tests:
32-
paths:
33-
- tests/
5+
target: auto # use the coverage from the base commit, fail if coverage is lower
6+
threshold: 0% # allow the coverage to drop by
7+
8+
comment:
9+
layout: " diff, flags, files"
10+
behavior: default
11+
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]
14+
hide_project_coverage: false # [true :: only show coverage on the git diff aka patch coverage]

.codespell/ignore_lines.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
;; Please include filenames and explanations for each ignored line.
2+
;; See https://docs.openverse.org/meta/codespell.html for docs.

.codespell/ignore_words.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
;; Please include explanations for each ignored word (lowercase).
2+
;; See https://docs.openverse.org/meta/codespell.html for docs.
3+
4+
;; abbreviation for "materials" often used in a journal title
5+
mater
6+
7+
;; Frobenius norm used in np.linalg.norm
8+
fro
9+
10+
;; nin is a legit variable in builder
11+
nin
12+
13+
;; highT is used for high Temperature in examples/debymodelII
14+
highT

.coveragerc

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

.flake8

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# As of now, flake8 does not natively support configuration via pyproject.toml
2+
# https://github.com/microsoft/vscode-flake8/issues/135
3+
[flake8]
4+
exclude =
5+
.git,
6+
__pycache__,
7+
build,
8+
dist,
9+
doc/source/conf.py
10+
max-line-length = 79
11+
# Ignore some style 'errors' produced while formatting by 'black'
12+
# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#labels-why-pycodestyle-warnings
13+
extend-ignore = E203

.gitarchive.cfg

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

.gitattributes

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

.github/ISSUE_TEMPLATE/bug_feature.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: Bug Report or Feature Request
3+
about: Report a bug or suggest a new feature!
4+
title: ""
5+
labels: ""
6+
assignees: ""
7+
---
8+
9+
### Problem
10+
11+
<!--
12+
For a bug report, please copy and paste any error messages from the application or command-line here.
13+
For a feature request, please state how the new functionality could benefit the community.
14+
-->
15+
16+
### Proposed solution
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
name: Release
3+
about: Checklist and communication channel for PyPI and GitHub release
4+
title: "Ready for <version-number> PyPI/GitHub release"
5+
labels: "release"
6+
assignees: ""
7+
---
8+
9+
### PyPI/GitHub rc-release preparation checklist:
10+
11+
- [ ] All PRs/issues attached to the release are merged.
12+
- [ ] All the badges on the README are passing.
13+
- [ ] License information is verified as correct. If you are unsure, please comment below.
14+
- [ ] 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 the website are updated.
17+
- [ ] Successfully run any tutorial examples or do functional testing with the latest Python version.
18+
- [ ] 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.
20+
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:
22+
23+
### PyPI/GitHub full-release preparation checklist:
24+
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.
29+
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.
37+
- [ ] New package dependencies listed in `conda.txt` and `test.txt` are added to `meta.yaml` in the feedstock.
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.
40+
41+
### Post-release checklist
42+
43+
<!-- Before closing this issue, please complete the following: -->
44+
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+
-->
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Release (GitHub/PyPI) and Deploy Docs
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- "*" # Trigger on all tags initially, but tag and release privilege are verified in _build-wheel-release-upload.yml
8+
9+
jobs:
10+
release:
11+
uses: scikit-package/release-scripts/.github/workflows/_build-wheel-release-upload.yml@v0
12+
with:
13+
project: diffpy.srfit
14+
c_extension: false
15+
maintainer_GITHUB_username: sbillinge
16+
secrets:
17+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
18+
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Check for News
2+
3+
on:
4+
pull_request_target:
5+
branches:
6+
- main
7+
8+
jobs:
9+
check-news-item:
10+
uses: scikit-package/release-scripts/.github/workflows/_check-news-item.yml@v0
11+
with:
12+
project: diffpy.srfit
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
release:
8+
types:
9+
- prereleased
10+
- published
11+
workflow_dispatch:
12+
13+
jobs:
14+
matrix-coverage:
15+
uses: scikit-package/release-scripts/.github/workflows/_matrix-and-codecov-on-merge-to-main.yml@v0
16+
with:
17+
project: diffpy.srfit
18+
c_extension: false
19+
headless: false
20+
secrets:
21+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
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.srfit
11+
c_extension: false
12+
headless: false

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Tests on PR
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
jobs:
8+
tests-on-pr:
9+
uses: scikit-package/release-scripts/.github/workflows/_tests-on-pr.yml@v0
10+
with:
11+
project: diffpy.srfit
12+
c_extension: false
13+
headless: false
14+
secrets:
15+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.gitignore

Lines changed: 69 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,93 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
13
*.py[cod]
4+
*$py.class
25

36
# C extensions
47
*.so
58

6-
# Packages
7-
*.egg
8-
*.egg-info
9-
dist
10-
build
11-
eggs
12-
parts
13-
bin
14-
var
15-
sdist
16-
temp
17-
develop-eggs
9+
# Distribution / packaging
10+
.Python
11+
env/
12+
build/
13+
_build/
14+
develop-eggs/
15+
dist/
16+
downloads/
17+
eggs/
18+
.eggs/
19+
lib/
20+
lib64/
21+
parts/
22+
sdist/
23+
var/
24+
venv/
25+
*.egg-info/
1826
.installed.cfg
19-
lib
20-
lib64
21-
tags
27+
*.egg
28+
bin/
29+
temp/
30+
tags/
2231
errors.err
2332

33+
# PyInstaller
34+
# Usually these files are written by a python script from a template
35+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
36+
*.manifest
37+
*.spec
38+
2439
# Installer logs
2540
pip-log.txt
41+
pip-delete-this-directory.txt
2642
MANIFEST
2743

2844
# Unit test / coverage reports
45+
htmlcov/
46+
.tox/
2947
.coverage
30-
.tox
48+
.coverage.*
49+
.cache
3150
nosetests.xml
51+
coverage.xml
52+
*,cover
53+
.hypothesis/
3254

3355
# Translations
3456
*.mo
57+
*.pot
3558

3659
# Mr Developer
3760
.mr.developer.cfg
3861
.project
3962
.pydevproject
40-
.settings
4163

42-
# version information
43-
setup.cfg
44-
/src/diffpy/*/version.cfg
64+
# Django stuff:
65+
*.log
66+
67+
# Sphinx documentation
68+
docs/build/
69+
docs/source/generated/
70+
71+
# pytest
72+
.pytest_cache/
73+
74+
# PyBuilder
75+
target/
76+
77+
# Editor files
78+
# mac
79+
.DS_Store
80+
*~
81+
82+
# vim
83+
*.swp
84+
*.swo
85+
86+
# pycharm
87+
.idea/
88+
89+
# VSCode
90+
.vscode/
91+
92+
# Ipython Notebook
93+
.ipynb_checkpoints

.isort.cfg

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

0 commit comments

Comments
 (0)