Skip to content

Commit ee8f2ff

Browse files
committed
Update dependencies
- remove dependency upper limits - update poetry lockfile - adapt to numpy 2.x (use np.round instead of np.round_) - get rid of CI workflow interpolation step - update pre-commit hooks
1 parent 0a5ff1d commit ee8f2ff

File tree

11 files changed

+2071
-1384
lines changed

11 files changed

+2071
-1384
lines changed

.github/workflows_source/ci.yml

Lines changed: 0 additions & 99 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 12 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,31 @@
11
repos:
22
- repo: https://github.com/asottile/pyupgrade
3-
rev: v3.15.2
3+
rev: v3.19.1
44
hooks:
55
- id: pyupgrade
66
args: [--py39-plus]
77
- repo: https://github.com/psf/black
8-
rev: 24.3.0
8+
rev: 25.1.0
99
hooks:
1010
- id: black
1111
- repo: https://github.com/pycqa/isort
12-
rev: 5.13.2
12+
rev: 6.0.0
1313
hooks:
1414
- id: isort
15+
- repo: https://github.com/python-poetry/poetry/
16+
rev: "2.1.1"
17+
hooks:
18+
- id: poetry-check
19+
name: "poetry: check pyproject.toml syntax"
20+
- id: poetry-check
21+
name: "poetry: check poetry.lock consistency"
22+
args: ["--lock"]
23+
files: '^(pyproject\.toml|poetry\.lock)$'
1524
- repo: local
1625
hooks:
17-
- id: poetry-pyproject-check
18-
name: "poetry: pyproject.toml check"
19-
language: system
20-
entry: poetry
21-
args: ["check"]
22-
files: '^(pyproject\.toml)$'
23-
pass_filenames: false
24-
25-
- id: poetry-lockfile-consistency
26-
name: "poetry: lockfile consistency check"
27-
language: system
28-
entry: poetry
29-
args: ['lock', '--check']
30-
files: '^(pyproject\.toml)|(poetry\.lock)$'
31-
pass_filenames: false
32-
3326
- id: pylint
3427
name: pylint
3528
entry: pylint
3629
language: system
3730
types: [python]
3831
exclude: '^(doc/)|(examples/)|(futures/)|(utils/)'
39-
40-
- id: interpolate-workflows
41-
name: Interpolate Github workflows
42-
entry: python ./utils/interpolate_yaml_anchors.py
43-
language: system
44-
files: |
45-
(?x)^(
46-
.github/(.)*|
47-
utils/interpolate_yaml_anchors.py
48-
)$
49-
pass_filenames: false

doc/source/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@
120120
# The theme to use for HTML and HTML Help pages. See the documentation for
121121
# a list of builtin themes.
122122
html_theme = "sphinx_rtd_theme"
123-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
124123

125124
# Theme options are theme-specific and customize the look and feel of a theme
126125
# further. For a list of options available for each theme, see the

poetry.lock

Lines changed: 2027 additions & 1162 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
requires = ["poetry-core"]
33
build-backend = "poetry.core.masonry.api"
44

5-
[tool.poetry]
5+
[project]
66
name = "z2pack"
7-
version = "2.2.0"
8-
description = "Automating the computation of topological numbers of band-structures.."
9-
authors = ["Dominik Gresch <[email protected]>"]
7+
version = "2.2.1"
8+
description = "Automating the computation of topological numbers of band-structures."
9+
authors = [{ name ="Dominik Gresch", email = "[email protected]" }]
1010
license = "GPL"
1111
readme = "README.md"
1212
documentation = "https://z2pack.greschd.ch"
@@ -37,33 +37,30 @@ keywords = [
3737
packages = [
3838
{ include = "z2pack", from = "src" },
3939
]
40+
requires-python = ">=3.9"
41+
dependencies = [
42+
"numpy>=1.20",
43+
"scipy>=1.7",
44+
"decorator>=5.0",
45+
"blessings>=1.7",
46+
"sortedcontainers>=2.4.0",
47+
"msgpack>=1.0",
48+
"fsc.locker>=1.1.0",
49+
"fsc.formatting>=1.0.0",
50+
"fsc.iohelper>=1.0.3",
51+
]
4052

41-
[tool.poetry.dependencies]
42-
python = ">=3.9,<3.13"
43-
numpy = "^1.20"
44-
scipy = "^1.7"
45-
decorator = "^5.0"
46-
blessings = "^1.7"
47-
sortedcontainers = "^2.4.0"
48-
msgpack = "^1.0"
49-
"fsc.locker" = "^1.1.0"
50-
"fsc.formatting" = "^1.0.0"
51-
"fsc.iohelper" = "^1.0.3"
52-
matplotlib = { version = "^3", optional = true }
53-
tbmodels = { version = "^1.1", optional = true }
53+
[project.optional-dependencies]
54+
plot = [ "matplotlib>=3" ]
55+
tb = [ "tbmodels>=1.1" ]
5456

5557
[tool.poetry.group.dev.dependencies]
56-
sphinx = "^5"
57-
sphinx-rtd-theme = "^1.1.1"
58-
pytest = "^6"
59-
pytest-cov = "^4.0.0"
60-
pre-commit = "^3.0.0"
61-
pylint = "^3"
62-
"ruamel.yaml" = "^0.17"
63-
64-
[tool.poetry.extras]
65-
plot = ["matplotlib"]
66-
tb = ["tbmodels"]
58+
sphinx = ">=5"
59+
sphinx-rtd-theme = ">=1.1.1"
60+
pytest = ">=6"
61+
pytest-cov = ">=4.0.0"
62+
pre-commit = ">=3.0.0"
63+
pylint = ">=3"
6764

6865
[tool.black]
6966
line-length = 100
@@ -108,6 +105,7 @@ disable = [
108105
"consider-using-f-string",
109106
"use-dict-literal",
110107
"too-many-arguments",
108+
"too-many-positional-arguments",
111109
]
112110

113111
[tool.pylint.design]

src/z2pack/fp/kpoint.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def _check_dim(fct, kpt):
4545
def _check_closed(fct, kpt):
4646
"""Checks whether the k-point list forms a closed loop."""
4747
delta = kpt[-1] - kpt[0]
48-
if not np.isclose(np.round_(delta), delta).all():
48+
if not np.isclose(np.round(delta), delta).all():
4949
raise ValueError("The k-point line does not form a closed loop.")
5050
return fct(kpt)
5151

@@ -133,7 +133,7 @@ def wannier90_nnkpts(kpt):
133133
num_kpt = len(kpt) - 1
134134
bz_diff = [np.zeros(3, dtype=int) for _ in range(num_kpt - 1)]
135135
# check whether the last k-point is in a different UC
136-
bz_diff.append(np.array(np.round_(kpt[-1] - kpt[0]), dtype=int))
136+
bz_diff.append(np.array(np.round(kpt[-1] - kpt[0]), dtype=int))
137137
string = "begin nnkpts\n"
138138
for i, k in enumerate(bz_diff):
139139
j = (i + 1) % num_kpt

src/z2pack/line/_result.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""""Defines the result (data + convergence information) object for line calculations."""
1+
""" "Defines the result (data + convergence information) object for line calculations."""
22

33
from .._result import Result
44

src/z2pack/line/_run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def _run_line_impl(*controls, system, line, save_file=None, init_result=None, se
114114
"""
115115
# check if the line function is closed (up to an inverse lattice vector)
116116
delta = np.array(line(1)) - np.array(line(0))
117-
if not np.isclose(np.round_(delta), delta).all():
117+
if not np.isclose(np.round(delta), delta).all():
118118
raise ValueError(
119119
"Start and end points of the line differ by {}, which is not an inverse lattice vector.".format(
120120
delta

src/z2pack/surface/_result.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""""Defines the result (data + convergence information) object for surface calculations."""
1+
""" "Defines the result (data + convergence information) object for surface calculations."""
22

33
from .._result import Result
44

src/z2pack/volume/_result.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""""Defines the result (data + convergence information) object for volume calculations."""
1+
""" "Defines the result (data + convergence information) object for volume calculations."""
22

33
from .._result import Result
44

0 commit comments

Comments
 (0)