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

Migrate to new MP API, fix failing examples #61

Draft
wants to merge 20 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 5 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
13 changes: 6 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Runs the complete test suite incl. many external command line dependencies (like Openbabel)
# as well as the pymatgen.ext package. Coverage used to be computed based on this workflow.
# Runs the complete test suite incl. many external dependencies (like Openbabel)
name: Tests

on:
Expand All @@ -15,19 +14,18 @@ jobs:
test:
defaults:
run:
shell: bash -l {0} # enables conda/mamba env activation by reading bash profile
shell: bash -l {0} # enables conda/mamba env activation by reading bash profile
strategy:
fail-fast: false
matrix:
# pytest-split automatically distributes work load so parallel jobs finish in similar time
os: [ubuntu-latest]
python-version: ["3.11"]

runs-on: ${{ matrix.os }}

env:
PMG_MAPI_KEY: ${{ secrets.PMG_MAPI_KEY }}
PMG_VASP_PSP_DIR: /home/runner/work/matgenb/matgenb/psp
PMG_VASP_PSP_DIR: "${{ github.workspace }}/psp"

steps:
- name: Check out repo
Expand All @@ -42,7 +40,9 @@ jobs:
micromamba install -n venv -c conda-forge enumlib packmol bader openbabel openff-toolkit --yes

- name: Install uv
run: micromamba run -n venv pip install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"

- name: Install dependencies
run: |
Expand All @@ -54,5 +54,4 @@ jobs:
run: |
micromamba activate venv
cd notebooks
pwd
pytest --ignore-glob=*notest.ipynb --nbmake .
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,48 @@ ci:

repos:
- repo: https://github.com/psf/black
rev: 22.10.0
rev: 24.10.0
hooks:
- id: black-jupyter

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v5.0.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
rev: 7.1.1
hooks:
- id: flake8
additional_dependencies: [flake8-bugbear]

- repo: https://github.com/asottile/pyupgrade
rev: v3.2.3
rev: v3.19.0
hooks:
- id: pyupgrade
args: [--py39-plus]

- repo: https://github.com/PyCQA/autoflake
rev: v2.0.0
rev: v2.3.1
hooks:
- id: autoflake

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.991
rev: v1.13.0
hooks:
- id: mypy

- repo: https://github.com/nbQA-dev/nbQA
rev: 1.5.3
rev: 1.9.1
hooks:
- id: nbqa-pyupgrade
args: [--py39-plus]
- id: nbqa-isort

- repo: https://github.com/kynan/nbstripout
rev: 0.6.1
rev: 0.8.1
hooks:
- id: nbstripout
args: [--drop-empty-cells, --keep-output]
57 changes: 23 additions & 34 deletions notebooks/2017-09-03-Analyze and plot band structures.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion requirements-ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ nbmake
pymatgen
pymatgen-analysis-diffusion
mp-api
# BoltzTraP2 # Does not work because numpy not detected.
Copy link
Contributor Author

@DanielYang59 DanielYang59 Dec 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was related to a build time isolation issue from BoltzTraP2 side, have been fixed now

BoltzTraP2
phonopy
Loading