Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use binary distribution (wheels) to install pymatgen in test suite #4073

Merged
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f33389a
comment tweaks
DanielYang59 Sep 18, 2024
1cc727d
Merge branch 'materialsproject:master' into test-sdist-whl-before-rel…
DanielYang59 Sep 18, 2024
dbdf84d
Merge branch 'master' into test-sdist-whl-before-release
DanielYang59 Sep 26, 2024
46df4ce
Merge branch 'master' into test-sdist-whl-before-release
DanielYang59 Oct 10, 2024
7491c62
Merge branch 'master' into test-sdist-whl-before-release
DanielYang59 Oct 13, 2024
5d5f824
pin python 3.12 in CI
DanielYang59 Oct 13, 2024
0eb4d0c
try to install from sdist
DanielYang59 Oct 13, 2024
5dc1b25
try to add test files dir
DanielYang59 Oct 13, 2024
70b0f99
uncomment resolution
DanielYang59 Oct 13, 2024
a4f88e3
set lower pin for bs4 from year 2017
DanielYang59 Oct 13, 2024
c9f995f
remove duplicate in dep declare
DanielYang59 Oct 13, 2024
7c60d84
drop quotes
DanielYang59 Oct 13, 2024
c2a2333
remove duplicated comment
DanielYang59 Oct 13, 2024
8bf104f
sort optional dependencies
DanielYang59 Oct 13, 2024
0dba028
TEST: test exclude a required file from sdist would lead to CI failure
DanielYang59 Oct 13, 2024
4d5a319
Revert "TEST: test exclude a required file from sdist would lead to C…
DanielYang59 Oct 13, 2024
17b1acf
perhaps install from wheels?
DanielYang59 Oct 14, 2024
2bcc3c3
Merge branch 'master' into test-sdist-whl-before-release
DanielYang59 Oct 15, 2024
9a43522
Merge branch 'master' into test-sdist-whl-before-release
DanielYang59 Oct 21, 2024
a4dc18b
Merge branch 'master' into test-sdist-whl-before-release
DanielYang59 Oct 22, 2024
2ede793
Merge branch 'master' into test-sdist-whl-before-release
DanielYang59 Oct 22, 2024
3fcf1fa
skip failing test as dgl doesn't support torch 2.4.1
DanielYang59 Oct 22, 2024
fabb5fb
Merge branch 'test-sdist-whl-before-release' of https://github.com/Da…
DanielYang59 Oct 22, 2024
b2c97bc
revert pyproject in favor in separate PR
DanielYang59 Oct 22, 2024
8d11d91
fix missing @
DanielYang59 Oct 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/' || '' }}
14 changes: 11 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
resolution: highest
extras: ci,optional,numpy-v1 # Test NP1 on Windows (quite buggy ATM)
- os: ubuntu-latest
python: ">3.10"
python: "3.12"
resolution: lowest-direct
extras: ci,optional
- os: macos-latest
Expand Down 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 sdist
uv pip install build
python -m build --sdist

uv pip install dist/*.tar.gz
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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ ci = ["pytest-cov>=4", "pytest-split>=0.8", "pytest>=8"]
docs = ["invoke", "sphinx", "sphinx_markdown_builder", "sphinx_rtd_theme"]
optional = [
"ase>=3.23.0",
"beautifulsoup4",
"beautifulsoup4>=4.6.0",
DanielYang59 marked this conversation as resolved.
Show resolved Hide resolved
# BoltzTraP2 build fails on Windows GitHub runners
"BoltzTraP2>=24.9.4 ; platform_system != 'Windows'",
"chemview>=0.6",
Expand Down
Loading