Go to file
Atsushi Togo 61229705ae
Merge pull request #359 from Liang-jianxin/Liang-jianxin-patch-1
fix a bug
2024-05-13 13:47:13 +02:00
.github/workflows Bump codecov action version 2024-04-30 09:42:59 +09:00
c Max num threads of OpenMP using omp_get_max_threads() 2022-10-17 10:25:59 +09:00
conda Set matplotlib version requirement >=2.0 2021-10-26 12:43:55 +09:00
doc Set version 2.23.1 2024-05-03 06:52:23 +02:00
example New feature of phonopy command with -f --sp options 2024-04-28 13:20:03 +09:00
phonopy Update pwmat.py 2024-05-13 19:15:35 +08:00
scripts Remove include_born keyword 2024-02-18 16:23:50 +09:00
test [pre-commit.ci] auto fixes from pre-commit.com hooks 2024-05-11 11:27:13 +00:00
.gitignore Migrated some rst files to md 2022-01-07 17:41:14 +09:00
.pre-commit-config.yaml [pre-commit.ci] pre-commit autoupdate 2024-04-29 23:14:05 +00:00
CMakeLists.txt Handle when openmp is not found in cmakefile.txt 2022-09-30 16:03:28 +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 Replace get_symmetry_dataset by get_magnetic_symmetry_dataset 2024-03-29 10:35:22 +09:00
build-wheels.sh Update to build pypi wheel for py3.9 2021-01-29 11:04:22 +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 Introduce isort 2021-10-23 12:23:12 +09:00
requirements.txt Replace get_symmetry_dataset by get_magnetic_symmetry_dataset 2024-03-29 10:35:22 +09:00
setup.cfg Add setup.cfg 2022-11-12 22:37:04 +09:00
setup.py Replace get_symmetry_dataset by get_magnetic_symmetry_dataset 2024-03-29 10:35:22 +09:00

README.md

Version Badge Downloads Badge PyPI codecov

Phonopy

Phonon code. Phonopy user documentation is found at http://phonopy.github.io/phonopy/

Installation

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

Dependency

  • python>=3.8
  • numpy>=1.17.0
  • PyYAML>=5.3
  • matplotlib>=2.2.2
  • h5py>=3.0
  • spglib>=2.3
  • scipy (optional)
  • seekpath (optional)

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 rule is written in pyproject.toml.

pre-commit

Pre-commit (https://pre-commit.com/) is mainly used for applying the formatting rule automatically. Therefore, the use is strongly encouraged 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

    "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"],
    "[python]": {
        "editor.codeActionsOnSave": {
        "source.organizeImports": true
      },
    }
    

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.

Tests

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

% pytest