Skip to content

Commit 79ab923

Browse files
committed
Fixed bad float to str conversion, read HTML as string natively
1 parent fb6b8b8 commit 79ab923

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

min_versions.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,20 @@ def get_min_scipy_version(min_python, min_numpy):
8080
"""
8181
Determine the SciPy version compatibility
8282
"""
83+
colnames = pd.read_html(
84+
"https://docs.scipy.org/doc/scipy/dev/toolchain.html#numpy"
85+
)[1].columns
86+
converter = {colname: str for colname in colnames}
8387
df = (
84-
pd.read_html("https://docs.scipy.org/doc/scipy/dev/toolchain.html#numpy")[1]
88+
pd.read_html(
89+
"https://docs.scipy.org/doc/scipy/dev/toolchain.html#numpy",
90+
converters=converter,
91+
)[1]
8592
.rename(columns=lambda x: x.replace(" ", "_"))
8693
.replace({".x": ""}, regex=True)
8794
.pipe(
8895
lambda df: df.assign(
89-
SciPy_version=df.SciPy_version.astype("str").str.replace(
96+
SciPy_version=df.SciPy_version.str.replace(
9097
r"\d\/", "", regex=True # noqa
9198
)
9299
)

pypi.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

3-
# 1. Update version number in setup.py
3+
# 1. Update version number in pyproject.toml
44
# 2. Update CHANGELOG
55
# 3. Update README with new features/functions/tutorials
66
# 4. Determine minimum versions and dependencies with ./min.py

0 commit comments

Comments
 (0)