Skip to content

Commit c474476

Browse files
committed
chore: finalize pre-commit cleanup with spelling suppressions and formatting
1 parent e5a2e4c commit c474476

File tree

102 files changed

+2020
-251
lines changed

Some content is hidden

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

102 files changed

+2020
-251
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_lines.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,12 @@
11
;; Please include filenames and explanations for each ignored line.
22
;; See https://docs.openverse.org/meta/codespell.html for docs.
3+
src/diffpy/structure/parsers/p_discus.py:.*DISCUS.* ;; DISCUS is a valid software/tool name
4+
src/diffpy/structure/parsers/p_discus.py:.*discus.* ;; Same reason as above, lowercase version
5+
src/diffpy/structure/parsers/p_pdb.py:.*CONECT.* ;; CONECT is a valid PDB record name
6+
src/diffpy/structure/parsers/p_xcfg.py:.*Te.* ;; Te is the chemical symbol for Tellurium
7+
src/diffpy/structure/parsers/p_xcfg.py:.*Nd.* ;; Nd is the chemical symbol for Neodymium
8+
src/diffpy/structure/parsers/p_xcfg.py:.*BU.* ;; BU is used in the file with intended meaning
9+
src/diffpy/structure/parsers/parser_index_mod.py:.*Discus.* ;; Capitalized variant
10+
src/diffpy/structure/parsers/parser_index_mod.py:.*discus.* ;; lowercase variant
11+
tests/test_loadstructure.py:.*discus.* ;; test file with valid usage
12+
tests/test_p_discus.py:.*discus.* ;; test file with valid usage

.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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ assignees: ""
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.
15+
missing), tutorials, and other human written text is up-to-date with any changes in the code.
1616
- [ ] Installation instructions in the README, documentation and on the website (e.g., diffpy.org) 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).
@@ -31,5 +31,5 @@ version information and details about the pre-release here:
3131

3232
<!-- Before closing this issue, please complete the following: -->
3333

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.
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.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ 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:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Check for News
33
on:
44
pull_request_target:
55
branches:
6-
- main
6+
- main
77

88
jobs:
99
build:

.isort.cfg

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

.pre-commit-config.yaml

Lines changed: 34 additions & 9 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
@@ -44,3 +44,28 @@ repos:
4444
name: Prevent Commit to Main Branch
4545
args: ["--branch", "main"]
4646
stages: [pre-commit]
47+
- repo: https://github.com/codespell-project/codespell
48+
rev: v2.3.0
49+
hooks:
50+
- id: codespell
51+
args:
52+
- "--ignore-words=.codespell/ignore_words.txt"
53+
- "--ignore-regex"
54+
- "(?i)\\b(discus|conect|te|nd|bu)\\b"
55+
exclude: .*/\.codespell/.*
56+
additional_dependencies:
57+
- tomli
58+
# prettier - multi formatter for .json, .yml, and .md files
59+
- repo: https://github.com/pre-commit/mirrors-prettier
60+
rev: f12edd9c7be1c20cfa42420fd0e6df71e42b51ea # frozen: v4.0.0-alpha.8
61+
hooks:
62+
- id: prettier
63+
additional_dependencies:
64+
- "prettier@^3.2.4"
65+
# docformatter - PEP 257 compliant docstring formatter
66+
- repo: https://github.com/s-weigand/docformatter
67+
rev: 5757c5190d95e5449f102ace83df92e7d3b06c6c
68+
hooks:
69+
- id: docformatter
70+
additional_dependencies: [tomli]
71+
args: [--in-place, --config, ./pyproject.toml]

CHANGELOG.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Release Notes
2828
**Fixed:**
2929

3030
* Add getting started section and re-arrange install success check instructions
31-
* Added termial script for transtru app in pyproject.toml
31+
* Added terminal script for transtru app in pyproject.toml
3232
* Changed requires-python to align with classifiers
3333

3434

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ trying to commit again.
132132

133133
Improvements and fixes are always appreciated.
134134

135-
Before contribuing, please read our `Code of Conduct <https://github.com/diffpy/diffpy.structure/blob/main/CODE-OF-CONDUCT.rst>`_.
135+
Before contributing, please read our `Code of Conduct <https://github.com/diffpy/diffpy.structure/blob/main/CODE-OF-CONDUCT.rst>`_.
136136

137137
Acknowledgement
138138
---------------

0 commit comments

Comments
 (0)