Skip to content

Commit

Permalink
Merge branch 'materialsproject:main' into hiphive
Browse files Browse the repository at this point in the history
  • Loading branch information
hrushikesh-s authored Oct 22, 2023
2 parents dcfda62 + 104244d commit d5ad270
Show file tree
Hide file tree
Showing 154 changed files with 2,231 additions and 1,417 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: testing
on:
push:
branches: [main]
tags: ['v*']
tags: ["v*"]
pull_request:
branches: [main]
workflow_dispatch:

jobs:
lint:
Expand Down Expand Up @@ -43,9 +43,16 @@ jobs:
cache-dependency-path: pyproject.toml

- name: Install dependencies
# ERROR: Cannot install atomate2 and atomate2[strict,tests]==0.0.1 because these package versions have conflicting dependencies.
# The conflict is caused by:
# atomate2[strict,tests] 0.0.1 depends on pymatgen>=2023.10.4
# atomate2[strict,tests] 0.0.1 depends on pymatgen==2023.10.4; extra == "strict"
# ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
# chgnet 0.2.1 depends on pymatgen>=2023.5.31
# emmet-core 0.70.0 depends on pymatgen>=2023.10.11
run: |
python -m pip install --upgrade pip
pip install .[strict,tests]
pip install .[strict,tests]
- name: Test
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
auto-update:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

Expand Down
13 changes: 6 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
default_language_version:
python: python3
exclude: '^.github/'
repos:
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.287
rev: v0.1.1
hooks:
- id: ruff
args: [--fix]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-yaml
- id: fix-encoding-pragma
args: [--remove]
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 23.7.0
rev: 23.10.0
hooks:
- id: black
- repo: https://github.com/asottile/blacken-docs
Expand Down Expand Up @@ -46,7 +45,7 @@ repos:
- id: rst-directive-colons
- id: rst-inline-touching-normal
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
rev: v1.6.1
hooks:
- id: mypy
files: ^src/
Expand All @@ -55,9 +54,9 @@ repos:
- types-pkg_resources==0.1.2
- types-paramiko
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
rev: v2.2.6
hooks:
- id: codespell
stages: [commit, commit-msg]
args: [--ignore-words-list, 'titel,statics,ba,nd,te']
args: [--ignore-words-list, 'titel,statics,ba,nd,te,atomate']
types_or: [python, rst, markdown]
1 change: 1 addition & 0 deletions ADMIN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Version releases on Pypi and GitHub are handled automatically through GitHub
actions. The steps to push a new release are:

1. Update `CHANGELOG.md` with a new version and release notes.
2. Create a tagged Git commit with the above changes: `git tag v0.0.1`
3. Push the commit and tags to GitHub using: `git push origin --tags`
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,8 @@ Atomate2 is released under a modified BSD license; the full text can be found [h

## Acknowledgements

Atomate2 was designed and developed by Alex Ganose.

A full list of all contributors can be found [here][contributors].
The development of atomate2 has benefited from many people across several research groups.
A full list of contributors can be found [here][contributors].

[pymatgen]: https://pymatgen.org
[fireworks]: https://materialsproject.github.io/fireworks/
Expand Down
25 changes: 23 additions & 2 deletions docs/about/contributors.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
[gh]: https://cdnjs.cloudflare.com/ajax/libs/octicons/8.5.0/svg/mark-github.svg
[orc]: ../_static/orcid.svg

atomate2 was designed and developed by **Alex Ganose** [![gh]][utf] [![orc]][0000-0002-4486-3321].
The first version of atomate2 was designed and developed by **Alex Ganose** [![gh]][utf] [![orc]][0000-0002-4486-3321].

[utf]: https://github.com/utf
[0000-0002-4486-3321]: https://orcid.org/0000-0002-4486-3321

Additional contributions have been provided by:
Further substantial contributions have been provided by:

**Andrew Rosen** [![gh]][Andrew-S-Rosen] [![orc]][0000-0002-0141-7006] \
Assistant Professor of Chemical & Biological Engineering \
Expand Down Expand Up @@ -95,3 +95,24 @@ University of California, Berkeley

[mattmcdermott]: https://github.com/mattmcdermott
[0000-0002-4071-3000]: https://orcid.org/0000-0002-4071-3000

**Thomas Purcell** [![gh]][tpurcell90] [![orc]][0000-0003-4564-7206] \
Assistant Professor of Chemistry \
University of Arizona

[tpurcell90]: https://github.com/tpurcell90
[0000-0003-4564-7206]: https://orcid.org/0000-0003-4564-7206

**Alexander Bonkowski** [![gh]][ab5424] [![orc]][0000-0002-0525-4742] \
PhD student in Chemistry \
RWTH Aachen University

[ab5424]: https://github.com/ab5424
[0000-0002-0525-4742]: https://orcid.org/0000-0002-0525-4742

**Matthew Kuner** [![gh]][matthewkuner] [![orc]][0000-0002-8218-8558] \
PhD student in Materials Science and Engineering \
University of California, Berkeley

[matthewkuner]: https://github.com/matthewkuner
[0000-0002-8218-8558]: https://orcid.org/0000-0002-8218-8558
108 changes: 57 additions & 51 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ classifiers = [
"Intended Audience :: System Administrators",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.9",
"Topic :: Other/Nonlisted Topic",
"Topic :: Scientific/Engineering",
Expand All @@ -28,54 +28,56 @@ dependencies = [
"PyYAML",
"click",
"custodian>=2023.3.10",
"emmet-core>=0.65.0",
"emmet-core>=0.70.5",
"jobflow>=0.1.11",
"monty",
"monty>=2023.9.25",
"numpy",
"pydantic",
"pymatgen>=2023.1.9",
"pydantic-settings>=2.0.3",
"pydantic>=2.0.1",
"pymatgen>=2023.10.11",
]

[project.optional-dependencies]
amset = ["amset>=0.4.15", "pydash"]
cclib = ["cclib"]
mp = ["mp-api>=0.27.5"]
mp = ["mp-api>=0.37.5"]
phonons = ["phonopy>=1.10.8", "seekpath"]
lobster = ["lobsterpy>=0.3.1"]
lobster = ["lobsterpy>=0.3.2"]
defects = ["dscribe>=1.2.0", "pymatgen-analysis-defects>=2022.11.30"]
forcefields = ["chgnet==0.2.0", "matgl==0.8.3", "quippy-ase==0.9.14"]
forcefields = ["chgnet>=0.2.2", "matgl>=0.8.3", "quippy-ase>=0.9.14"]
docs = [
"FireWorks==2.0.3",
"autodoc_pydantic==1.9.0",
"autodoc_pydantic==2.0.1",
"furo==2023.9.10",
"ipython==8.16.0",
"ipython==8.16.1",
"jsonschema[format]",
"myst_parser==2.0.0",
"numpydoc==1.6.0",
"sphinx==7.2.6",
"sphinx-copybutton==0.5.2",
"sphinx==7.2.6",
"sphinx_design==0.5.0",
]
dev = ["pre-commit>=2.12.1"]
tests = ["FireWorks==2.0.3", "pytest-cov==4.1.0", "pytest==7.4.2"]
strict = [
"PyYAML==6.0.1",
"cclib==1.8",
"chgnet==0.2.0",
"chgnet==0.2.2",
"click==8.1.7",
"custodian==2023.7.22",
"custodian==2023.10.9",
"dscribe==2.1.0",
"emmet-core==0.68.0",
"jobflow==0.1.13",
"lobsterpy==0.3.1",
"emmet-core==0.70.5",
"jobflow==0.1.14",
"lobsterpy==0.3.2",
"matgl==0.8.3",
"monty==2023.9.5",
"mp-api==0.35.1",
"monty==2023.9.25",
"mp-api==0.37.5",
"numpy",
"phonopy==2.20.0",
"pydantic==1.10.9",
"pydantic-settings==2.0.3",
"pydantic==2.4.2",
"pymatgen-analysis-defects==2023.8.22",
"pymatgen==2023.9.10",
"pymatgen==2023.10.11",
"quippy-ase==0.9.14",
"seekpath==2.1.0",
"typing-extensions==4.8.0",
Expand Down Expand Up @@ -114,6 +116,7 @@ ignore_missing_imports = true
no_strict_optional = true

[tool.pytest.ini_options]
addopts = "-p no:warnings --import-mode=importlib"
filterwarnings = [
"ignore:.*POTCAR.*:UserWarning",
"ignore:.*input structure.*:UserWarning",
Expand All @@ -140,36 +143,37 @@ exclude_lines = [
]

[tool.ruff]
target-version = "py38"
target-version = "py39"
select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"D", # pydocstyle
"E", # pycodestyle error
"EXE", # flake8-executable
"F", # pyflakes
"FLY", # flynt
"I", # isort
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"PD", # pandas-vet
"PERF", # perflint
"PIE", # flake8-pie
"PL", # pylint
"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", # tidy imports
"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
"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 = [
"PD011", # pandas-use-of-dot-values
Expand All @@ -190,5 +194,7 @@ isort.known-first-party = ["atomate2"]
"**/tests/*" = ["D"]
# flake8-type-checking (TCH): things inside TYPE_CHECKING aren't available
# at runtime and so can't be used by pydantic models
# flake8-future-annotations (FA): future annotations only work in pydantic models in python 3.10+
"**/schemas/*" = ["FA", "TCH"]
# flake8-future-annotations (FA): pipe operator for type unions only work in pydantic models in python 3.10+
"**/schemas/*" = ["FA", "TCH", "UP007"]
"**/schemas.py" = ["FA", "TCH", "UP007"]
"**/settings.py" = ["FA", "TCH", "UP007"]
4 changes: 2 additions & 2 deletions src/atomate2/amset/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def copy_amset_files(
src_dir: Path | str,
src_host: str | None = None,
file_client: FileClient = None,
):
) -> None:
"""
Copy AMSET files to current directory.
Expand Down Expand Up @@ -78,7 +78,7 @@ def copy_amset_files(
logger.info("Finished copying inputs")


def write_amset_settings(settings_updates: dict, from_prev: bool = False):
def write_amset_settings(settings_updates: dict, from_prev: bool = False) -> None:
"""
Write AMSET settings to file.
Expand Down
2 changes: 1 addition & 1 deletion src/atomate2/amset/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def make(
wavefunction_dir: str | Path = None,
deformation_dir: str | Path = None,
bandstructure_dir: str | Path = None,
):
) -> Response:
"""
Run an AMSET calculation.
Expand Down
2 changes: 1 addition & 1 deletion src/atomate2/amset/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
_CONVERGENCE_PROPERTIES = ("mobility.overall", "seebeck")


def run_amset():
def run_amset() -> None:
"""Run amset in the current directory."""
# Run AMSET using the command line as calling from python can cause issues
# with multiprocessing
Expand Down
Loading

0 comments on commit d5ad270

Please sign in to comment.