From b8cebbf9573605ea7a512be8ac6581d94a557b0f Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Wed, 6 Nov 2024 10:45:03 -0500 Subject: [PATCH 01/13] codespell on pre-commit --- .pre-commit-config.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3070e19..9cf0556 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -44,3 +44,9 @@ repos: name: Prevent Commit to Main Branch args: ["--branch", "main"] stages: [pre-commit] + - repo: https://github.com/codespell-project/codespell + rev: v2.3.0 + hooks: + - id: codespell + additional_dependencies: + - tomli From 23ffdac60c30b653efb850d3570a509a279399ca Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Wed, 6 Nov 2024 10:52:34 -0500 Subject: [PATCH 02/13] codespell edits for pyproject file --- pyproject.toml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7c036d1..1addf95 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,16 +25,13 @@ classifiers = [ 'Operating System :: Microsoft :: Windows', 'Operating System :: POSIX', 'Operating System :: Unix', - 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', 'Topic :: Scientific/Engineering :: Physics', 'Topic :: Scientific/Engineering :: Chemistry', ] -[project.scripts] -fourigui = "diffpy.fourigui.fourigui:main" - [project.urls] Homepage = "https://github.com/diffpy/diffpy.fourigui/" Issues = "https://github.com/diffpy/diffpy.fourigui/issues/" @@ -54,6 +51,11 @@ namespaces = false # to disable scanning PEP 420 namespaces (true by default) [tool.setuptools.dynamic] dependencies = {file = ["requirements/pip.txt"]} +[tool.codespell] +exclude-file = ".codespell/ignore_lines.txt" +ignore-words = ".codespell/ignore_words.txt" +skip = "*.cif,*.dat" + [tool.black] line-length = 115 include = '\.pyi?$' From 7c40ceed27784d6b8f6c0b9acdcf39174f2b8223 Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Wed, 6 Nov 2024 10:53:56 -0500 Subject: [PATCH 03/13] minor fix on pyproject file --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 1addf95..cf89087 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,6 +32,9 @@ classifiers = [ 'Topic :: Scientific/Engineering :: Chemistry', ] +[project.scripts] +fourigui = "diffpy.fourigui.fourigui:main" + [project.urls] Homepage = "https://github.com/diffpy/diffpy.fourigui/" Issues = "https://github.com/diffpy/diffpy.fourigui/issues/" From 1c98db4f6a986049e396681c53446479ec5cc5e0 Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Wed, 6 Nov 2024 10:58:59 -0500 Subject: [PATCH 04/13] README typo --- README.rst | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/README.rst b/README.rst index 9e85518..2838820 100644 --- a/README.rst +++ b/README.rst @@ -37,13 +37,7 @@ Tool for visualizing 3D diffraction and PDF Images. -* Diffpy.fourigui is a tool to visualize and process 3D data sets written with the Python programming language. -Diffpy.fourigui always displays one slice perpendicular to one axis and allows scrolling through the 3D data set along -the given axis with a slider. It shows feedback values such as global and local maxima, minima or NAN ratios. -The matplotlib panel e.g. for zooming and saving figures is featured. Diffpy.fourigui is designed for the processing of 3D -atomic pair distribution functions (PDFs). One can load a 3D reciprocal space scattering volume which can be Fourier -transformed to the 3D PDF. Thereby, one can apply cut off frequencies beyond and below given Q values, compare the -results and switch between the scattering volume in reciprocal space and 3D PDF in real space. +* LONGER DESCRIPTION HERE For more information about the diffpy.fourigui library, please consult our `online documentation `_. @@ -52,10 +46,7 @@ Citation If you use diffpy.fourigui in a scientific publication, we would like you to cite this package as - S. Y. Harouna-Mayer, S. Tao, Z. Gong, M. V. Zimmermann, D. Koziej, A.-C. Dippel, and S. J. L. Billinge, - `Real-Space Texture and Pole-Figure Analysis Using the 3D Pair Distribution - Function on a Platinum Thin Film `_. *IUCrJ* **9 (5)**, 594–603 (2022). - + diffpy.fourigui Package, https://github.com/diffpy/diffpy.fourigui Installation ------------ @@ -125,7 +116,7 @@ trying to commit again. Improvements and fixes are always appreciated. -Before contribuing, please read our `Code of Conduct `_. +Before contributing, please read our `Code of Conduct `_. Contact ------- From 3691592e633915f07b42f0916e22b4f6cd8c9f6e Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Wed, 6 Nov 2024 11:00:32 -0500 Subject: [PATCH 05/13] cookiecutter edits under .github directory --- .github/ISSUE_TEMPLATE/release_checklist.md | 14 ++++++++++---- .github/workflows/build-wheel-release-upload.yml | 2 +- .github/workflows/tests-on-pr.yml | 2 ++ 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/release_checklist.md b/.github/ISSUE_TEMPLATE/release_checklist.md index a87a44a..b96c782 100644 --- a/.github/ISSUE_TEMPLATE/release_checklist.md +++ b/.github/ISSUE_TEMPLATE/release_checklist.md @@ -13,10 +13,16 @@ assignees: "" - [ ] 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. -- [ ] Installation instructions in the README, documentation and on the website (e.g., diffpy.org) are updated and - tested -- [ ] Successfully run any tutorial examples or do functional testing in some other way. +- [ ] Installation instructions in the README, documentation and on the website (e.g., diffpy.org) updated. +- [ ] Successfully run any tutorial examples or do functional testing with the latest Python version - [ ] Grammar and writing quality have been checked (no typos). Please mention @sbillinge when you are ready for release. Include any additional comments necessary, such as -version information and details about the pre-release. +version information and details about the pre-release here: + +### Post-release checklist + +Before closing this issue, please complete the following: + +- [ ] Run tutorial examples and conduct functional testing using the installation guide in the README. +- [ ] Documentation (README, tutorials, API references, and websites) is deployed without broken links or missing figures. diff --git a/.github/workflows/build-wheel-release-upload.yml b/.github/workflows/build-wheel-release-upload.yml index 82dc17a..218042d 100644 --- a/.github/workflows/build-wheel-release-upload.yml +++ b/.github/workflows/build-wheel-release-upload.yml @@ -1,4 +1,4 @@ -name: Release (GitHub/PyPI) +name: Release (GitHub/PyPI) and Deploy Docs on: workflow_dispatch: diff --git a/.github/workflows/tests-on-pr.yml b/.github/workflows/tests-on-pr.yml index ea8bdb2..2eedfd9 100644 --- a/.github/workflows/tests-on-pr.yml +++ b/.github/workflows/tests-on-pr.yml @@ -14,3 +14,5 @@ jobs: project: diffpy.fourigui c_extension: false headless: true + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} From 09a4a0774068a4e10e96ae07fa2860a6d59458b9 Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Wed, 6 Nov 2024 11:01:03 -0500 Subject: [PATCH 06/13] .codespell directory --- .codespell/ignore_lines.txt | 2 ++ .codespell/ignore_words.txt | 11 +++++++++++ 2 files changed, 13 insertions(+) create mode 100644 .codespell/ignore_lines.txt create mode 100644 .codespell/ignore_words.txt diff --git a/.codespell/ignore_lines.txt b/.codespell/ignore_lines.txt new file mode 100644 index 0000000..07fa7c8 --- /dev/null +++ b/.codespell/ignore_lines.txt @@ -0,0 +1,2 @@ +;; Please include filenames and explanations for each ignored line. +;; See https://docs.openverse.org/meta/codespell.html for docs. diff --git a/.codespell/ignore_words.txt b/.codespell/ignore_words.txt new file mode 100644 index 0000000..9757d7c --- /dev/null +++ b/.codespell/ignore_words.txt @@ -0,0 +1,11 @@ +;; Please include explanations for each ignored word (lowercase). +;; See https://docs.openverse.org/meta/codespell.html for docs. + +;; abbreviation for "materials" often used in a journal title +mater + +;; alternative use of socioeconomic +socio-economic + +;; Frobenius norm used in np.linalg.norm +fro From 291eb3f4b0f6a160be33ef6a4ec3645f3bb490c5 Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Wed, 6 Nov 2024 11:14:12 -0500 Subject: [PATCH 07/13] spellcheck edits made by codespell --- .codespell/ignore_words.txt | 3 +++ news/test.rst | 2 +- src/diffpy/fourigui/fourigui.py | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.codespell/ignore_words.txt b/.codespell/ignore_words.txt index 9757d7c..9892d4d 100644 --- a/.codespell/ignore_words.txt +++ b/.codespell/ignore_words.txt @@ -9,3 +9,6 @@ socio-economic ;; Frobenius norm used in np.linalg.norm fro + +;; cutted used as attribute in unit_test.py and fourigui.py +cutted diff --git a/news/test.rst b/news/test.rst index dcd07f1..8f3a77f 100644 --- a/news/test.rst +++ b/news/test.rst @@ -16,7 +16,7 @@ **Fixed:** -* Surpress the `RuntimeWarning` in tests for the `applycutoff` function +* Suppress the `RuntimeWarning` in tests for the `applycutoff` function **Security:** diff --git a/src/diffpy/fourigui/fourigui.py b/src/diffpy/fourigui/fourigui.py index 12e7db6..219a87b 100755 --- a/src/diffpy/fourigui/fourigui.py +++ b/src/diffpy/fourigui/fourigui.py @@ -155,10 +155,10 @@ def initUI(self): anibutton.grid(row=8, column=4) # row 10-12 Fourier transformation - seperator = tk.Label( + separator = tk.Label( frame00, text=" " ) # __________________________________________________________________") - seperator.grid(row=9, column=0, columnspan=5) + separator.grid(row=9, column=0, columnspan=5) cutofflabel = tk.Label(frame00, text="cutoff frequency") cutofflabel.grid(row=10, column=2, columnspan=2) qminlabel = tk.Label(frame00, text="qmin [px]:") From 51fffbdb74503f84231a416236217c80b5a2c7a0 Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Wed, 6 Nov 2024 11:15:01 -0500 Subject: [PATCH 08/13] codecov file to conform to cookiecutter --- .codecov.yml | 42 +++++++++++------------------------------- 1 file changed, 11 insertions(+), 31 deletions(-) diff --git a/.codecov.yml b/.codecov.yml index 04dd651..5a94096 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -1,34 +1,14 @@ -# codecov can find this file anywhere in the repo, so we don't need to clutter -# the root folder. -#comment: false - -codecov: - notify: - require_ci_to_pass: no - coverage: status: - patch: + project: # more options at https://docs.codecov.com/docs/commit-status default: - target: '70' - if_no_uploads: error - if_not_found: success - if_ci_failed: failure - project: - default: false - library: - target: auto - if_no_uploads: error - if_not_found: success - if_ci_failed: error - paths: '!*/tests/.*' - - tests: - target: 97.9% - paths: '*/tests/.*' - if_not_found: success - -flags: - tests: - paths: - - tests/ + target: auto # use the coverage from the base commit, fail if coverage is lower + 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] + hide_project_coverage: false # [true :: only show coverage on the git diff aka patch coverage] From c798f1a914d290d7f5a7b84569e7fc12d1cf6355 Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Wed, 6 Nov 2024 11:17:41 -0500 Subject: [PATCH 09/13] news --- news/codespell.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 news/codespell.rst diff --git a/news/codespell.rst b/news/codespell.rst new file mode 100644 index 0000000..b49c87a --- /dev/null +++ b/news/codespell.rst @@ -0,0 +1,23 @@ +**Added:** + +* Added `codespell` for spell check on all files. + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +* From ad8ca9c5936312ba31f922d5702bfc9a5002224c Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Wed, 6 Nov 2024 11:33:32 -0500 Subject: [PATCH 10/13] README description and citation --- README.rst | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 2838820..d0d15a4 100644 --- a/README.rst +++ b/README.rst @@ -37,7 +37,13 @@ Tool for visualizing 3D diffraction and PDF Images. -* LONGER DESCRIPTION HERE +* LONGER DESCRIPTION HERE* Diffpy.fourigui is a tool to visualize and process 3D data sets written with the Python programming language. +Diffpy.fourigui always displays one slice perpendicular to one axis and allows scrolling through the 3D data set along +the given axis with a slider. It shows feedback values such as global and local maxima, minima or NAN ratios. +The matplotlib panel e.g. for zooming and saving figures is featured. Diffpy.fourigui is designed for the processing of 3D +atomic pair distribution functions (PDFs). One can load a 3D reciprocal space scattering volume which can be Fourier +transformed to the 3D PDF. Thereby, one can apply cut off frequencies beyond and below given Q values, compare the +results and switch between the scattering volume in reciprocal space and 3D PDF in real space. For more information about the diffpy.fourigui library, please consult our `online documentation `_. @@ -46,7 +52,9 @@ Citation If you use diffpy.fourigui in a scientific publication, we would like you to cite this package as - diffpy.fourigui Package, https://github.com/diffpy/diffpy.fourigui + S. Y. Harouna-Mayer, S. Tao, Z. Gong, M. V. Zimmermann, D. Koziej, A.-C. Dippel, and S. J. L. Billinge, + `Real-Space Texture and Pole-Figure Analysis Using the 3D Pair Distribution + Function on a Platinum Thin Film `_. *IUCrJ* **9 (5)**, 594–603 (2022). Installation ------------ From b5fdc6675fc7f185b753c6a0f2b37421917f4960 Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Wed, 6 Nov 2024 11:35:22 -0500 Subject: [PATCH 11/13] typo in readme --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index d0d15a4..cfd2382 100644 --- a/README.rst +++ b/README.rst @@ -37,7 +37,7 @@ Tool for visualizing 3D diffraction and PDF Images. -* LONGER DESCRIPTION HERE* Diffpy.fourigui is a tool to visualize and process 3D data sets written with the Python programming language. +* Diffpy.fourigui is a tool to visualize and process 3D data sets written with the Python programming language. Diffpy.fourigui always displays one slice perpendicular to one axis and allows scrolling through the 3D data set along the given axis with a slider. It shows feedback values such as global and local maxima, minima or NAN ratios. The matplotlib panel e.g. for zooming and saving figures is featured. Diffpy.fourigui is designed for the processing of 3D From ca900bff73a674ca2d772e29ea72e076190b810c Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Wed, 6 Nov 2024 11:59:36 -0500 Subject: [PATCH 12/13] mark off finished items --- .github/ISSUE_TEMPLATE/release_checklist.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/release_checklist.md b/.github/ISSUE_TEMPLATE/release_checklist.md index b96c782..3039aa9 100644 --- a/.github/ISSUE_TEMPLATE/release_checklist.md +++ b/.github/ISSUE_TEMPLATE/release_checklist.md @@ -9,13 +9,13 @@ assignees: "" ### Release checklist for GitHub contributors - [ ] All PRs/issues attached to the release are merged. -- [ ] 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 +- [x] All the badges on the README are passing. +- [x] License information is verified as correct. If you are unsure, please comment below. +- [x] 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. -- [ ] Installation instructions in the README, documentation and on the website (e.g., diffpy.org) updated. -- [ ] Successfully run any tutorial examples or do functional testing with the latest Python version -- [ ] Grammar and writing quality have been checked (no typos). +- [x] Installation instructions in the README, documentation and on the website (e.g., diffpy.org) updated. +- [x] Successfully run any tutorial examples or do functional testing with the latest Python version +- [x] Grammar and writing quality have been checked (no typos). Please mention @sbillinge when you are ready for release. Include any additional comments necessary, such as version information and details about the pre-release here: From b9cab13c361877ebbfa4044ebcb056d1954cc8b5 Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Wed, 6 Nov 2024 16:32:59 -0500 Subject: [PATCH 13/13] Revert "mark off finished items" This reverts commit ca900bff73a674ca2d772e29ea72e076190b810c. --- .github/ISSUE_TEMPLATE/release_checklist.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/release_checklist.md b/.github/ISSUE_TEMPLATE/release_checklist.md index 3039aa9..b96c782 100644 --- a/.github/ISSUE_TEMPLATE/release_checklist.md +++ b/.github/ISSUE_TEMPLATE/release_checklist.md @@ -9,13 +9,13 @@ assignees: "" ### Release checklist for GitHub contributors - [ ] All PRs/issues attached to the release are merged. -- [x] All the badges on the README are passing. -- [x] License information is verified as correct. If you are unsure, please comment below. -- [x] Locally rendered documentation contains all appropriate pages, including API references (check no modules are +- [ ] 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. -- [x] Installation instructions in the README, documentation and on the website (e.g., diffpy.org) updated. -- [x] Successfully run any tutorial examples or do functional testing with the latest Python version -- [x] Grammar and writing quality have been checked (no typos). +- [ ] Installation instructions in the README, documentation and on the website (e.g., diffpy.org) updated. +- [ ] Successfully run any tutorial examples or do functional testing with the latest Python version +- [ ] Grammar and writing quality have been checked (no typos). Please mention @sbillinge when you are ready for release. Include any additional comments necessary, such as version information and details about the pre-release here: