Skip to content

Commit

Permalink
DEV: Update WFacer to use pyproject.toml instead of setup.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
qchempku2017 committed Sep 14, 2023
1 parent a26dd46 commit 1834214
Show file tree
Hide file tree
Showing 4 changed files with 111 additions and 136 deletions.
11 changes: 6 additions & 5 deletions binder/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
nbgitpuller
pyyaml>=6.0
joblib==1.3.2
monty==2022.9.9
numpy==1.25.2
monty==2023.9.5
numpy==1.24.4
pymatgen==2023.08.10
smol>=0.3.0
sparse-lm>=0.3.0
sympy>=1.11.1
jobflow==0.1.13
atomate2>=0.0.8
atomate2>=0.0.11
scikit-learn==1.3.0
emmet-core==0.67.5
scikit-optimize==0.9.0
scipy==1.11.2
pydantic==1.10.9
scipy==1.10.1
pydantic==1.10.12
polytope==0.2.4
cvxpy==1.3.2
cvxopt==1.3.2
105 changes: 105 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
[build-system]
requires = ["setuptools>=45", "setuptools-scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"

[project]
name = "WFacer"
description = "An automated workflow for constructing cluster expansion."
authors = [
{name = "Fengyu Xie", email = "[email protected]"}
]
requires-python = ">=3.8"
readme = "README.md"
license = {text = "BSD 3-Clause License"}
dynamic = ["version"]
dependencies = [
"setuptools",
"numpy >=1.23.5",
"pymatgen >=2023.8.10, <2023.9.10",
"monty>=v2023.9.5",
"pyyaml>=6.0",
"joblib>=1.2.0",
"smol>=0.5.1",
"sparse-lm>=0.4.0",
"sympy>=1.11.1",
"jobflow>=0.1.9",
"atomate2>=0.0.11",
"emmet-core>=0.51.1",
"scikit-learn>=1.2.0",
"scikit-optimize>=0.9.0",
"scipy>=1.10.0, <=1.10.1",
"pydantic>=1.10.2,<2.0",
"polytope>=0.2.3",
"cvxpy>=1.2.1",
"cvxopt"
]
classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Software Development :: Libraries :: Python Modules"
]

[project.optional-dependencies]
dev = ["pre-commit", "black", "isort", "flake8", "pylint", "pydocstyle", "flake8-pyproject"]
# Gurobipy needed by mixedL0 tests.
tests = ["pytest >=7.2.0", "pytest-cov >=4.0.0", "coverage", "gurobipy", "pyscipopt>=4.0.0"]
docs = ["sphinx >= 5.3", "pydata-sphinx-theme >=0.12.0", "ipython >=8.2.0", "nbsphinx >=0.8.10",
"nbsphinx-link >=1.3.0", "nb2plots >=0.6.1"]
optional = ["gurobipy"]

# Specify to only package WFacer
[tool.setuptools.packages]
find = { include = ["WFacer*"], exclude = ["tests", "tests*", "binder", "examples"] }

[tool.setuptools_scm]

# linting tools, etc
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-x --durations = 30 --quiet -rxXs --color = yes"
filterwarnings = [
'ignore::UserWarning',
'ignore::FutureWarning',
'ignore::RuntimeWarning'
]

[tool.flake8]
exclude = ['docs', 'tests']
ignore = ['E203', 'E501', 'W503']
max-line-length = 88

[tool.pylint.main]
ignore = ["tests"]

[tool.pylint.basic]
argument-naming-style = "snake_case"
attr-naming-style = "snake_case"
method-naming-style = "snake_case"
function-naming-style = "snake_case"
class-naming-style = "PascalCase"
good-names = ['id', 'kB', 'i', 'j', 'k', 'f']

[tool.pylint."messages control"]
disable = ['W0511', 'R0904', 'R0903', 'R0913', 'R0902', 'R0914', 'C0415']

[tool.codespell]
skip = "*.c,./.*"
count = ''
quiet-level = 3
ignore-words-list = ['nd', 'tread', "titel"]

[tool.coverage.run]
source = ["./WFacer"]
omit = ["*/__init__.py"]

[tool.pydocstyle]
convention = "google"
add_ignore = ["D107"]
112 changes: 0 additions & 112 deletions setup.cfg

This file was deleted.

19 changes: 0 additions & 19 deletions setup.py

This file was deleted.

0 comments on commit 1834214

Please sign in to comment.