Skip to content

Commit

Permalink
v2023.5.8
Browse files Browse the repository at this point in the history
update CHANGES.rst

fix shadowed python built-ins

sort pyproject.toml arrays alphabetically
  • Loading branch information
janosh committed May 8, 2023
1 parent 1baa8ad commit 92f89f0
Show file tree
Hide file tree
Showing 3 changed files with 129 additions and 24 deletions.
104 changes: 104 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,110 @@
Change log
==========

v2023.5.8
---------
* PR #2959 from @materialsproject dependabot/github_actions/pypa/cibuildwheel-2.12.3
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.11.4 to 2.12.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/pypa/cibuildwheel/releases">pypa/cibuildwheel's releases</a>.</em></p>
<blockquote>
<h2>v2.12.3</h2>
<ul>
<li>🐛 Fix an import error when running on Python 3.7. (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/1479">#1479</a>)</li>
</ul>
<h2>v2.12.2</h2>
<ul>
<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>
<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>
<li>🛠 Pinned version updates, including CPython 3.10.11, 3.11.3, pip 23.1 and wheel 0.40.0.</li>
</ul>
<h2>v2.12.1</h2>
<ul>
<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>
</ul>
<h2>v2.12.0</h2>
<ul>
<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>
<li>🛠 Pinned version updates, including PyPy to v7.3.11 and setuptools to 66.0.0.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md">pypa/cibuildwheel's changelog</a>.</em></p>
<blockquote>
<h3>v2.12.3</h3>
<p><em>19 April 2023</em></p>
<ul>
<li>🐛 Fix an import error when running on Python 3.7. (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/1479">#1479</a>)</li>
</ul>
<h3>v2.12.2</h3>
<p><em>18 April 2023</em></p>
<ul>
<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>
<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>
<li>🛠 Pinned version updates, including CPython 3.10.11, 3.11.3, pip 23.1 and wheel 0.40.0.</li>
</ul>
<h3>v2.12.1</h3>
<p><em>11 March 2023</em></p>
<ul>
<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>
</ul>
<h3>v2.12.0</h3>
<p><em>16 Jan 2023</em></p>
<ul>
<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>
<li>🛠 Pinned version updates, including PyPy to v7.3.11 and setuptools to 66.0.0.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/pypa/cibuildwheel/commit/5e15bb25b428e1bf2daf2215f173d2b40135f56f"><code>5e15bb2</code></a> Bump version: v2.12.3</li>
<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>
<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>
<li><a href="https://github.com/pypa/cibuildwheel/commit/aff6dd5adc49114f1ee49c82bcb386a142fc614a"><code>aff6dd5</code></a> refactor: tomllib in _compat</li>
<li><a href="https://github.com/pypa/cibuildwheel/commit/31bd9c91743e09f5b48c4def38c255c14c00d1af"><code>31bd9c9</code></a> refactor: restore typing for non-backports</li>
<li><a href="https://github.com/pypa/cibuildwheel/commit/d996af554ae21435028e538e417e403e8db7433e"><code>d996af5</code></a> fix: restore Python 3.7 support</li>
<li><a href="https://github.com/pypa/cibuildwheel/commit/e42f243b523a93352f0686ba2f4a62b7bf5f7d34"><code>e42f243</code></a> ci: add Python 3.7</li>
<li><a href="https://github.com/pypa/cibuildwheel/commit/9f18d385cbb38b9c24f46a2c798f361ecea8fd5c"><code>9f18d38</code></a> Bump version: v2.12.2</li>
<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>
<li><a href="https://github.com/pypa/cibuildwheel/commit/8c5f89c035ba6ac81794ed5a5d6cd2110957f181"><code>8c5f89c</code></a> chore: update typing to be generic on function args</li>
<li>Additional commits viewable in <a href="https://github.com/pypa/cibuildwheel/compare/v2.11.4...v2.12.3">compare view</a></li>
</ul>
</details>
<br />
[![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)
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`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@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)
- `@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)
- `@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)
</details>
* PR #2935 from @materialsproject pandas-v2-fixes
Closes #2914.
Replace calls to df.append() with pd.concat() and df.iteritems() with df.items().
* PR #2925 from @jmmshn master
## Allow proper versioning for forked repos
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)
This creates problems if you have the forked repo as a dependency in a requirement.txt file.
This should fix that issue.

v2023.3.23
----------
* Misc bug fixes.
Expand Down
31 changes: 16 additions & 15 deletions pymatgen/symmetry/maggroups.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from fractions import Fraction

import numpy as np
from git import Sequence
from monty.design_patterns import cached_class

from pymatgen.core.lattice import Lattice
Expand All @@ -32,7 +33,7 @@ class MagneticSpaceGroup(SymmetryGroup):
Representation of a magnetic space group.
"""

def __init__(self, id, setting_transformation="a,b,c;0,0,0"):
def __init__(self, label, setting_transformation="a,b,c;0,0,0"):
"""
Initializes a MagneticSpaceGroup from its Belov, Neronova and
Smirnova (BNS) number supplied as a list or its label supplied
Expand Down Expand Up @@ -106,14 +107,14 @@ def __init__(self, id, setting_transformation="a,b,c;0,0,0"):
# retrieve raw data
db = sqlite3.connect(MAGSYMM_DATA)
c = db.cursor()
if isinstance(id, str):
id = "".join(id.split()) # remove any white space
c.execute("SELECT * FROM space_groups WHERE BNS_label=?;", (id,))
elif isinstance(id, list):
c.execute("SELECT * FROM space_groups WHERE BNS1=? AND BNS2=?;", (id[0], id[1]))
elif isinstance(id, int):
if isinstance(label, str):
label = "".join(label.split()) # remove any white space
c.execute("SELECT * FROM space_groups WHERE BNS_label=?;", (label,))
elif isinstance(label, list):
c.execute("SELECT * FROM space_groups WHERE BNS1=? AND BNS2=?;", (label[0], label[1]))
elif isinstance(label, int):
# OG3 index is a 'master' index, going from 1 to 1651
c.execute("SELECT * FROM space_groups WHERE OG3=?;", (id,))
c.execute("SELECT * FROM space_groups WHERE OG3=?;", (label,))
raw_data = list(c.fetchone())

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

def _get_point_operator(idx):
"""Retrieve information on point operator (rotation matrix and Seitz label)."""
hex = self._data["bns_number"][0] >= 143 and self._data["bns_number"][0] <= 194
is_hex = self._data["bns_number"][0] >= 143 and self._data["bns_number"][0] <= 194
c.execute(
"SELECT symbol, matrix FROM point_operators WHERE idx=? AND hex=?;",
(idx - 1, hex),
(idx - 1, is_hex),
)
op = c.fetchone()
op = {
Expand Down Expand Up @@ -281,7 +282,7 @@ def _parse_transformation(b):
db.close()

@classmethod
def from_og(cls, id):
def from_og(cls, label: Sequence[int] | str) -> MagneticSpaceGroup:
"""
Initialize from Opechowski and Guccione (OG) label or number.
Expand All @@ -291,12 +292,12 @@ def from_og(cls, id):
"""
db = sqlite3.connect(MAGSYMM_DATA)
c = db.cursor()
if isinstance(id, str):
c.execute("SELECT BNS_label FROM space_groups WHERE OG_label=?", (id,))
elif isinstance(id, list):
if isinstance(label, str):
c.execute("SELECT BNS_label FROM space_groups WHERE OG_label=?", (label,))
elif isinstance(label, list):
c.execute(
"SELECT BNS_label FROM space_groups WHERE OG1=? and OG2=? and OG3=?",
(id[0], id[1], id[2]),
(label[0], label[1], label[2]),
)
bns_label = c.fetchone()[0]
db.close()
Expand Down
18 changes: 9 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[build-system]
requires = [
# pin NumPy version used in the build
"Cython>=0.29.23",
"oldest-supported-numpy",
"setuptools>=65.0.0",
"Cython>=0.29.23",
]
build-backend = "setuptools.build_meta"

Expand All @@ -29,9 +29,10 @@ select = [
"B", # flake8-bugbear
"C40", # flake8-comprehensions
"D", # pydocstyle
"E", # pycodestyle
"E", # pycodestyle error
"F", # pyflakes
"I", # isort
"PD", # pandas-vet
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
Expand All @@ -40,9 +41,8 @@ select = [
"SIM", # flake8-simplify
"TID", # tidy imports
"UP", # pyupgrade
"W", # pycodestyle
"W", # pycodestyle warning
"YTT", # flake8-2020
"PD", # pandas-vet
]
ignore = [
"B018", # Found useless expression. Either assign it to a variable or remove it.
Expand Down Expand Up @@ -89,15 +89,15 @@ relative_files = true

[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"@deprecated",
"def __repr__",
"if 0:",
"if __name__ == .__main__.:",
"if self.debug:",
"if settings.DEBUG",
"pragma: no cover",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"@deprecated",
"show_plot",
]

Expand All @@ -108,7 +108,7 @@ explicit_package_bases = true
no_implicit_optional = false

[[tool.mypy.overrides]]
module = ["tabulate.*", "requests.*"]
module = ["requests.*", "tabulate.*"]
ignore_missing_imports = true

[tool.codespell]
Expand Down

0 comments on commit 92f89f0

Please sign in to comment.