Skip to content

Commit

Permalink
Merge branch 'main' into add-complex-testing
Browse files Browse the repository at this point in the history
  • Loading branch information
ijpulidos authored Aug 14, 2024
2 parents ccbdaf6 + 842f1ae commit dc5bd81
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 12 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ defaults:
jobs:
tests:
runs-on: ${{ matrix.os }}-latest
name: "💻-${{matrix.os }} 🐍-${{ matrix.python-version }}"
name: "💻-${{matrix.os }} 🐍-${{ matrix.python-version }} - pydantic ${{matrix.pydantic}}"
strategy:
fail-fast: false
matrix:
os: ["ubuntu"]
pydantic: ["1", "2"]
python-version:
- "3.10"
- "3.11"
Expand All @@ -52,6 +53,7 @@ jobs:
cache-downloads: true
create-args: >-
python=${{ matrix.python-version }}
pydantic=${{ matrix.pydantic }}
init-shell: bash

- name: "Install"
Expand Down Expand Up @@ -80,7 +82,7 @@ jobs:
# Set the OFE_SLOW_TESTS to True if running a Cron job
OFE_SLOW_TESTS: ${{ fromJSON('{"false":"false","true":"true"}')[github.event_name != 'pull_request'] }}
run: |
pytest -n auto -v --cov=feflow --cov-report=xml --durations=10
pytest -n auto -v --cov=feflow --cov-report=xml --durations=10
- name: codecov
if: ${{ github.repository == 'choderalab/feflow'
Expand Down
2 changes: 1 addition & 1 deletion devtools/conda-envs/test_env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies:
- openmm
- openmmforcefields >=0.14.1 # TODO: remove when upstream deps fix this
- pymbar <4
- pydantic=1 # TODO: Modify when we support pydantic 2
- pydantic >=1.10.17
- python

# Testing (optional deps)
Expand Down
4 changes: 2 additions & 2 deletions feflow/protocols/nonequilibrium_cycling.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ def extract_positions(context, initial_atom_indices, final_atom_indices):
----------
context: openmm.Context
Current simulation context where from extract positions.
hybrid_topology_factory: perses.annihilation.relative.HybridTopologyFactory
hybrid_topology_factory: HybridTopologyFactory
Hybrid topology factory where to extract positions and mapping information
Returns
Expand Down Expand Up @@ -508,7 +508,7 @@ def _execute(self, ctx, *, protocol, setup, **inputs):

# Setting up logging to file in shared filesystem
file_logger = logging.getLogger("neq-cycling")
output_log_path = ctx.shared / "perses-neq-cycling.log"
output_log_path = ctx.shared / "feflow-neq-cycling.log"
file_handler = logging.FileHandler(output_log_path, mode="w")
file_handler.setLevel(logging.DEBUG) # TODO: Set to INFO in production
log_formatter = logging.Formatter(
Expand Down
5 changes: 1 addition & 4 deletions feflow/settings/integrators.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
for the specific integrator settings.
"""

try:
from pydantic.v1 import validator
except ImportError:
from pydantic import validator # type: ignore[assignment]
from pydantic.v1 import validator

from openff.units import unit
from openff.models.types import FloatQuantity
Expand Down
2 changes: 1 addition & 1 deletion feflow/settings/nonequilibrium_cycling.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
)

from gufe.settings import Settings
from pydantic import root_validator
from pydantic.v1 import root_validator
from openfe.protocols.openmm_utils.omm_settings import (
OpenMMSolvationSettings,
OpenMMEngineSettings,
Expand Down
3 changes: 1 addition & 2 deletions feflow/utils/hybrid_topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -2551,8 +2551,7 @@ def _compute_hybrid_positions(self):
The positions are assigned by first copying all the mapped positions
from the old system in, then copying the
mapped positions from the new system. This means that there is an
assumption that the positions common to old and new are the same
(which is the case for perses as-is).
assumption that the positions common to old and new are the same.
Returns
-------
Expand Down

0 comments on commit dc5bd81

Please sign in to comment.