Skip to content

Commit

Permalink
NEB calculator with example of LiFePO4 by M3GNet-MS, M3GNet-DIRECT, a…
Browse files Browse the repository at this point in the history
…nd CHGNet (#13)

* Add NEB calculator

* update M3GNet loading to make M3GNet-DIRECT the default

* add visualization

* improve test coverage

* bump actions/setup-python to v5, checkout to v4

* compress to ~15% orig size

* format and rename examples/LiFePO4-NEB.ipynb

* fix relaxor spelling and add doc str

* use enumerate in NEBCalc.calc() and document return value unit

* from_end_images rename nimages kwarg to n_images

* sort notebook imports

* drop black for ruff format in CI

---------

Co-authored-by: JiQi535 <[email protected]>
Co-authored-by: Janosh Riebesell <[email protected]>
  • Loading branch information
3 people authored Dec 11, 2023
1 parent ac70860 commit e099a3b
Show file tree
Hide file tree
Showing 11 changed files with 1,083 additions and 20 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,21 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install dependencies
run: |
pip install ruff black mypy
pip install ruff mypy
- name: ruff
run: |
ruff --version
ruff check matcalc
- name: black
run: |
black --version
black --check --diff --color matcalc
ruff format matcalc --check
- name: mypy
run: |
mypy --version
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION: python

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
Expand All @@ -52,8 +52,8 @@ jobs:
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && inputs.task == 'release')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: "3.11"
Expand All @@ -75,7 +75,7 @@ jobs:
id-token: write
steps:
- name: Set up Python 3.11
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Get build artifacts
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ci:

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.6
rev: v0.1.7
hooks:
- id: ruff
args: [--fix]
Expand All @@ -30,7 +30,7 @@ repos:
hooks:
- id: codespell
stages: [commit, commit-msg]
exclude_types: [html, svg, javascript]
exclude_types: [html, svg, javascript, jupyter]
exclude: ^.+\.lock$ # ignore lock files
additional_dependencies: [tomli] # needed to read pyproject.toml below py3.11

Expand Down
Loading

0 comments on commit e099a3b

Please sign in to comment.