Skip to content

Commit 91ec45b

Browse files
committed
Merge branch 'resume-afe' of github.com:OpenFreeEnergy/openfe into resume-afe
2 parents e374dbc + ecacdc6 commit 91ec45b

File tree

7 files changed

+24
-26
lines changed

7 files changed

+24
-26
lines changed

.github/workflows/conda_cron.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ jobs:
4040
id: latest-version
4141
working-directory: openfe_repo
4242
run: |
43-
LATEST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
44-
# slice off the v, ie v0.7.2 -> 0.7.2
45-
VERSION=${LATEST_TAG:1}
43+
REPO="${{ github.repository }}"
44+
VERSION=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
45+
"https://api.github.com/repos/$REPO/releases/latest" | jq -r '.tag_name | ltrimstr("v")')
4646
echo $VERSION
4747
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
4848

.github/workflows/docker.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,9 @@ jobs:
7878
- name: Get Latest Version
7979
id: latest-version
8080
run: |
81-
LATEST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
82-
echo $LATEST_TAG
83-
echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_OUTPUT
84-
# slice off the v, ie v0.7.2 -> 0.7.2
85-
VERSION=${LATEST_TAG:1}
81+
REPO="${{ github.repository }}"
82+
VERSION=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
83+
"https://api.github.com/repos/$REPO/releases/latest" | jq -r '.tag_name | ltrimstr("v")')
8684
echo $VERSION
8785
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
8886

.github/workflows/gen-lock-file.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,10 @@ jobs:
2222
# This saves me some time since we only need the latest tag
2323
- name: Get latest tag
2424
id: latest-version
25-
env:
26-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27-
REPO: ${{ github.repository }}
2825
run: |
29-
LATEST_TAG=$(curl -s -H "Authorization: token $GH_TOKEN" \
30-
https://api.github.com/repos/$REPO/tags \
31-
| jq -r '.[0].name')
32-
VERSION=${LATEST_TAG:1}
26+
REPO="${{ github.repository }}"
27+
VERSION=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
28+
"https://api.github.com/repos/$REPO/releases/latest" | jq -r '.tag_name | ltrimstr("v")')
3329
echo $VERSION
3430
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
3531

.github/workflows/installer.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ jobs:
2525
- name: Get Latest Version
2626
id: latest-version
2727
run: |
28-
LATEST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
29-
# slice off the v, ie v0.7.2 -> 0.7.2
30-
VERSION=${LATEST_TAG:1}
28+
REPO="${{ github.repository }}"
29+
VERSION=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
30+
"https://api.github.com/repos/$REPO/releases/latest" | jq -r '.tag_name | ltrimstr("v")')
3131
echo $VERSION
3232
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
3333

src/openfe/tests/protocols/openmm_abfe/test_abfe_protocol_results.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
import gufe
1010
import numpy as np
11+
import openmm
1112
import pytest
1213
from openff.units import unit as offunit
13-
import openmm
1414

1515
import openfe
1616
from openfe.protocols import openmm_afe

src/openfe/tests/protocols/openmm_ahfe/test_ahfe_protocol_results.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
import gufe
99
import numpy as np
10+
import openmm
1011
import pytest
1112
from openff.units import unit as offunit
12-
import openmm
1313

1414
import openfe
1515
from openfe import ChemicalSystem, SolventComponent

src/openfe/tests/protocols/openmm_ahfe/test_ahfe_resume.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@
77
import shutil
88

99
import gufe
10-
from gufe.protocols.errors import ProtocolUnitExecutionError
10+
import openmm
1111
import pytest
12+
from gufe.protocols.errors import ProtocolUnitExecutionError
1213
from numpy.testing import assert_allclose
1314
from openfe_analysis.utils.multistate import _determine_position_indices
1415
from openff.units import unit as offunit
1516
from openff.units.openmm import from_openmm
16-
import openmm
1717
from openmmtools.multistate import MultiStateReporter, ReplicaExchangeSampler
1818

1919
import openfe
20-
from openfe.protocols import openmm_afe
2120
from openfe.data._registry import POOCH_CACHE
21+
from openfe.protocols import openmm_afe
2222

2323
from ...conftest import HAS_INTERNET
2424
from .utils import _get_units
@@ -115,7 +115,9 @@ def test_vacuum_check_restart(protocol_settings, ahfe_vac_trajectory_path):
115115
class TestCheckpointResuming:
116116
@pytest.fixture()
117117
def protocol_dag(
118-
self, protocol_settings, benzene_modifications,
118+
self,
119+
protocol_settings,
120+
benzene_modifications,
119121
):
120122
stateA = openfe.ChemicalSystem(
121123
{
@@ -160,7 +162,9 @@ def _copy_simfiles(cwd: pathlib.Path, filepath):
160162
shutil.copyfile(filepath, f"{cwd}/{filepath.name}")
161163

162164
@pytest.mark.integration
163-
def test_resume(self, protocol_dag, ahfe_solv_trajectory_path, ahfe_solv_checkpoint_path, tmpdir):
165+
def test_resume(
166+
self, protocol_dag, ahfe_solv_trajectory_path, ahfe_solv_checkpoint_path, tmpdir
167+
):
164168
"""
165169
Attempt to resume a simulation unit with pre-existing checkpoint &
166170
trajectory files.
@@ -244,4 +248,4 @@ def test_resume(self, protocol_dag, ahfe_solv_trajectory_path, ahfe_solv_checkpo
244248

245249
# Check the free energy plots are there
246250
mbar_overlap_file = cwd / "mbar_overlap_matrix.png"
247-
assert (mbar_overlap_file).exists()
251+
assert (mbar_overlap_file).exists()

0 commit comments

Comments
 (0)