-
Notifications
You must be signed in to change notification settings - Fork 867
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate to pyproject.toml for everything except for extensions.
- Loading branch information
Showing
3 changed files
with
229 additions
and
241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,167 @@ | ||
[build-system] | ||
requires = [ | ||
"Cython>=0.29.23", | ||
# pin NumPy version used in the build | ||
"oldest-supported-numpy", | ||
"setuptools>=65.0.0", | ||
"Cython>=0.29.23", | ||
# pin NumPy version used in the build | ||
"oldest-supported-numpy", | ||
"setuptools>=65.0.0", | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
|
||
[project] | ||
name = "pymatgen" | ||
authors = [ | ||
{ name = "Pymatgen Development Team", email = "[email protected]" }, | ||
] | ||
description = """ | ||
Python Materials Genomics is a robust materials analysis code that defines core object representations for structures | ||
and molecules with support for many electronic structure codes. It is currently the core analysis code powering the | ||
Materials Project (https://materialsproject.org).""" | ||
readme = "README.md" | ||
requires-python = ">=3.9" | ||
keywords = [ | ||
"ABINIT", | ||
"analysis", | ||
"crystal", | ||
"diagrams", | ||
"electronic", | ||
"gaussian", | ||
"materials", | ||
"nwchem", | ||
"phase", | ||
"project", | ||
"qchem", | ||
"science", | ||
"structure", | ||
"VASP", | ||
] | ||
license = { text = "MIT" } | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: 3", | ||
"Topic :: Scientific/Engineering :: Chemistry", | ||
"Topic :: Scientific/Engineering :: Information Analysis", | ||
"Topic :: Scientific/Engineering :: Physics", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
] | ||
dependencies = [ | ||
"matplotlib>=3.8", | ||
"monty>=2024.5.24", | ||
"networkx>=2.2", | ||
"numpy>=1.25.0", | ||
"palettable>=3.1.1", | ||
"pandas>=2", | ||
"plotly>=4.5.0", | ||
"pybtex>=0.24.0", | ||
"requests>=2.32", | ||
"ruamel.yaml>=0.17.0", | ||
"scipy>=1.13.0", | ||
"spglib>=2.0.2", | ||
"sympy>=1.2", | ||
"tabulate>=0.9", | ||
"tqdm>=4.60", | ||
"uncertainties>=3.1.4", | ||
"joblib>=1", | ||
] | ||
version = "2024.6.10" | ||
|
||
[project.urls] | ||
Homepage = "https://pymatgen.org" | ||
Documentation = "https://pymatgen.org" | ||
Repository = "https://github.com/materialsproject/pymatgen" | ||
Issues = "https://github.com/materialsproject/pymatgen/issues" | ||
Pypi = "https://pypi.org/project/pymatgen" | ||
|
||
[project.optional-dependencies] | ||
ase = ["ase>=3.23.0"] | ||
# don't depend on tblite above 3.11 since unsupported 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.6.5"] | ||
mlp = ["matgl>=1.1.1", "chgnet>=0.3.8"] | ||
electronic_structure = ["fdint>=2.0.2"] | ||
dev = [ | ||
"mypy>=1.10.0", | ||
"pre-commit>=3", | ||
"pytest-cov>=4", | ||
"pytest-split>=0.8", | ||
"pytest>8", | ||
"ruff>=0.4", | ||
] | ||
ci = [ | ||
"pytest>=8", | ||
"pytest-cov>=4", | ||
"pytest-split>=0.8", | ||
] | ||
docs = [ | ||
"sphinx", | ||
"sphinx_rtd_theme", | ||
"doc2dash", | ||
] | ||
optional = [ | ||
"ase>=3.23.0", | ||
# TODO restore BoltzTraP2 when install fixed, hopefully following merge of | ||
# https://gitlab.com/sousaw/BoltzTraP2/-/merge_requests/18 | ||
# caused CI failure due to ModuleNotFoundError: No module named 'packaging' | ||
# "BoltzTraP2>=22.3.2; platform_system!='Windows'", | ||
"chemview>=0.6", | ||
"chgnet>=0.3.8", | ||
"f90nml>=1.1.2", | ||
"galore>=0.6.1", | ||
"h5py>=3.11.0", | ||
"jarvis-tools>=2020.7.14", | ||
"matgl>=1.1.1", | ||
"netCDF4>=1.6.5", | ||
"phonopy>=2.23", | ||
"seekpath>=2.0.1", | ||
# don't depend on tblite above 3.11 since unsupported https://github.com/tblite/tblite/issues/175 | ||
"tblite[ase]>=0.3.0; platform_system=='Linux' and python_version<'3.12'", | ||
# "hiphive>=0.6", | ||
# "openbabel>=3.1.1; platform_system=='Linux'", | ||
] | ||
numba = ["numba>=0.55"] | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["."] | ||
include = ["pymatgen.*"] | ||
|
||
[tool.setuptools.package-data] | ||
"pymatgen.analysis" = ["*.yaml", "*.json", "*.csv"] | ||
"pymatgen.analysis.chemenv" = [ | ||
"coordination_environments/coordination_geometries_files/*.json", | ||
"coordination_environments/coordination_geometries_files/*.txt", | ||
"coordination_environments/strategy_files/ImprovedConfidenceCutoffDefaultParameters.json", | ||
] | ||
"pymatgen.analysis.structure_prediction" = ["*.yaml", "data/*.json"] | ||
"pymatgen.analysis.diffraction" = ["*.json"] | ||
"pymatgen.analysis.magnetism" = ["default_magmoms.yaml"] | ||
"pymatgen.analysis.solar" = ["am1.5G.dat"] | ||
"pymatgen.entries" = ["*.json.gz", "*.yaml", "data/*.json"] | ||
"pymatgen.core" = ["*.json"] | ||
"pymatgen" = ["py.typed"] | ||
"pymatgen.io.vasp" = ["*.yaml", "*.json", "*.json.gz", "*.json.bz2"] | ||
"pymatgen.io.feff" = ["*.yaml"] | ||
"pymatgen.io.cp2k" = ["*.yaml"] | ||
"pymatgen.io.lobster" = ["lobster_basis/*.yaml"] | ||
"pymatgen.command_line" = ["*"] | ||
"pymatgen.util" = ["structures/*.json", "*.json"] | ||
"pymatgen.vis" = ["*.yaml"] | ||
"pymatgen.io.lammps" = ["CoeffsDataType.yaml", "templates/*.template"] | ||
"pymatgen.symmetry" = ["*.yaml", "*.json", "*.sqlite"] | ||
|
||
[project.scripts] | ||
pmg = "pymatgen.cli.pmg:main" | ||
feff_plot_cross_section = "pymatgen.cli.feff_plot_cross_section:main" | ||
feff_plot_dos = "pymatgen.cli.feff_plot_dos:main" | ||
get_environment = "pymatgen.cli.get_environment:main" | ||
|
||
[tool.versioningit.vcs] | ||
method = "git" | ||
default-tag = "0.0.1" | ||
|
@@ -25,55 +180,55 @@ line-length = 120 | |
|
||
[tool.ruff.lint] | ||
select = [ | ||
"B", # flake8-bugbear | ||
"C4", # flake8-comprehensions | ||
"D", # pydocstyle | ||
"E", # pycodestyle error | ||
"EXE", # flake8-executable | ||
"F", # pyflakes | ||
"FA", # flake8-future-annotations | ||
"FBT003", # boolean-positional-value-in-call | ||
"FLY", # flynt | ||
"I", # isort | ||
"ICN", # flake8-import-conventions | ||
"ISC", # flake8-implicit-str-concat | ||
"PD", # pandas-vet | ||
"PERF", # perflint | ||
"PIE", # flake8-pie | ||
"PL", # pylint | ||
"PLR0402", | ||
"PLR1714", | ||
"PLR5501", | ||
"PT", # flake8-pytest-style | ||
"PYI", # flakes8-pyi | ||
"Q", # flake8-quotes | ||
"RET", # flake8-return | ||
"RSE", # flake8-raise | ||
"RUF", # Ruff-specific rules | ||
"SIM", # flake8-simplify | ||
"SLOT", # flake8-slots | ||
"TCH", # flake8-type-checking | ||
"TID", # flake8-tidy-imports | ||
"UP", # pyupgrade | ||
"W", # pycodestyle warning | ||
"YTT", # flake8-2020 | ||
"B", # flake8-bugbear | ||
"C4", # flake8-comprehensions | ||
"D", # pydocstyle | ||
"E", # pycodestyle error | ||
"EXE", # flake8-executable | ||
"F", # pyflakes | ||
"FA", # flake8-future-annotations | ||
"FBT003", # boolean-positional-value-in-call | ||
"FLY", # flynt | ||
"I", # isort | ||
"ICN", # flake8-import-conventions | ||
"ISC", # flake8-implicit-str-concat | ||
"PD", # pandas-vet | ||
"PERF", # perflint | ||
"PIE", # flake8-pie | ||
"PL", # pylint | ||
"PLR0402", | ||
"PLR1714", | ||
"PLR5501", | ||
"PT", # flake8-pytest-style | ||
"PYI", # flakes8-pyi | ||
"Q", # flake8-quotes | ||
"RET", # flake8-return | ||
"RSE", # flake8-raise | ||
"RUF", # Ruff-specific rules | ||
"SIM", # flake8-simplify | ||
"SLOT", # flake8-slots | ||
"TCH", # flake8-type-checking | ||
"TID", # flake8-tidy-imports | ||
"UP", # pyupgrade | ||
"W", # pycodestyle warning | ||
"YTT", # flake8-2020 | ||
] | ||
ignore = [ | ||
"B023", # Function definition does not bind loop variable | ||
"B028", # No explicit stacklevel keyword argument found | ||
"B904", # Within an except clause, raise exceptions with ... | ||
"C408", # unnecessary-collection-call | ||
"D105", # Missing docstring in magic method | ||
"D205", # 1 blank line required between summary line and description | ||
"D212", # Multi-line docstring summary should start at the first line | ||
"PD901", # pandas-df-variable-name | ||
"PERF203", # try-except-in-loop | ||
"PERF401", # manual-list-comprehension | ||
"PLR", # pylint refactor | ||
"PLW2901", # Outer for loop variable overwritten by inner assignment target | ||
"PT013", # pytest-incorrect-pytest-import | ||
"PTH", # prefer pathlib to os.path | ||
"SIM105", # Use contextlib.suppress() instead of try-except-pass | ||
"B023", # Function definition does not bind loop variable | ||
"B028", # No explicit stacklevel keyword argument found | ||
"B904", # Within an except clause, raise exceptions with ... | ||
"C408", # unnecessary-collection-call | ||
"D105", # Missing docstring in magic method | ||
"D205", # 1 blank line required between summary line and description | ||
"D212", # Multi-line docstring summary should start at the first line | ||
"PD901", # pandas-df-variable-name | ||
"PERF203", # try-except-in-loop | ||
"PERF401", # manual-list-comprehension | ||
"PLR", # pylint refactor | ||
"PLW2901", # Outer for loop variable overwritten by inner assignment target | ||
"PT013", # pytest-incorrect-pytest-import | ||
"PTH", # prefer pathlib to os.path | ||
"SIM105", # Use contextlib.suppress() instead of try-except-pass | ||
] | ||
pydocstyle.convention = "google" | ||
isort.required-imports = ["from __future__ import annotations"] | ||
|
@@ -97,31 +252,31 @@ addopts = "--durations=30 --quiet -r xXs --color=yes -p no:warnings --import-mod | |
[tool.coverage.run] | ||
parallel = true | ||
omit = [ | ||
"pymatgen/cli/feff_plot_cross_section.py", | ||
"pymatgen/cli/feff_plot_dos.py", | ||
"pymatgen/cli/pmg_config.py", | ||
"pymatgen/cli/pmg_plot.py", | ||
"pymatgen/cli/pmg_potcar.py", | ||
"pymatgen/cli/pmg_query.py", | ||
"pymatgen/dao.py", | ||
"pymatgen/cli/feff_plot_cross_section.py", | ||
"pymatgen/cli/feff_plot_dos.py", | ||
"pymatgen/cli/pmg_config.py", | ||
"pymatgen/cli/pmg_plot.py", | ||
"pymatgen/cli/pmg_potcar.py", | ||
"pymatgen/cli/pmg_query.py", | ||
"pymatgen/dao.py", | ||
] | ||
|
||
[tool.coverage.report] | ||
exclude_also = [ | ||
"@deprecated", | ||
"@np.deprecate", | ||
"def __repr__", | ||
"except ImportError:", | ||
"if 0:", | ||
"if TYPE_CHECKING:", | ||
"if __name__ == .__main__.:", | ||
"if self.debug:", | ||
"if settings.DEBUG", | ||
"if typing.TYPE_CHECKING:", | ||
"pragma: no cover", | ||
"raise AssertionError", | ||
"raise NotImplementedError", | ||
"show_plot", | ||
"@deprecated", | ||
"@np.deprecate", | ||
"def __repr__", | ||
"except ImportError:", | ||
"if 0:", | ||
"if TYPE_CHECKING:", | ||
"if __name__ == .__main__.:", | ||
"if self.debug:", | ||
"if settings.DEBUG", | ||
"if typing.TYPE_CHECKING:", | ||
"pragma: no cover", | ||
"raise AssertionError", | ||
"raise NotImplementedError", | ||
"show_plot", | ||
] | ||
|
||
[tool.mypy] | ||
|
Oops, something went wrong.