Skip to content

Commit c2f2d72

Browse files
committed
v2023.5.8
update CHANGES.rst fix shadowed python built-ins sort pyproject.toml arrays alphabetically
1 parent 1baa8ad commit c2f2d72

File tree

3 files changed

+129
-24
lines changed

3 files changed

+129
-24
lines changed

CHANGES.rst

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,110 @@
11
Change log
22
==========
33

4+
v2023.5.8
5+
---------
6+
* PR #2959 from @materialsproject dependabot/github_actions/pypa/cibuildwheel-2.12.3
7+
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.11.4 to 2.12.3.
8+
<details>
9+
<summary>Release notes</summary>
10+
<p><em>Sourced from <a href="https://github.com/pypa/cibuildwheel/releases">pypa/cibuildwheel's releases</a>.</em></p>
11+
<blockquote>
12+
<h2>v2.12.3</h2>
13+
<ul>
14+
<li>🐛 Fix an import error when running on Python 3.7. (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/1479">#1479</a>)</li>
15+
</ul>
16+
<h2>v2.12.2</h2>
17+
<ul>
18+
<li>🐛 Fix a bug that caused an extra empty config-setting to be passed to the backend when CIBW_BUILD_FRONTEND is set to <code>build</code>. (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/1474">#1474</a>)</li>
19+
<li>🐛 Fix a crash that occurred when overwriting an existing wheel on Windows. (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/1464">#1464</a>)</li>
20+
<li>🛠 Pinned version updates, including CPython 3.10.11, 3.11.3, pip 23.1 and wheel 0.40.0.</li>
21+
</ul>
22+
<h2>v2.12.1</h2>
23+
<ul>
24+
<li>🐛 Fix a bug that prevented the use of CIBW_CONFIG_SETTINGS with the 'pip' build backend. (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/1430">#1430</a>)</li>
25+
</ul>
26+
<h2>v2.12.0</h2>
27+
<ul>
28+
<li>✨ Adds support for PyPy arm64 wheels. This means that you can build PyPy wheels for Apple Silicon machines. Cross-compilation is not supported for these wheels, so you'll have to build on an Apple Silicon machine. (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/1372">#1372</a>)</li>
29+
<li>🛠 Pinned version updates, including PyPy to v7.3.11 and setuptools to 66.0.0.</li>
30+
</ul>
31+
</blockquote>
32+
</details>
33+
<details>
34+
<summary>Changelog</summary>
35+
<p><em>Sourced from <a href="https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md">pypa/cibuildwheel's changelog</a>.</em></p>
36+
<blockquote>
37+
<h3>v2.12.3</h3>
38+
<p><em>19 April 2023</em></p>
39+
<ul>
40+
<li>🐛 Fix an import error when running on Python 3.7. (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/1479">#1479</a>)</li>
41+
</ul>
42+
<h3>v2.12.2</h3>
43+
<p><em>18 April 2023</em></p>
44+
<ul>
45+
<li>🐛 Fix a bug that caused an extra empty config-setting to be passed to the backend when CIBW_BUILD_FRONTEND is set to <code>build</code>. (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/1474">#1474</a>)</li>
46+
<li>🐛 Fix a crash that occurred when overwriting an existing wheel on Windows. (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/1464">#1464</a>)</li>
47+
<li>🛠 Pinned version updates, including CPython 3.10.11, 3.11.3, pip 23.1 and wheel 0.40.0.</li>
48+
</ul>
49+
<h3>v2.12.1</h3>
50+
<p><em>11 March 2023</em></p>
51+
<ul>
52+
<li>🐛 Fix a bug that prevented the use of CIBW_CONFIG_SETTINGS with the 'pip' build backend. (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/1430">#1430</a>)</li>
53+
</ul>
54+
<h3>v2.12.0</h3>
55+
<p><em>16 Jan 2023</em></p>
56+
<ul>
57+
<li>✨ Adds support for PyPy arm64 wheels. This means that you can build PyPy wheels for Apple Silicon machines. Cross-compilation is not supported for these wheels, so you'll have to build on an Apple Silicon machine. (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/1372">#1372</a>)</li>
58+
<li>🛠 Pinned version updates, including PyPy to v7.3.11 and setuptools to 66.0.0.</li>
59+
</ul>
60+
</blockquote>
61+
</details>
62+
<details>
63+
<summary>Commits</summary>
64+
<ul>
65+
<li><a href="https://github.com/pypa/cibuildwheel/commit/5e15bb25b428e1bf2daf2215f173d2b40135f56f"><code>5e15bb2</code></a> Bump version: v2.12.3</li>
66+
<li><a href="https://github.com/pypa/cibuildwheel/commit/52572ccdd01fcde11603283bcfda090086a7d11c"><code>52572cc</code></a> Merge pull request <a href="https://redirect.github.com/pypa/cibuildwheel/issues/1479">#1479</a> from henryiii/henryiii/fix/py37</li>
67+
<li><a href="https://github.com/pypa/cibuildwheel/commit/c6027e4fc72eee01851e06b1cd173aabeb3abfe0"><code>c6027e4</code></a> docs: fix options.md typos (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/1477">#1477</a>)</li>
68+
<li><a href="https://github.com/pypa/cibuildwheel/commit/aff6dd5adc49114f1ee49c82bcb386a142fc614a"><code>aff6dd5</code></a> refactor: tomllib in _compat</li>
69+
<li><a href="https://github.com/pypa/cibuildwheel/commit/31bd9c91743e09f5b48c4def38c255c14c00d1af"><code>31bd9c9</code></a> refactor: restore typing for non-backports</li>
70+
<li><a href="https://github.com/pypa/cibuildwheel/commit/d996af554ae21435028e538e417e403e8db7433e"><code>d996af5</code></a> fix: restore Python 3.7 support</li>
71+
<li><a href="https://github.com/pypa/cibuildwheel/commit/e42f243b523a93352f0686ba2f4a62b7bf5f7d34"><code>e42f243</code></a> ci: add Python 3.7</li>
72+
<li><a href="https://github.com/pypa/cibuildwheel/commit/9f18d385cbb38b9c24f46a2c798f361ecea8fd5c"><code>9f18d38</code></a> Bump version: v2.12.2</li>
73+
<li><a href="https://github.com/pypa/cibuildwheel/commit/dfbc6c3902b689c250f9d9dd10ce8f88db8e2b7b"><code>dfbc6c3</code></a> Merge pull request <a href="https://redirect.github.com/pypa/cibuildwheel/issues/1476">#1476</a> from henryiii/henryiii/chore/ruff_ex</li>
74+
<li><a href="https://github.com/pypa/cibuildwheel/commit/8c5f89c035ba6ac81794ed5a5d6cd2110957f181"><code>8c5f89c</code></a> chore: update typing to be generic on function args</li>
75+
<li>Additional commits viewable in <a href="https://github.com/pypa/cibuildwheel/compare/v2.11.4...v2.12.3">compare view</a></li>
76+
</ul>
77+
</details>
78+
<br />
79+
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pypa/cibuildwheel&package-manager=github_actions&previous-version=2.11.4&new-version=2.12.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
80+
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
81+
[//]: # (dependabot-automerge-start)
82+
[//]: # (dependabot-automerge-end)
83+
---
84+
<details>
85+
<summary>Dependabot commands and options</summary>
86+
<br />
87+
You can trigger Dependabot actions by commenting on this PR:
88+
- `@dependabot rebase` will rebase this PR
89+
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
90+
- `@dependabot merge` will merge this PR after your CI passes on it
91+
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
92+
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
93+
- `@dependabot reopen` will reopen this PR if it is closed
94+
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
95+
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
96+
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
97+
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
98+
</details>
99+
* PR #2935 from @materialsproject pandas-v2-fixes
100+
Closes #2914.
101+
Replace calls to df.append() with pd.concat() and df.iteritems() with df.items().
102+
* PR #2925 from @jmmshn master
103+
## Allow proper versioning for forked repos
104+
I'm not 100% sure how the current version numbering is updated for `pymatgen` but it's not able to update the number properly for forks. The forks seem to keep a much older version number (from before the forking)
105+
This creates problems if you have the forked repo as a dependency in a requirement.txt file.
106+
This should fix that issue.
107+
4108
v2023.3.23
5109
----------
6110
* Misc bug fixes.

pymatgen/symmetry/maggroups.py

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import textwrap
1010
from array import array
1111
from fractions import Fraction
12+
from typing import Sequence
1213

1314
import numpy as np
1415
from monty.design_patterns import cached_class
@@ -32,7 +33,7 @@ class MagneticSpaceGroup(SymmetryGroup):
3233
Representation of a magnetic space group.
3334
"""
3435

35-
def __init__(self, id, setting_transformation="a,b,c;0,0,0"):
36+
def __init__(self, label, setting_transformation="a,b,c;0,0,0"):
3637
"""
3738
Initializes a MagneticSpaceGroup from its Belov, Neronova and
3839
Smirnova (BNS) number supplied as a list or its label supplied
@@ -106,14 +107,14 @@ def __init__(self, id, setting_transformation="a,b,c;0,0,0"):
106107
# retrieve raw data
107108
db = sqlite3.connect(MAGSYMM_DATA)
108109
c = db.cursor()
109-
if isinstance(id, str):
110-
id = "".join(id.split()) # remove any white space
111-
c.execute("SELECT * FROM space_groups WHERE BNS_label=?;", (id,))
112-
elif isinstance(id, list):
113-
c.execute("SELECT * FROM space_groups WHERE BNS1=? AND BNS2=?;", (id[0], id[1]))
114-
elif isinstance(id, int):
110+
if isinstance(label, str):
111+
label = "".join(label.split()) # remove any white space
112+
c.execute("SELECT * FROM space_groups WHERE BNS_label=?;", (label,))
113+
elif isinstance(label, list):
114+
c.execute("SELECT * FROM space_groups WHERE BNS1=? AND BNS2=?;", (label[0], label[1]))
115+
elif isinstance(label, int):
115116
# OG3 index is a 'master' index, going from 1 to 1651
116-
c.execute("SELECT * FROM space_groups WHERE OG3=?;", (id,))
117+
c.execute("SELECT * FROM space_groups WHERE OG3=?;", (label,))
117118
raw_data = list(c.fetchone())
118119

119120
# Jones Faithful transformation
@@ -132,10 +133,10 @@ def __init__(self, id, setting_transformation="a,b,c;0,0,0"):
132133

133134
def _get_point_operator(idx):
134135
"""Retrieve information on point operator (rotation matrix and Seitz label)."""
135-
hex = self._data["bns_number"][0] >= 143 and self._data["bns_number"][0] <= 194
136+
is_hex = self._data["bns_number"][0] >= 143 and self._data["bns_number"][0] <= 194
136137
c.execute(
137138
"SELECT symbol, matrix FROM point_operators WHERE idx=? AND hex=?;",
138-
(idx - 1, hex),
139+
(idx - 1, is_hex),
139140
)
140141
op = c.fetchone()
141142
op = {
@@ -281,7 +282,7 @@ def _parse_transformation(b):
281282
db.close()
282283

283284
@classmethod
284-
def from_og(cls, id):
285+
def from_og(cls, label: Sequence[int] | str) -> MagneticSpaceGroup:
285286
"""
286287
Initialize from Opechowski and Guccione (OG) label or number.
287288
@@ -291,12 +292,12 @@ def from_og(cls, id):
291292
"""
292293
db = sqlite3.connect(MAGSYMM_DATA)
293294
c = db.cursor()
294-
if isinstance(id, str):
295-
c.execute("SELECT BNS_label FROM space_groups WHERE OG_label=?", (id,))
296-
elif isinstance(id, list):
295+
if isinstance(label, str):
296+
c.execute("SELECT BNS_label FROM space_groups WHERE OG_label=?", (label,))
297+
elif isinstance(label, list):
297298
c.execute(
298299
"SELECT BNS_label FROM space_groups WHERE OG1=? and OG2=? and OG3=?",
299-
(id[0], id[1], id[2]),
300+
(label[0], label[1], label[2]),
300301
)
301302
bns_label = c.fetchone()[0]
302303
db.close()

pyproject.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[build-system]
22
requires = [
33
# pin NumPy version used in the build
4+
"Cython>=0.29.23",
45
"oldest-supported-numpy",
56
"setuptools>=65.0.0",
6-
"Cython>=0.29.23",
77
]
88
build-backend = "setuptools.build_meta"
99

@@ -29,9 +29,10 @@ select = [
2929
"B", # flake8-bugbear
3030
"C40", # flake8-comprehensions
3131
"D", # pydocstyle
32-
"E", # pycodestyle
32+
"E", # pycodestyle error
3333
"F", # pyflakes
3434
"I", # isort
35+
"PD", # pandas-vet
3536
"PIE", # flake8-pie
3637
"PL", # pylint
3738
"PT", # flake8-pytest-style
@@ -40,9 +41,8 @@ select = [
4041
"SIM", # flake8-simplify
4142
"TID", # tidy imports
4243
"UP", # pyupgrade
43-
"W", # pycodestyle
44+
"W", # pycodestyle warning
4445
"YTT", # flake8-2020
45-
"PD", # pandas-vet
4646
]
4747
ignore = [
4848
"B018", # Found useless expression. Either assign it to a variable or remove it.
@@ -89,15 +89,15 @@ relative_files = true
8989

9090
[tool.coverage.report]
9191
exclude_lines = [
92-
"pragma: no cover",
92+
"@deprecated",
9393
"def __repr__",
94+
"if 0:",
95+
"if __name__ == .__main__.:",
9496
"if self.debug:",
9597
"if settings.DEBUG",
98+
"pragma: no cover",
9699
"raise AssertionError",
97100
"raise NotImplementedError",
98-
"if 0:",
99-
"if __name__ == .__main__.:",
100-
"@deprecated",
101101
"show_plot",
102102
]
103103

@@ -108,7 +108,7 @@ explicit_package_bases = true
108108
no_implicit_optional = false
109109

110110
[[tool.mypy.overrides]]
111-
module = ["tabulate.*", "requests.*"]
111+
module = ["requests.*", "tabulate.*"]
112112
ignore_missing_imports = true
113113

114114
[tool.codespell]

0 commit comments

Comments
 (0)