Skip to content

Commit

Permalink
Add codespell to pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
AntObi committed Aug 19, 2024
1 parent cc1dac9 commit 7366279
Show file tree
Hide file tree
Showing 9 changed files with 165 additions and 384 deletions.
14 changes: 14 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
ci:
autoupdate_schedule: quarterly
autofix_commit_msg: pre-commit auto-fixes
autoupdate_commit_msg: pre-commit autoupdate
skip: [eslint, pyright]

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.5
Expand Down Expand Up @@ -39,3 +45,11 @@ repos:
hooks:
- id: pyright
args: [--level, error]
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
stages: [commit, commit-msg]
args: [--toml, pyproject.toml]
additional_dependencies:
- tomli
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

- Fix package name in contributing.md ([075e657](https://github.com/WMD-group/ElementEmbeddings/commit/075e657d260aa72fca91c7f8cc57466235788426) by Anthony Onwuli).
- Fixed bug with is_standarised attribute ([ebaf773](https://github.com/WMD-group/ElementEmbeddings/commit/ebaf773134c8ab4988f071da9eca2193e4340f60) by Anthony Onwuli).
- Fixed composistion featuriser test ([3b729c9](https://github.com/WMD-group/ElementEmbeddings/commit/3b729c9584bf7cc4de2fd5c70baff41c8753800b) by Anthony Onwuli).
- Fixed composition featuriser test ([3b729c9](https://github.com/WMD-group/ElementEmbeddings/commit/3b729c9584bf7cc4de2fd5c70baff41c8753800b) by Anthony Onwuli).
- Fixed dim for linear/scalar representations ([f6cc681](https://github.com/WMD-group/ElementEmbeddings/commit/f6cc681ee4f343240f5bb4d49cf9dfc5fa89f455) by Anthony Onwuli).

### Changed
Expand Down
2 changes: 1 addition & 1 deletion docs/embeddings/species.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Species Embeddings

The `ElementEmbeddings` package has been expanded to incoporate representation of ionic species. We provide the literature source for these representations as well as the data source for which the files were obtained.
The `ElementEmbeddings` package has been expanded to incorporate representation of ionic species. We provide the literature source for these representations as well as the data source for which the files were obtained.

## SkipSpecies

Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ nav:
- "Simple usage": tutorials.md
- "Core usage (notebook)": tutorial/usage.ipynb
- "Composition usage (notebook)": tutorial/composition.ipynb
- "Ionic Speices (notebook)": tutorial/species.ipynb
- "Ionic Species (notebook)": tutorial/species.ipynb
- Embedding Schemes:
- "Element Embeddings": "embeddings/element.md"
- Species Embeddings: "embeddings/species.md"
Expand Down
105 changes: 104 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ ignore = [
"TRY003", # Avoid specifying long messages outside the exception class
"TRY300", # Check for return statements in try blocks
"TRY301", # Check for raise statements within try blocks
"E741", # Ambigous variable
"E741", # Ambiguous variable
]
exclude = ["Publications/*"]
pydocstyle.convention = "google"
Expand All @@ -93,3 +93,106 @@ docstring-code-format = true
typeCheckingMode = "off"
reportPossiblyUnboundVariable = true
reportUnboundVariable = true

[tool.codespell]
skip = "*.csv,*/site/*,Publication/element_similarity/**,*periodic-table*.json"
check-filenames = true
ignore-words-list = [
"H",
"He",
"Li",
"Be",
"B",
"C",
"N",
"O",
"F",
"Ne",
"Na",
"Mg",
"Al",
"Si",
"P",
"S",
"Cl",
"Ar",
"K",
"Ca",
"Sc",
"Ti",
"V",
"Cr",
"Mn",
"Fe",
"Co",
"Ni",
"Cu",
"Zn",
"Ga",
"Ge",
"As",
"Se",
"Br",
"Kr",
"Rb",
"Sr",
"Y",
"Zr",
"Nb",
"Mo",
"Tc",
"Ru",
"Rh",
"Pd",
"Ag",
"Cd",
"In",
"Sn",
"Sb",
"Te",
"I",
"Xe",
"Cs",
"Ba",
"La",
"Ce",
"Pr",
"Nd",
"Pm",
"Sm",
"Eu",
"Gd",
"Tb",
"Dy",
"Ho",
"Er",
"Tm",
"Yb",
"Lu",
"Hf",
"Ta",
"W",
"Re",
"Os",
"Ir",
"Pt",
"Au",
"Hg",
"Tl",
"Pb",
"Bi",
"Po",
"At",
"Rn",
"Fr",
"Ra",
"Ac",
"Th",
"Pa",
"U",
"Np",
"Pu",
"Am",
"Cm",
"Bk",
]
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@
],
"cpk-hex": "bfc2c7",
"image": {
"title": "Titanium Crystal made with the van Arkel-de Booer Process. 87 grams, Orginial size in cm: 2.5 x 4",
"title": "Titanium Crystal made with the van Arkel-de Booer Process. 87 grams, Original size in cm: 2.5 x 4",
"url": "https://upload.wikimedia.org/wikipedia/commons/e/ec/Titanium.jpg",
"attribution": "Hi-Res Images ofChemical Elements, CC BY 3.0 <https://creativecommons.org/licenses/by/3.0>, via Wikimedia Commons, source: https://images-of-elements.com/titanium.php"
},
Expand Down Expand Up @@ -1957,7 +1957,7 @@
"image": {
"title": "48 Cd Cadmium",
"url": "https://images-of-elements.com/cadmium-4.jpg",
"attribution": "Chemical Elments A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/cadmium.php"
"attribution": "Chemical Elements A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/cadmium.php"
},
"block": "d"
},
Expand Down Expand Up @@ -4024,7 +4024,7 @@
"image": {
"title": "This is only an illustration, not mendelevium itself. Chemically similar to Thulium, the highly radioactive heavy metal emits very energetic \u03b1-radiation.",
"url": "https://images-of-elements.com/s/mendelevium.jpg",
"attribution": "Chemical Elments A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/mendelevium.php"
"attribution": "Chemical Elements A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/mendelevium.php"
},
"block": "f"
},
Expand Down Expand Up @@ -4063,7 +4063,7 @@
"image": {
"title": "This is only an illustration, not nobelium itself. Nobelium can only be made in very small amounts and emits strong radiation of various kinds.",
"url": "https://images-of-elements.com/nobelium.jpg",
"attribution": "Chemical Elments A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/nobelium.php"
"attribution": "Chemical Elements A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/nobelium.php"
},
"block": "f"
},
Expand Down Expand Up @@ -4102,7 +4102,7 @@
"image": {
"title": "This is only an illustration, not lawrencium itself. Lawrencium can only be made in very small amounts and emits strong radiation",
"url": "https://images-of-elements.com/lawrencium.jpg",
"attribution": "Chemical Elments A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/lawrencium.php"
"attribution": "Chemical Elements A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/lawrencium.php"
},
"block": "d"
},
Expand Down Expand Up @@ -4141,7 +4141,7 @@
"image": {
"title": "Decay traces in a spark chamber, not of rutherfordium, but of a pion. This is a completely different, unrelated particle, but the decay of rutherfordium would make streaks there, too.",
"url": "https://images-of-elements.com/s/rutherfordium.jpg",
"attribution": "Image \u00a9 CERN, Chemical Elments A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/rutherfordium.php"
"attribution": "Image \u00a9 CERN, Chemical Elements A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/rutherfordium.php"
},
"block": "d"
},
Expand Down Expand Up @@ -4180,7 +4180,7 @@
"image": {
"title": "No Image Found",
"url": "https://images-of-elements.com/s/transactinoid.png",
"attribution": "Chemical Elments A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/dubnium.php"
"attribution": "Chemical Elements A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/dubnium.php"
},
"block": "d"
},
Expand Down Expand Up @@ -4219,7 +4219,7 @@
"image": {
"title": "No Image Found",
"url": "https://images-of-elements.com/s/transactinoid.png",
"attribution": "Chemical Elments A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/seaborgium.php"
"attribution": "Chemical Elements A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/seaborgium.php"
},
"block": "d"
},
Expand Down Expand Up @@ -4258,7 +4258,7 @@
"image": {
"title": "No Image Found",
"url": "https://images-of-elements.com/s/transactinoid.png",
"attribution": "Chemical Elments A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/bohrium.php"
"attribution": "Chemical Elements A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/bohrium.php"
},
"block": "d"
},
Expand Down Expand Up @@ -4297,7 +4297,7 @@
"image": {
"title": "No Image Found",
"url": "https://images-of-elements.com/s/transactinoid.png",
"attribution": "Chemical Elments A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/hassium.php"
"attribution": "Chemical Elements A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/hassium.php"
},
"block": "d"
},
Expand Down Expand Up @@ -4336,7 +4336,7 @@
"image": {
"title": "No Image Found",
"url": "https://images-of-elements.com/s/transactinoid.png",
"attribution": "Chemical Elments A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/meitnerium.php"
"attribution": "Chemical Elements A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/meitnerium.php"
},
"block": "d"
},
Expand Down Expand Up @@ -4375,7 +4375,7 @@
"image": {
"title": "No Image Found",
"url": "https://images-of-elements.com/s/transactinoid.png",
"attribution": "Chemical Elments A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/darmstadtium.php"
"attribution": "Chemical Elements A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/darmstadtium.php"
},
"block": "d"
},
Expand Down Expand Up @@ -4414,7 +4414,7 @@
"image": {
"title": "No Image Found",
"url": "https://images-of-elements.com/s/transactinoid.png",
"attribution": "Chemical Elments A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/roentgenium.php"
"attribution": "Chemical Elements A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/roentgenium.php"
},
"block": "d"
},
Expand Down Expand Up @@ -4453,7 +4453,7 @@
"image": {
"title": "No Image Found",
"url": "https://images-of-elements.com/s/transactinoid.png",
"attribution": "Chemical Elments A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/copernicium.php"
"attribution": "Chemical Elements A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/copernicium.php"
},
"block": "d"
},
Expand Down Expand Up @@ -4492,7 +4492,7 @@
"image": {
"title": "No Image Found",
"url": "https://images-of-elements.com/s/transactinoid.png",
"attribution": "Chemical Elments A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/nihonium.php"
"attribution": "Chemical Elements A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/nihonium.php"
},
"block": "p"
},
Expand Down Expand Up @@ -4531,7 +4531,7 @@
"image": {
"title": "No Image Found",
"url": "https://images-of-elements.com/s/transactinoid.png",
"attribution": "Chemical Elments A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/flerovium.php"
"attribution": "Chemical Elements A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/flerovium.php"
},
"block": "p"
},
Expand Down Expand Up @@ -4570,7 +4570,7 @@
"image": {
"title": "No Image Found",
"url": "https://images-of-elements.com/s/transactinoid.png",
"attribution": "Chemical Elments A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/moscovium.php"
"attribution": "Chemical Elements A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/moscovium.php"
},
"block": "p"
},
Expand Down Expand Up @@ -4609,7 +4609,7 @@
"image": {
"title": "No Image Found",
"url": "https://images-of-elements.com/s/transactinoid.png",
"attribution": "Chemical Elments A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/livermorium.php"
"attribution": "Chemical Elements A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/livermorium.php"
},
"block": "p"
},
Expand Down Expand Up @@ -4648,7 +4648,7 @@
"image": {
"title": "No Image Found",
"url": "https://images-of-elements.com/s/transactinoid.png",
"attribution": "Chemical Elments A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/tenessine.php"
"attribution": "Chemical Elements A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/tenessine.php"
},
"block": "p"
},
Expand Down Expand Up @@ -4687,7 +4687,7 @@
"image": {
"title": "No Image Found",
"url": "https://images-of-elements.com/s/transactinoid.png",
"attribution": "Chemical Elments A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/oganesson.php"
"attribution": "Chemical Elements A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com/oganesson.php"
},
"block": "p"
},
Expand Down Expand Up @@ -4726,7 +4726,7 @@
"image": {
"title": "No Image Found",
"url": "https://images-of-elements.com/s/transactinoid.png",
"attribution": "Chemical Elments A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com"
"attribution": "Chemical Elements A Virtual Museum under a Creative Commons Attribution 3.0 Unported License, source: https://images-of-elements.com"
},
"block": "s"
}
Expand Down
Loading

0 comments on commit 7366279

Please sign in to comment.