Skip to content

Commit

Permalink
Merge branch 'develop' into publish-gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
atztogo committed Jun 29, 2024
2 parents c49bdb1 + 6ae8b66 commit a5be390
Show file tree
Hide file tree
Showing 60 changed files with 1,391 additions and 694 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/phono3py-pytest-conda-mkl-phphmtblas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
python-version: ["3.12"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
# Use conda-incubator/setup-miniconda for precise control of conda infrastructure
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
- name: Install dependent packages
Expand All @@ -26,6 +26,13 @@ jobs:
conda install --yes python=${{ matrix.python-version }}
#conda install --yes matplotlib-base pyyaml "libblas=*=*openblas" openblas h5py scipy pytest codecov pytest-cov spglib alm cmake c-compiler
conda install --yes matplotlib-base pyyaml "libblas=*=*mkl" mkl-include h5py scipy pytest codecov pytest-cov spglib alm cmake c-compiler
- name: Install symfc develop branch
run: |
conda activate test
git clone --depth 1 https://github.com/symfc/symfc.git
cd symfc
pip install -e . -vvv
cd ..
- name: Install phonopy develop branch
run: |
conda activate test
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/phono3py-pytest-conda-mkl-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
python-version: ["3.12"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
# Use conda-incubator/setup-miniconda for precise control of conda infrastructure
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
- name: Install dependent packages
Expand All @@ -26,6 +26,13 @@ jobs:
conda install --yes python=${{ matrix.python-version }}
#conda install --yes matplotlib-base pyyaml "libblas=*=*openblas" openblas h5py scipy pytest codecov pytest-cov spglib alm cmake c-compiler
conda install --yes matplotlib-base pyyaml "libblas=*=*mkl" mkl-include h5py scipy pytest codecov pytest-cov spglib alm cmake c-compiler
- name: Install symfc develop branch
run: |
conda activate test
git clone --depth 1 https://github.com/symfc/symfc.git
cd symfc
pip install -e . -vvv
cd ..
- name: Install phonopy develop branch
run: |
conda activate test
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/phono3py-pytest-conda-mkl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
python-version: ["3.12"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
# Use conda-incubator/setup-miniconda for precise control of conda infrastructure
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
- name: Install dependent packages
Expand All @@ -26,6 +26,13 @@ jobs:
conda install --yes python=${{ matrix.python-version }}
#conda install --yes matplotlib-base pyyaml "libblas=*=*openblas" openblas h5py scipy pytest codecov pytest-cov spglib alm cmake c-compiler
conda install --yes matplotlib-base pyyaml "libblas=*=*mkl" mkl-include h5py scipy pytest codecov pytest-cov spglib alm cmake c-compiler
- name: Install symfc develop branch
run: |
conda activate test
git clone --depth 1 https://github.com/symfc/symfc.git
cd symfc
pip install -e . -vvv
cd ..
- name: Install phonopy develop branch
run: |
conda activate test
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/phono3py-pytest-conda-numpy2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Pytest with openblas and numpy 2.0

on:
pull_request:
branches: [ develop ]

jobs:
build-linux:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
strategy:
matrix:
python-version: ["3.12"]

steps:
- uses: actions/checkout@v4
# Use conda-incubator/setup-miniconda for precise control of conda infrastructure
- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
- name: Install dependent packages
run: |
conda activate test
conda install --yes python=${{ matrix.python-version }}
conda install --yes matplotlib-base pyyaml "libblas=*=*openblas" openblas h5py "numpy=2" scipy pytest codecov pytest-cov cmake c-compiler
- name: Install spglib develop branch
run: |
conda activate test
git clone --depth 1 https://github.com/spglib/spglib.git
cd spglib
pip install -e . -vvv
cd ..
- name: Install symfc develop branch
run: |
conda activate test
git clone --depth 1 https://github.com/symfc/symfc.git
cd symfc
pip install -e . -vvv
cd ..
- name: Install phonopy develop branch
run: |
conda activate test
git clone --depth 1 https://github.com/phonopy/phonopy.git
cd phonopy
PHONOPY_USE_OPENMP=true pip install -e . -vvv
cd ..
- name: Install phono3py
run: |
conda activate test
pip install -e . -vvv
- name: Run pytest
run: |
pytest -v test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
verbose: true
11 changes: 9 additions & 2 deletions .github/workflows/phono3py-pytest-conda-phphmtblas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
python-version: ["3.12"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
# Use conda-incubator/setup-miniconda for precise control of conda infrastructure
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
- name: Install dependent packages
Expand All @@ -26,6 +26,13 @@ jobs:
conda install --yes python=${{ matrix.python-version }}
conda install --yes matplotlib-base pyyaml "libblas=*=*openblas" openblas h5py scipy pytest codecov pytest-cov spglib alm cmake c-compiler
#conda install --yes matplotlib-base pyyaml "libblas=*=*mkl" mkl-include h5py scipy pytest codecov pytest-cov spglib alm cmake c-compiler
- name: Install symfc develop branch
run: |
conda activate test
git clone --depth 1 https://github.com/symfc/symfc.git
cd symfc
pip install -e . -vvv
cd ..
- name: Install phonopy develop branch
run: |
conda activate test
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/phono3py-pytest-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
# Use conda-incubator/setup-miniconda for precise control of conda infrastructure
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
- name: Install dependent packages
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
python-version: ["3.11"]

steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
channels: conda-forge
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
python-version: ["3.10", ]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
# Use conda-incubator/setup-miniconda for precise control of conda infrastructure
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
channels: conda-forge
Expand Down
29 changes: 5 additions & 24 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,12 @@ repos:
exclude: ^conda/
- id: check-added-large-files

- repo: https://github.com/pycqa/flake8
rev: 7.0.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.10
hooks:
- id: flake8
args:
- "--max-line-length=88"
- "--ignore=E203,W503"

- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
args:
- --line-length=88

- repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle

- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
- id: ruff
args: [ "--fix", "--show-fixes" ]
- id: ruff-format

- repo: https://github.com/Takishima/cmake-pre-commit-hooks
rev: v1.9.6
Expand Down
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,40 @@

# phono3py

A simulation package of phonon-phonon interaction related properties. Phono3py
user documentation is found at http://phonopy.github.io/phono3py/.
A simulation package of phonon-phonon interaction related properties mainly
written in python. Phono3py user documentation is found at
http://phonopy.github.io/phono3py/.

## Mailing list for questions

Usual phono3py questions should be sent to phonopy mailing list
(https://sourceforge.net/p/phonopy/mailman/).

## Dependency

See `requirements.txt`. Optionally `symfc` and `scipy` are required
for using additional features.

## Development

The development of phono3py is managed on the `develop` branch of github
phono3py repository.

- Github issues is the place to discuss about phono3py issues.
- Github pull request is the place to request merging source code.
- Python 3.7 is the minimum requirement.
- Formatting is written in `pyproject.toml`.
- Not strictly, but VSCode's `settings.json` may be written like
- Formatting rules are found in `pyproject.toml`.
- Not strictly, but VSCode's `settings.json` may be written like below

```json
"python.linting.flake8Enabled": true,
"python.linting.flake8Args": ["--max-line-length=88", "--ignore=E203,W503"],
"python.linting.enabled": true,
"python.linting.pylintEnabled": false,
"python.linting.mypyEnabled": true,
"python.linting.pycodestyleEnabled": false,
"python.linting.pydocstyleEnabled": true,
"python.formatting.provider": "black",
"python.formatting.blackArgs": ["--line-length=88"],
"python.sortImports.args": ["--profile", "black"],
"ruff.lint.args": [
"--config=${workspaceFolder}/pyproject.toml",
],
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
}
"source.organizeImports": "explicit"
}
},
```

- Use of pre-commit (https://pre-commit.com/) is encouraged.
Expand All @@ -57,7 +56,8 @@ stored in `doc` directory. Please see how to write the documentation at

## How to run tests

You need pytest. At home directory of phono3py after setup,
Tests are written using pytest. To run tests, pytest has to be installed. The
tests can be run by

```bash
% pytest
Expand Down
10 changes: 10 additions & 0 deletions doc/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

# Change Log

## Jun-29-2024: Version 3.2.0

- `--rd` and `--rd-fc2` options for generating random directional displacements.
- Experimental implementation for using pypolymlp.

## Jun-19-2024: Version 3.1.2

- Treatment of numpy 2.0.
- Experimental support of symfc.

## Jun-7-2024: Version 3.1.1

- Minor fix related to typehint for python-3.8.
Expand Down
Loading

0 comments on commit a5be390

Please sign in to comment.