Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump monty to use the latest monty.json import speedup patch, add import test regression test, lazy load some rarely used but costly modules #4128

Open
wants to merge 44 commits into
base: master
Choose a base branch
from
Open
Changes from 7 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
d2447ed
copy pyproject from 4073
DanielYang59 Oct 22, 2024
1eb855b
bump monty
DanielYang59 Oct 22, 2024
aae9f4b
recover networkx pin, and bump sympy
DanielYang59 Oct 22, 2024
e08454e
pin monty to lower ver to see what is causing the failure
DanielYang59 Oct 22, 2024
f8b5723
revert all changes to pyproject but monty
DanielYang59 Oct 22, 2024
1948442
bump sympy
DanielYang59 Oct 22, 2024
03df9b0
sort and group optional deps
DanielYang59 Oct 22, 2024
4492816
loose networkx pin for compatibility
DanielYang59 Oct 22, 2024
a123174
lazy import sympy
DanielYang59 Oct 22, 2024
9688244
lazy load scipy
DanielYang59 Oct 22, 2024
6e0a89c
Revert "lazy load scipy"
DanielYang59 Oct 22, 2024
75e23b1
try netcdf4 install with delvewheel, https://github.com/materialsproj…
DanielYang59 Oct 22, 2024
4320868
Revert "try netcdf4 install with delvewheel, https://github.com/mater…
DanielYang59 Oct 22, 2024
77ebf2a
Merge branch 'master' into bump-monty-json
shyuep Oct 23, 2024
206ea52
test netcdf4 1.7.1.post2, notice new release is out today
DanielYang59 Oct 23, 2024
25975dd
netcdf4 1.7.1.post2 doesn't work, try latest 1.7.2
DanielYang59 Oct 23, 2024
762b85a
reset netcdf4 pin
DanielYang59 Oct 23, 2024
038ce9a
why <= doesn't work?
DanielYang59 Oct 23, 2024
24fdcdc
add comment
DanielYang59 Oct 23, 2024
022b91a
exclude 1.7.2 as well (perhaps conditionally skip that test?)
DanielYang59 Oct 23, 2024
3dd2cdf
add place holder
DanielYang59 Oct 23, 2024
9b7f35a
enhance comment
DanielYang59 Oct 26, 2024
87267f4
add TODO tag
DanielYang59 Oct 26, 2024
3435e99
Merge remote-tracking branch 'upstream/master' into bump-monty-json
DanielYang59 Oct 26, 2024
aa4153a
Merge branch 'master' into bump-monty-json
DanielYang59 Oct 26, 2024
313d553
tweak placeholder
DanielYang59 Oct 26, 2024
e69e344
Merge branch 'bump-monty-json' of https://github.com/DanielYang59/pym…
DanielYang59 Oct 26, 2024
fa17222
replace assert_allclose for scalar compare
DanielYang59 Oct 26, 2024
74ec0c9
replace assert_allclose with isclose
DanielYang59 Oct 26, 2024
df8e2ff
fix is close
DanielYang59 Oct 26, 2024
2778e28
use np.allclose over np.all(np.isclose())
DanielYang59 Oct 26, 2024
8952c4a
lazy import AseAtomsAdaptor
DanielYang59 Oct 26, 2024
c37ba45
guard type check import
DanielYang59 Oct 26, 2024
1674a96
lazy import matplotlib
DanielYang59 Oct 26, 2024
8ac0c7f
toggle reference generation
DanielYang59 Oct 26, 2024
2f7f993
update import time records
DanielYang59 Oct 26, 2024
abf5f8b
skip in not CI env
DanielYang59 Oct 26, 2024
de4dc3b
include current time in err msg
DanielYang59 Oct 26, 2024
8f5c2ac
loose hard threshold to 100%, as it appear macos runner is prone to f…
DanielYang59 Oct 26, 2024
4849da0
update type
DanielYang59 Oct 26, 2024
aceb5b5
skip test for macos
DanielYang59 Oct 26, 2024
eb51fee
add PR tag for easy tracing
DanielYang59 Oct 26, 2024
c64ecae
use perf_counter_ns for precision
DanielYang59 Oct 26, 2024
54752f7
Merge branch 'master' into bump-monty-json
DanielYang59 Oct 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 14 additions & 20 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ classifiers = [
dependencies = [
"joblib>=1",
"matplotlib>=3.8",
"monty>=2024.7.29",
"monty>=2024.10.21",
"networkx>=3", # PR #4116
"palettable>=3.3.3",
"pandas>=2",
Expand All @@ -69,7 +69,7 @@ dependencies = [
# https://github.com/scipy/scipy/issues/21052
"scipy>=1.14.1; platform_system == 'Windows'",
"spglib>=2.5.0",
"sympy>=1.2",
"sympy>=1.3", # PR #4116
"tabulate>=0.9",
"tqdm>=4.60",
"uncertainties>=3.1.4",
Expand All @@ -87,40 +87,34 @@ Issues = "https://github.com/materialsproject/pymatgen/issues"
Pypi = "https://pypi.org/project/pymatgen"

[project.optional-dependencies]
abinit = ["netcdf4>=1.6.5"]
ase = ["ase>=3.23.0"]
# tblite only support Python 3.12+ through conda-forge
# https://github.com/tblite/tblite/issues/175
tblite = ["tblite[ase]>=0.3.0; python_version<'3.12'"]
vis = ["vtk>=6.0.0"]
abinit = ["netcdf4>=1.7.1"]
DanielYang59 marked this conversation as resolved.
Show resolved Hide resolved
mlp = ["chgnet>=0.3.8", "matgl>=1.1.3"]
electronic_structure = ["fdint>=2.0.2"]
ci = ["pytest-cov>=4", "pytest-split>=0.8", "pytest>=8"]
docs = ["invoke", "sphinx", "sphinx_markdown_builder", "sphinx_rtd_theme"]
electronic_structure = ["fdint>=2.0.2"]
mlp = ["chgnet>=0.3.8", "matgl>=1.1.3"]
numba = ["numba>=0.55"]
numpy-v1 = ["numpy>=1.25.0,<2"] # Test NP1 on Windows (quite buggy ATM)
optional = [
"ase>=3.23.0",
"pymatgen[abinit,ase,mlp,tblite]",
"beautifulsoup4",
# BoltzTraP2 build fails on Windows GitHub runners
"BoltzTraP2>=24.9.4 ; platform_system != 'Windows'",
"chemview>=0.6",
"chgnet>=0.3.8",
"f90nml>=1.1.2",
"galore>=0.6.1",
"h5py>=3.11.0",
"hiphive>=1.3.1",
"jarvis-tools>=2020.7.14",
"matgl>=1.1.3",
"matplotlib>=3.8",
"netCDF4>=1.6.5",
"openbabel-wheel>=3.1.1.20",
"phonopy>=2.23",
"seekpath>=2.0.1",
# tblite only support Python 3.12+ through conda-forge
# https://github.com/tblite/tblite/issues/175
"hiphive>=1.3.1",
"openbabel-wheel>=3.1.1.20",
"tblite[ase]>=0.3.0; platform_system=='Linux' and python_version<'3.12'",
]
numba = ["numba>=0.55"]
numpy-v1 = ["numpy>=1.25.0,<2"] # Test NP1 on Windows (quite buggy ATM)
# tblite only support Python 3.12+ through conda-forge
# https://github.com/tblite/tblite/issues/175
tblite = [ "tblite[ase]>=0.3.0; platform_system=='Linux' and python_version<'3.12'"]
vis = ["vtk>=6.0.0"]

[project.scripts]
pmg = "pymatgen.cli.pmg:main"
Expand Down