Skip to content

Commit

Permalink
Merge branch 'master' into fix-multi-branch-band-struct
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielYang59 authored Nov 14, 2024
2 parents e1dd508 + aab23ff commit 2f6c257
Show file tree
Hide file tree
Showing 131 changed files with 7,985 additions and 7,526 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/issue-metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
# Calculate the last day of the previous month
last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d)
#Set an environment variable with the date range
# Set an environment variable with the date range
echo "$first_day..$last_day"
echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV"
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Release # makes PyPI releases
# Make PyPI releases
name: Release

on:
release:
Expand Down Expand Up @@ -26,12 +27,12 @@ jobs:
- name: Check out repo
uses: actions/checkout@v4

- uses: actions/setup-python@v5
name: Install Python
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Build sdist
- name: Build source distribution
run: |
pip install build
python -m build --sdist
Expand Down Expand Up @@ -66,7 +67,7 @@ jobs:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
permissions:
# For pypi trusted publishing
# For PyPI trusted publishing
id-token: write
steps:
- name: Set up Python
Expand All @@ -81,9 +82,12 @@ jobs:
merge-multiple: true
path: dist

- name: Publish to PyPi or TestPyPI
- name: Publish to PyPI or TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
verbose: true
repository-url: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.task == 'test-release' && 'https://test.pypi.org/legacy/' || '' }}
repository-url: >
${{ github.event_name == 'workflow_dispatch' &&
github.event.inputs.task == 'test-release' &&
'https://test.pypi.org/legacy/' || '' }}
12 changes: 10 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ jobs:
- name: Install ubuntu-only conda dependencies
if: matrix.config.os == 'ubuntu-latest'
run: |
micromamba install -n pmg -c conda-forge bader enumlib openff-toolkit packmol pygraphviz tblite --yes
micromamba install -n pmg -c conda-forge bader enumlib \
openff-toolkit packmol pygraphviz tblite --yes
- name: Install pymatgen and dependencies via uv
run: |
Expand All @@ -84,7 +85,12 @@ jobs:
# see: https://discuss.dgl.ai/t/filenotfounderror-cannot-find-dgl-c-graphbolt-library/4302
pip install torch==2.2.1
uv pip install --editable '.[${{ matrix.config.extras }}]' --resolution=${{ matrix.config.resolution }}
# Install from wheels to test the content
uv pip install build
python -m build --wheel
uv pip install dist/*.whl
uv pip install pymatgen[${{ matrix.config.extras }}] --resolution=${{ matrix.config.resolution }}
- name: Install optional Ubuntu dependencies
if: matrix.config.os == 'ubuntu-latest'
Expand All @@ -101,6 +107,8 @@ jobs:
echo "$(realpath vampire-5.0/)" >> $GITHUB_PATH
- name: pytest split ${{ matrix.split }}
env:
PMG_TEST_FILES_DIR: "${{ github.workspace }}/tests/files"
run: |
micromamba activate pmg
pytest --splits 10 --group ${{ matrix.split }} --durations-path tests/files/.pytest-split-durations tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
for icsm, csm in enumerate(csms):
found = False
for csm2 in csms_with_recorded_permutation:
if np.isclose(csm, csm2, rtol=0.0, atol=1.0e-6):
if np.isclose(csm, csm2, rtol=0.0, atol=1e-6):
found = True
break
if not found:
Expand Down
7 changes: 7 additions & 0 deletions dev_scripts/update_spacegroup_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ def remove_identity_from_full_hermann_mauguin(symbol: str) -> str:
if symbol in ("P 1", "C 1", "P 1 "):
return symbol
blickrichtungen = symbol.split(" ")
if blickrichtungen[1].startswith("3"):
return symbol
blickrichtungen_new = []
for br in blickrichtungen:
if br != "1":
Expand All @@ -76,6 +78,11 @@ def remove_identity_from_full_hermann_mauguin(symbol: str) -> str:

SYMM_DATA["space_group_encoding"] = new_symm_data

for sg_symbol in SYMM_DATA["space_group_encoding"]:
SYMM_DATA["space_group_encoding"][sg_symbol]["point_group"] = PointGroup.from_space_group(
sg_symbol=sg_symbol
).symbol

for spg in SYMM_OPS:
if "(" in spg["hermann_mauguin"]:
spg["hermann_mauguin"] = spg["hermann_mauguin"].split("(")[0]
Expand Down
11 changes: 11 additions & 0 deletions docs/CHANGES.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions docs/modules.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2f6c257

Please sign in to comment.