Skip to content

Commit

Permalink
Maintenance updates (#550)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 23.12.1 → 24.3.0](psf/black@23.12.1...24.3.0)
- [github.com/PyCQA/flake8: 6.1.0 → 7.0.0](PyCQA/flake8@6.1.0...7.0.0)
- [github.com/nbQA-dev/nbQA: 1.7.1 → 1.8.5](nbQA-dev/nbQA@1.7.1...1.8.5)
- [github.com/kynan/nbstripout: 0.6.1 → 0.7.1](kynan/nbstripout@0.6.1...0.7.1)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Maintenance updates

* Update linter config

* Downgrade actions

* Add Pint shim back?

* Skip OpenMM 7 and Python >3.10

* Pin to old pymbar

* Pin to old pymbar

* Skip macOS + OpenMM 7

There doesn't seem to be this combination of builds on 3.10+

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
mattwthompson and pre-commit-ci[bot] committed Apr 3, 2024
1 parent 02638dc commit 1105e66
Show file tree
Hide file tree
Showing 87 changed files with 159 additions and 83 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ jobs:
- ubuntu-latest
- macOS-latest
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
pymbar-version:
- "3.1"
pydantic-version:
- "1"
- "2"
openmm-version:
- "7"
Expand All @@ -45,8 +45,18 @@ jobs:
- true
- false
exclude:
- python-version: "3.10"
- python-version: "3.11"
openmm-version: "7"
- python-version: "3.12"
openmm-version: "7"
- os: "macOS-latest"
openmm-version: "7"
- python-version: "3.12"
openeye: true
- python-version: "3.11"
pymbar-version: "3.1"
- python-version: "3.12"
pymbar-version: "3.1"

steps:
- uses: actions/checkout@v4
Expand All @@ -71,11 +81,6 @@ jobs:
env:
SECRET_OE_LICENSE: ${{ secrets.OE_LICENSE }}

- name: Install Foyer
if: ${{ matrix.pydantic-version == 1 }}
shell: bash -l {0}
run: micromamba install foyer -c conda-forge

- name: Install PASCAL Compiler (MacOS)
if: startsWith(matrix.os, 'macOS')
run: brew install fpc
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ci:
files: (^openff|^utilities|^integration-tests)
repos:
- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.3.0
hooks:
- id: black
- id: black-jupyter
Expand All @@ -13,11 +13,11 @@ repos:
hooks:
- id: isort
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
rev: 7.0.0
hooks:
- id: flake8
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.7.1
rev: 1.8.5
hooks:
- id: nbqa-pyupgrade
files: ^docs/tutorial
Expand All @@ -26,7 +26,7 @@ repos:
- id: nbqa-isort
files: ^docs/tutorial
- repo: https://github.com/kynan/nbstripout
rev: 0.6.1
rev: 0.7.1
hooks:
- id: nbstripout
files: ^docs/tutorial
7 changes: 2 additions & 5 deletions devtools/conda-envs/test_env.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: evaluator-test-env
channels:
- jaimergp/label/unsupported-cudatoolkit-shim
- conda-forge
dependencies:
# Base depends
Expand All @@ -14,11 +13,9 @@ dependencies:
- pytest-randomly
- nbval
- requests-mock # For testing http requests.
# smirnoff-plugins =0.0.3
# Add back when MoSDeF supports pydantic v2
# foyer
- foyer

# Shims
# Shim
- pint =0.20.1

# Standard dependencies
Expand Down
8 changes: 5 additions & 3 deletions integration-tests/paprika/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@ def main():
"BaseBuildSystem": (
"BuildSmirnoffSystem"
if isinstance(force_field_source, SmirnoffForceFieldSource)
else "BuildTLeapSystem"
if isinstance(force_field_source, TLeapForceFieldSource)
else "BaseBuildSystem"
else (
"BuildTLeapSystem"
if isinstance(force_field_source, TLeapForceFieldSource)
else "BaseBuildSystem"
)
)
}
)
Expand Down
1 change: 1 addition & 0 deletions openff/evaluator/_tests/test_attributes/test_attributes.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Units tests for openff.evaluator.attributes
"""

import json

import pytest
Expand Down
1 change: 1 addition & 0 deletions openff/evaluator/_tests/test_client.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Units tests for the openff.evaluator.client module.
"""

import tempfile

import pytest
Expand Down
1 change: 1 addition & 0 deletions openff/evaluator/_tests/test_datasets/test_datasets.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Units tests for openff.evaluator.datasets
"""

import json

import numpy
Expand Down
1 change: 1 addition & 0 deletions openff/evaluator/_tests/test_datasets/test_thermoml.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Units tests for openff.evaluator.datasets
"""

import pytest
from openff.units import unit

Expand Down
1 change: 1 addition & 0 deletions openff/evaluator/_tests/test_plugins.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Units tests for the openff.evaluator.plugins module.
"""

import sys

from openff.evaluator.layers import (
Expand Down
1 change: 1 addition & 0 deletions openff/evaluator/_tests/test_properties/test_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Units tests for the calculation schemas registered by
`evaluator.properties`.
"""

from collections import OrderedDict

import pytest
Expand Down
1 change: 1 addition & 0 deletions openff/evaluator/_tests/test_protocols/test_coordinates.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Units tests for openff-evaluator.protocols.coordinates
"""

import tempfile

import pytest
Expand Down
1 change: 1 addition & 0 deletions openff/evaluator/_tests/test_protocols/test_forcefield.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Units tests for openff.evaluator.protocols.forcefield
"""

import re
import tempfile
from os import path
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Units tests for openff.evaluator.protocols.miscellaneous
"""

import operator
import random
import tempfile
Expand Down
1 change: 1 addition & 0 deletions openff/evaluator/_tests/test_protocols/test_openmm.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Units tests for openff.evaluator.protocols.openmm
"""

import json
import os
import tempfile
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Units tests for openff.evaluator.protocols.storage
"""

import json
import os
import tempfile
Expand Down
1 change: 1 addition & 0 deletions openff/evaluator/_tests/test_server.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Units tests for the openff.evaluator.server module.
"""

import tempfile
from time import sleep

Expand Down
1 change: 1 addition & 0 deletions openff/evaluator/_tests/test_storage/test_local.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Units tests for openff.evaluator.storage.localfile
"""

import os

from openff.evaluator.storage import LocalFileStorage
Expand Down
1 change: 1 addition & 0 deletions openff/evaluator/_tests/test_storage/test_storage.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Units tests for openff.evaluator.storage
"""

import os
import tempfile

Expand Down
1 change: 1 addition & 0 deletions openff/evaluator/_tests/test_substances.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Units tests for openff.evaluator.substances
"""

import numpy as np
import pytest

Expand Down
1 change: 1 addition & 0 deletions openff/evaluator/_tests/test_thermodynamics.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Units tests for openff.evaluator.thermodynamics
"""

import pint
import pytest
from openff.units import unit
Expand Down
1 change: 1 addition & 0 deletions openff/evaluator/_tests/test_utils/test_execeptions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Units tests for openff.evaluator.utils.exceptions
"""

from openff.evaluator.utils import exceptions


Expand Down
1 change: 1 addition & 0 deletions openff/evaluator/_tests/test_utils/test_graph.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Units tests for openff.evaluator.utils.graph
"""

import pytest

from openff.evaluator.utils import graph
Expand Down
12 changes: 3 additions & 9 deletions openff/evaluator/_tests/test_utils/test_observables.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Units tests for openff.evaluator.utils.observables
"""

import json
from typing import List, Tuple, Type, Union

Expand Down Expand Up @@ -995,10 +996,7 @@ def test_frame_from_openmm(pressure):
if pressure is not None:
expected_enthalpy = (
13874.51498645249 * unit.kilojoule / unit.mole
+ pressure
* 26.342326662784938
* unit.nanometer**3
* unit.avogadro_constant
+ pressure * 26.342326662784938 * unit.nanometer**3 * unit.avogadro_constant
)
assert numpy.isclose(observable_frame["Enthalpy"].value[0], expected_enthalpy)

Expand Down Expand Up @@ -1084,11 +1082,7 @@ def test_frame_join():
{"Temperature": ObservableArray(value=numpy.ones(2) * unit.kelvin)}
),
ObservableFrame(
{
"Volume": ObservableArray(
value=numpy.ones(2) * unit.nanometer**3
)
}
{"Volume": ObservableArray(value=numpy.ones(2) * unit.nanometer**3)}
),
],
pytest.raises(ValueError),
Expand Down
1 change: 1 addition & 0 deletions openff/evaluator/_tests/test_utils/test_packmol.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Units tests for openff.evaluator.utils.packmol
"""

import numpy as np
import pytest
from openff.units import unit
Expand Down
1 change: 1 addition & 0 deletions openff/evaluator/_tests/test_utils/test_serialization.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Units tests for openff.evaluator.utils.serialization
"""

import json
from datetime import datetime
from enum import Enum, IntEnum
Expand Down
1 change: 1 addition & 0 deletions openff/evaluator/_tests/test_utils/test_string.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Units tests for openff.evaluator.utils.statistics
"""

import tempfile
from os import path

Expand Down
1 change: 1 addition & 0 deletions openff/evaluator/_tests/test_utils/test_tcp.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Units tests for openff.evaluator.utils.tcp
"""

from openff.evaluator.utils import tcp


Expand Down
1 change: 1 addition & 0 deletions openff/evaluator/_tests/test_utils/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Units tests for openff.evaluator.utils.exceptions
"""

import os
import tempfile

Expand Down
1 change: 1 addition & 0 deletions openff/evaluator/_tests/test_workflow/test_protocols.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Units tests for openff.evaluator.workflow
"""

import json
import os
import tempfile
Expand Down
1 change: 1 addition & 0 deletions openff/evaluator/_tests/test_workflow/test_workflow.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Units tests for openff.evaluator.layers.simulation
"""

import math
import os
import tempfile
Expand Down
1 change: 1 addition & 0 deletions openff/evaluator/attributes/attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
A collection of descriptors used to add meta data to
object attributes.
"""

import copy
import inspect
from collections.abc import Iterable, Mapping
Expand Down
1 change: 1 addition & 0 deletions openff/evaluator/attributes/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
typing into the framework, but rather to aid in statically verifying
the protocols input and outputs align correctly.
"""

import typing

_supported_generic_types = {typing.Union}
Expand Down
1 change: 1 addition & 0 deletions openff/evaluator/backends/backends.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Defines the base API for the openff-evaluator task calculation backend.
"""

import abc
import re
from enum import Enum
Expand Down
1 change: 1 addition & 0 deletions openff/evaluator/backends/dask.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
A collection of openff-evaluator compute backends which use dask as the distribution engine.
"""

import abc
import importlib
import logging
Expand Down
1 change: 1 addition & 0 deletions openff/evaluator/client/client.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Evaluator client side API.
"""

import copy
import json
import logging
Expand Down

0 comments on commit 1105e66

Please sign in to comment.