Skip to content

Commit

Permalink
Merge pull request #187 from openforcefield/v2-api
Browse files Browse the repository at this point in the history
Use Pydantic V2 API
  • Loading branch information
j-wags authored Nov 23, 2024
2 parents b369f9c + 7a5f251 commit 22a065e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,14 @@ defaults:
jobs:
test:

name: ${{ matrix.os }} python=${{ matrix.python-version }} pydantic=${{ matrix.pydantic-version }} OE=${{ matrix.openeye }}
name: ${{ matrix.os }} python=${{ matrix.python-version }} OE=${{ matrix.openeye }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest]
os: [ubuntu-latest, macos-latest]
python-version: ["3.10", "3.11", "3.12"]
pydantic-version: ["1", "2"]
openeye: [false, true]
exclude:
- python-version: "3.12"
openeye: true

env:
OE_LICENSE: ${{ github.workspace }}/oe_license.txt
Expand All @@ -45,7 +40,6 @@ jobs:
environment-file: devtools/conda-envs/test_env.yaml
create-args: >-
python=${{ matrix.python-version }}
pydantic=${{ matrix.pydantic-version }}
- name: Install OpenEye
if: matrix.openeye
Expand Down
4 changes: 2 additions & 2 deletions devtools/conda-envs/test_env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ channels:
dependencies:
# Core
- python
- pydantic >=1.10.17,<3
- pydantic =2
- jinja2

# OpenFF stack
- openff-toolkit-base >=0.14.4
- openff-utilities >=0.1.9
- openff-interchange >=0.4

# Optional tools
- ambertools
Expand Down
2 changes: 1 addition & 1 deletion openff/fragmenter/fragment.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
ToolkitWrapper,
)
from openff.toolkit.utils.exceptions import AtomMappingWarning
from pydantic.v1 import BaseModel, Field
from pydantic import BaseModel, Field

logger = logging.getLogger(__name__)

Expand Down

0 comments on commit 22a065e

Please sign in to comment.