Skip to content

Commit

Permalink
Fix uv pip install from binary distribution (wheels) usage (#4210)
Browse files Browse the repository at this point in the history
* fix uv pip install from bdist usage

* use uv to build wheels

* add single quote for macos

* add single quote for macos

* try ATAT3 install, it should fail

* Revert "try ATAT3 install, it should fail"

This reverts commit 3f63f4b.

* modest verbose level

* use mamba native env name and py ver
  • Loading branch information
DanielYang59 authored Dec 11, 2024
1 parent 5abe81c commit 8726f8c
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,36 +61,34 @@ jobs:
- name: Check out repo
uses: actions/checkout@v4

- name: Set up micromamba
uses: mamba-org/setup-micromamba@main

- name: Create mamba environment
run: |
micromamba create -n pmg python=${{ matrix.config.python }} --yes
uses: mamba-org/setup-micromamba@main
with:
environment-name: pmg
create-args: >-
python=${{ matrix.config.python }}
- 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
- name: Install uv
uses: astral-sh/setup-uv@v4

- name: Install pymatgen and dependencies via uv
run: |
micromamba activate pmg
pip install uv
# TODO1 (use uv over pip) uv install torch is flaky, track #3826
# TODO2 (pin torch version): DGL library (matgl) doesn't support torch > 2.2.1,
# see: https://discuss.dgl.ai/t/filenotfounderror-cannot-find-dgl-c-graphbolt-library/4302
pip install torch==2.2.1
# 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 }}
uv build --wheel --no-build-logs
WHEEL_FILE=$(ls dist/pymatgen*.whl)
uv pip install $WHEEL_FILE[${{matrix.config.extras}}] --resolution=${{matrix.config.resolution}}
- name: Install optional Ubuntu dependencies
if: matrix.config.os == 'ubuntu-latest'
Expand Down

0 comments on commit 8726f8c

Please sign in to comment.