Go to file
Atsushi Togo ec3ca0eb43
Merge pull request #445 from phonopy/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-11-05 11:22:53 +09:00
.github/workflows Drop github workflows with python 3.8 2024-07-13 15:26:17 +09:00
c Merge pull request #434 from erhart1/classical-statistics 2024-09-25 11:08:19 +09:00
doc Set version 2.29.1 2024-10-25 12:41:04 +09:00
example Update phonopy_disp.yaml in Cr example 2024-09-21 15:01:16 +09:00
phonopy Set version 2.29.1 2024-10-25 12:41:04 +09:00
test Parse positions from vasprun.xml and use those for checking agreement with displacements 2024-10-08 20:30:41 +09:00
.gitignore Updated .gitignore file 2024-07-13 08:49:22 +02:00
.pre-commit-config.yaml [pre-commit.ci] pre-commit autoupdate 2024-11-05 00:13:56 +00:00
CMakeLists.txt PHONOPY_USE_OMP environment for build 2024-07-07 22:06:23 +09:00
LICENSE Update top page of web site 2024-02-22 22:22:12 +09:00
MANIFEST.in Fix MANIFEST.in and set version v2.9.3 2021-03-17 12:52:04 +09:00
README.md Update doc to indicate scipy as a dependency 2024-09-18 14:43:45 +09:00
build-wheels.sh Update to build pypi wheel for py3.9 2021-01-29 11:04:22 +09:00
cmake-format.py Set version 2.26.1 2024-07-07 15:14:24 +09:00
dev-requirements.txt Updated document, installation, and packaging related files. 2020-07-22 15:40:36 +09:00
get_nanoversion.sh Update packaging scripts 2020-05-03 09:53:01 +09:00
pyproject.toml add scipy to dependencies (needed for qha tests) 2024-09-18 07:27:25 +02:00
requirements.txt Replace get_symmetry_dataset by get_magnetic_symmetry_dataset 2024-03-29 10:35:22 +09:00
setup-legacy.cfg Use nanobind for C binding 2024-07-04 17:55:36 +09:00
setup-legacy.py Use nanobind for C binding 2024-07-04 17:55:36 +09:00

README.md

Version Badge Downloads Badge PyPI codecov

Phonopy

Phonon code mainly written in python. Phonopy user documentation is found at http://phonopy.github.io/phonopy/

Installation

See https://phonopy.github.io/phonopy/install.html.

Dependency

It is necessary to install symfc and seekpath either via pip, conda, etc, to utilize the respective additional features.

Mailing list for questions

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

Development

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

  • Github issues is the place to discuss about phonopy issues.
  • Github pull request is the place to request merging source code.

Formatting

Formatting rules are found in pyproject.toml.

pre-commit

Pre-commit (https://pre-commit.com/) is mainly used for applying the formatting rules automatically. Therefore, it is strongly encouraged to use it at or before git-commit. Pre-commit is set-up and used in the following way:

  • Installed by pip install pre-commit, conda install pre_commit or see https://pre-commit.com/#install.
  • pre-commit hook is installed by pre-commit install.
  • pre-commit hook is run by pre-commit run --all-files.

Unless running pre-commit, pre-commit.ci may push the fix at PR by github action. In this case, the fix should be merged by the contributor's repository.

VSCode setting

  • Not strictly, but VSCode's settings.json may be written like below

    "ruff.lint.args": [
        "--config=${workspaceFolder}/pyproject.toml",
    ],
    "[python]": {
        "editor.defaultFormatter": "charliermarsh.ruff",
        "editor.codeActionsOnSave": {
            "source.organizeImports": "explicit"
        }
    },
    

Documentation

Phonopy user documentation is written using python sphinx. The source files are stored in doc directory. Please see how to write the documentation at doc/README.md.

How to run tests

Tests are written using pytest. To run tests, pytest has to be installed. The tests can be run by

% pytest