From c6f1b56dc5bc4af630c8e0faab7d52f1a9b6cab2 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Mon, 15 Apr 2024 22:42:50 -0400 Subject: [PATCH 1/3] CI: setup uv --- .github/workflows/test.yml | 6 ++---- .github/workflows/test_import.yml | 3 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e4d9a91fb..56627cf39 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,11 +18,9 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - # install rdkit and openbabel - - name: Install rdkit - run: python -m pip install rdkit openbabel-wheel + - run: python -m pip install uv - name: Install dependencies - run: python -m pip install .[amber,ase,pymatgen] coverage ./tests/plugin + run: python -m uv pip install --system .[amber,ase,pymatgen] coverage ./tests/plugin rdkit openbabel-wheel - name: Test run: cd tests && coverage run --source=../dpdata -m unittest && cd .. && coverage combine tests/.coverage && coverage report - name: Run codecov diff --git a/.github/workflows/test_import.yml b/.github/workflows/test_import.yml index 6ab0dbe2d..d7af658db 100644 --- a/.github/workflows/test_import.yml +++ b/.github/workflows/test_import.yml @@ -13,5 +13,6 @@ jobs: with: python-version: '3.9' architecture: 'x64' - - run: python -m pip install . + - run: python -m pip install uv + - run: python -m uv pip install . - run: python -c 'import dpdata' From cd8dc57d9de1203d712489ee534d1cfbb585d5e4 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Fri, 19 Apr 2024 18:15:04 -0400 Subject: [PATCH 2/3] Update test.yml --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 56627cf39..4a17fcde1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,9 +18,9 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - run: python -m pip install uv + - run: curl -LsSf https://astral.sh/uv/install.sh | sh - name: Install dependencies - run: python -m uv pip install --system .[amber,ase,pymatgen] coverage ./tests/plugin rdkit openbabel-wheel + run: uv pip install --system .[amber,ase,pymatgen] coverage ./tests/plugin rdkit openbabel-wheel - name: Test run: cd tests && coverage run --source=../dpdata -m unittest && cd .. && coverage combine tests/.coverage && coverage report - name: Run codecov From 7ac5be5245e6977b601e1bc7acfc5396f158bb6b Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Fri, 19 Apr 2024 18:17:17 -0400 Subject: [PATCH 3/3] Update test_import.yml --- .github/workflows/test_import.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_import.yml b/.github/workflows/test_import.yml index d7af658db..9f429819d 100644 --- a/.github/workflows/test_import.yml +++ b/.github/workflows/test_import.yml @@ -14,5 +14,5 @@ jobs: python-version: '3.9' architecture: 'x64' - run: python -m pip install uv - - run: python -m uv pip install . + - run: python -m uv pip install --system . - run: python -c 'import dpdata'