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

Merge setup.py into pyproject.toml #304

Merged
merged 5 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 1 addition & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# declare HTML, rST and test files as vendored/docs to exclude them when calculating repo languages on GitHub
**/test_files/**/* linguist-vendored
docs/**/* linguist-generated
docs_rst/**/* linguist-documentation
docs/**/* linguist-documentation
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ci:

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.3
rev: v0.1.5
hooks:
- id: ruff
args: [--fix, --ignore, D]
Expand Down
4 changes: 0 additions & 4 deletions MANIFEST.in

This file was deleted.

8 changes: 2 additions & 6 deletions custodian/custodian.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,8 @@
# not have CUSTODIAN_REPORTING_OPT_IN set to True, then
# Sentry will not be enabled.

SENTRY_DSN = None
if "SENTRY_DSN" in os.environ:
SENTRY_DSN = os.environ["SENTRY_DSN"]
elif "CUSTODIAN_REPORTING_OPT_IN" in os.environ and literal_eval(
os.environ.get("CUSTODIAN_REPORTING_OPT_IN", "False").title()
):
SENTRY_DSN = os.getenv("SENTRY_DSN")
if literal_eval(os.getenv("CUSTODIAN_REPORTING_OPT_IN", "False").title()):
# check for environment variable to automatically set SENTRY_DSN
# will set for True, true, TRUE, etc.
SENTRY_DSN = "https://0f7291738eb042a3af671df9fc68ae2a@sentry.io/1470881"
Expand Down
14 changes: 7 additions & 7 deletions custodian/vasp/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
logger = logging.getLogger(__name__)


VASP_INPUT_FILES = {"INCAR", "POSCAR", "POTCAR", "KPOINTS"}
VASP_INPUT_FILES = ("INCAR", "POSCAR", "POTCAR", "KPOINTS")

VASP_OUTPUT_FILES = [
VASP_OUTPUT_FILES = (
"DOSCAR",
"INCAR",
"KPOINTS",
Expand All @@ -40,13 +40,13 @@
"CONTCAR",
"IBZKPT",
"OUTCAR",
]
)

VASP_NEB_INPUT_FILES = {"INCAR", "POTCAR", "KPOINTS"}
VASP_NEB_INPUT_FILES = ("INCAR", "POTCAR", "KPOINTS")

VASP_NEB_OUTPUT_FILES = ["INCAR", "KPOINTS", "POTCAR", "vasprun.xml"]
VASP_NEB_OUTPUT_FILES = ("INCAR", "KPOINTS", "POTCAR", "vasprun.xml")

VASP_NEB_OUTPUT_SUB_FILES = [
VASP_NEB_OUTPUT_SUB_FILES = (
"CHG",
"CHGCAR",
"CONTCAR",
Expand All @@ -61,7 +61,7 @@
"OUTCAR",
"WAVECAR",
"XDATCAR",
]
)


class VaspJob(Job):
Expand Down
66 changes: 65 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,69 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "custodian"
version = "2023.10.9"
description = "A simple JIT job management framework in Python."
authors = [
{ name = "Shyue Ping Ong", email = "ongsp@ucsd.edu" },

{ name = "Matthew Horton" },
{ name = "Samuel M. Blau" },
{ name = "Stephen Dacek" },
{ name = "William Davidson Richards" },
{ name = "Xiaohui Qu" },

{ name = "Janosh Riebesell", email = "janosh@lbl.gov" },
]
maintainers = [{ name = "Janosh Riebesell" }, { name = "Shyue Ping Ong" }]
readme = "README.md"
keywords = ["jit", "job", "just-in-time", "management", "vasp"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.9",
"Topic :: Scientific/Engineering :: Chemistry",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Software Development :: Libraries :: Python Modules",
]
license = { file = "LICENSE" }
requires-python = ">=3.9"

dependencies = ["monty>=2.0.6", "psutil", "ruamel.yaml>=0.15.6"]

[project.optional-dependencies]
vasp = ["pymatgen"]
nwchem = ["pymatgen"]
qchem = ["pymatgen"]
dev = ["mypy", "pre-commit", "pytest", "pytest-cov", "ruff"]
error-statistics = ["sentry-sdk>=0.8.0"]

[project.scripts]
cstdn = "custodian.cli.cstdn:main"
run_vasp = "custodian.cli.run_vasp:main"
run_nwchem = "custodian.cli.run_nwchem:main"
converge_kpoints = "custodian.cli.converge_kpoints:main"
converge_geometry = "custodian.cli.converge_geometry:main"

[project.urls]
Docs = "https://materialsproject.github.io/custodian"
Repo = "https://github.com/materialsproject/custodian"
Package = "https://pypi.org/project/custodian"

[tool.setuptools.packages.find]
include = ["custodian*"]
exclude = ["*.tests", "*.tests.*", "test_files"]

[tool.ruff]
target-version = "py38"
target-version = "py39"
line-length = 120
select = [
"B", # flake8-bugbear
Expand Down
54 changes: 0 additions & 54 deletions setup.py

This file was deleted.