-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
709 additions
and
514 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: wheel-build-and-deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- make-wheel | ||
- make-wheel-test | ||
|
||
jobs: | ||
build_wheels: | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest,] | ||
# os: [ubuntu-latest, windows-latest, macos-13, macos-latest] | ||
|
||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
# Used to host cibuildwheel | ||
- uses: actions/setup-python@v5 | ||
|
||
- name: Install cibuildwheel | ||
run: python -m pip install cibuildwheel==2.22.0 | ||
|
||
- name: Build wheels | ||
run: | | ||
git tag v`grep __version__ phono3py/version.py|awk -F'"' '{print($2)}'` | ||
python -m cibuildwheel --output-dir wheelhouse | ||
env: | ||
CIBW_SKIP: "cp39-* pp* *_i686 *musllinux*" | ||
CIBW_BUILD_VERBOSITY: 1 | ||
|
||
# to supply options, put them in 'env', like: | ||
# env: | ||
# CIBW_SOME_OPTION: value | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | ||
path: ./wheelhouse/*.whl | ||
|
||
upload_pypi_test: | ||
name: Upload to PyPI (test) | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest,] | ||
needs: [build_wheels,] | ||
runs-on: ${{ matrix.os }} | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads/make-wheel-test') | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
pattern: cibw-wheels-* | ||
path: dist | ||
merge-multiple: true | ||
- uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
skip-existing: true | ||
|
||
upload_pypi: | ||
name: Upload to PyPI | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest,] | ||
needs: [build_wheels,] | ||
runs-on: ${{ matrix.os }} | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads/make-wheel') | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
pattern: cibw-wheels-* | ||
path: dist | ||
merge-multiple: true | ||
- uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
skip-existing: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Example to create force constants using MLPs by pypolymlp | ||
|
||
This is an example to follow the documentation | ||
https://phonopy.github.io/phono3py/pypolymlp.html. | ||
`phono3py_params.yaml` can be also generated by | ||
|
||
```bash | ||
% python make_phono3py_params.py ../NaCl-rd/phono3py_params_NaCl.yaml.xz | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import sys | ||
|
||
import phono3py | ||
|
||
ph3 = phono3py.load(sys.argv[1], produce_fc=False, log_level=1) | ||
ph3_new = phono3py.Phono3py( | ||
ph3.unitcell, | ||
supercell_matrix=ph3.supercell_matrix, | ||
primitive_matrix=ph3.primitive_matrix, | ||
) | ||
ph3_new.dataset = ph3.dataset | ||
ph3_new.nac_params = ph3.nac_params | ||
ph3_new.save("phono3py_params.yaml") |
Oops, something went wrong.