diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 6e80c5b..b0c720a 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -26,12 +26,12 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install --quiet -r requirements.txt -r requirements-ci.txt + pip install --quiet -r requirements.txt -r requirements-dev.txt pip install -e . - name: pytest run: | pytest --cov=pymatgen --cov-report=xml - + - uses: codecov/codecov-action@v1 if: matrix.python-version == 3.10 with: diff --git a/.gitignore b/.gitignore index 8efdf62..e1d30fa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,22 +1,139 @@ -.DS_Store -*.egg-info -*.o +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions *.so -*.pyc -*.swp -*.swo -dist -_build -build -.project -.pydevproject -.settings -.externalToolBuilders -.idea -setuptools* + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook .ipynb_checkpoints -.tox -pymatgen/\.vscode/ +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# PyCharm settings +.idea* +.DS_store +.log + +docs_build +examples/wip* .vscode/ diff --git a/pyproject.toml b/pyproject.toml index 5044665..ba9181e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,21 +1,110 @@ +[build-system] +build-backend = "setuptools.build_meta" +requires = ["setuptools >= 65.0.0", "versioningit ~= 1.0", "wheel"] + +[project] +authors = [ + { name = "Matthew Kuner", email = "matthewkuner@gmail.com" }, + { name = "Janosh Riebesell"}, + { name = "Jason Munro"}, + { name = "Aaron Kaplan"}, +] +classifiers = [ + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Development Status :: 4 - Beta", + "Intended Audience :: Science/Research", + "Operating System :: OS Independent", + "Topic :: Scientific/Engineering", + "Topic :: Scientific/Engineering :: Information Analysis", + "Topic :: Scientific/Engineering :: Physics", + "Topic :: Scientific/Engineering :: Chemistry", + "Topic :: Software Development :: Libraries :: Python Modules", +] +dependencies = [ + "pymatgen", + "numpy" +] +description = "A comprehensive I/O validator for electronic structure calculations" +dynamic = ["version"] +keywords = ["io", "validation", "dft", "vasp"] +license = { text = "modified BSD" } +name = "pymatgen-io-validation" +readme = "README.rst" +requires-python = '>=3.8' + +[project.optional-dependencies] +dev = ["pre-commit>=2.12.1"] +#docs = ["jupyter-book>=0.13.1",] + + +tests = ["pytest==7.4.2", "pytest-cov==4.1.0"] + + +[tool.setuptools.dynamic] +readme = { file = ["README.rst"] } + +#[project.urls] +#repository = "https://github.com/materialsproject/pymatgen-io-validation" + +[tool.setuptools.packages.find] +exclude = ["tests"] +where = ["./"] + +[tool.versioningit.vcs] +default-tag = "0.0.1" +method = "git" + +[tool.isort] +profile = "black" + [tool.black] line-length = 120 -target-version = ['py38'] -include = '\.pyi?$' -exclude = ''' - -( - /( - \.eggs # exclude a few common directories in the - | \.git # root of the project - | \.hg - | \.mypy_cache - | \.tox - | \.venv - | _build - | buck-out - | build - | dist - )/ -) -''' + +[tool.blacken-docs] +line-length = 120 + +[tool.flake8] +extend-ignore = "E203, W503, E501, F401, RST21" +max-line-length = 120 +max-doc-length = 120 +min-python-version = "3.8.0" +rst-roles = "class, func, ref, obj" +select = "C, E, F, W, B, B950" + +[tool.mypy] +ignore_missing_imports = true +no_strict_optional = true + +[tool.coverage.run] +branch = true +include = ["pymatgen/*"] +parallel = true + +[tool.coverage.paths] +source = ["pymatgen/"] + +[tool.coverage.report] +show_missing = true +skip_covered = true + +[tool.pydocstyle] +convention = 'google' +match = '^pymatgen/(?!_).*\.py' +inherit = false +add-ignore = "D107, " + +[tool.autoflake] +in-place = true +remove-unused-variables = true +remove-all-unused-imports = true +expand-star-imports = true +ignore-init-module-imports = true + + +[tool.setuptools.packages.find] +exclude = ["tests"] +where = ["./"] diff --git a/requirements-ci.txt b/requirements-dev.txt similarity index 100% rename from requirements-ci.txt rename to requirements-dev.txt diff --git a/requirements.txt b/requirements.txt index a523d91..bad638f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,9 @@ -pymatgen==2022.4.19 +pymatgen==2023.10.11 +emmet-core==0.72.7 +pydantic==2.4.2 +pydantic-core==2.10.1 +pydantic-settings==2.0.3 +typing-extensions==4.8.0 +monty==2023.9.25 +numpy==1.26.1 +requests==2.31.0