Skip to content

Commit

Permalink
Merge pull request #1133 from glotzerlab/remove-garnett
Browse files Browse the repository at this point in the history
Remove Garnett as a Testing Dependency
  • Loading branch information
tommy-waltmann authored Aug 7, 2023
2 parents 6050d8d + 3c47d3e commit ce57639
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 28 deletions.
1 change: 0 additions & 1 deletion .github/workflows/oldest-test-reqs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ ase==3.16.0
cmake==3.13.0
cython==0.29.14
dynasor==1.1b0; platform_system != "Windows"
garnett==0.7.1
gsd==2.4.2
matplotlib==3.0.0
numpy==1.15.0
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools", "wheel", "oldest-supported-numpy", "cython>=0.29.14", "scikit-build>=0.17.3", "cmake"]
requires = ["setuptools", "wheel", "oldest-supported-numpy", "cython>=0.29.14,<3.0.0", "scikit-build>=0.17.3", "cmake"]

[tool.black]
target-version = ['py36']
Expand Down
3 changes: 1 addition & 2 deletions requirements/requirements-test-compatible.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ cmake>=3.13.0
coverage>=6.2
cython>=0.29.14, <3.0.0
dynasor>=1.1b0; platform_system != "Windows"
garnett>=0.7.1
GitPython>=3.1.24
gsd>=2.4.2, <3.0.0
gsd>=2.4.2
matplotlib>=3.0.0
numpy>=1.14.0
pillow>=6.2.0 --only-binary=pillow
Expand Down
3 changes: 1 addition & 2 deletions requirements/requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ cmake==3.27.0
coverage==7.2.7
cython==0.29.35
dynasor==1.1.1; platform_system != "Windows"
garnett==0.7.1
GitPython==3.1.32
gsd==2.9.0
gsd==3.1.0
matplotlib>=3.0.0
numpy==1.25.2
pillow>=8.0.0 --only-binary=pillow
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
tests_require=[
"ase>=3.16",
"gsd>=2.0",
"garnett>=0.7.1",
"matplotlib>=3.0",
"sympy>=1.0",
],
Expand Down
26 changes: 10 additions & 16 deletions tests/integration/test_reader_integrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,21 @@
import os
import sys

import gsd
import gsd.hoomd
import numpy as np
import numpy.testing as npt
import pytest

import freud

try:
GSD_VERSION = gsd.__version__
GSD_READ_FLAG = "rb"
except AttributeError:
GSD_VERSION = gsd.version.version
GSD_READ_FLAG = "r"


def _relative_path(*path):
return os.path.join(os.path.dirname(__file__), *path)
Expand Down Expand Up @@ -44,22 +53,7 @@ def test_mdanalysis_dcd(self):
self.run_analyses(reader)

def test_gsd_gsd(self):
import gsd.hoomd

with gsd.hoomd.open(LJ_GSD, "rb") as traj:
self.run_analyses(traj)

def test_garnett_gsd(self):
import garnett

with garnett.read(LJ_GSD) as traj:
self.run_analyses(traj)

@pytest.mark.filterwarnings("ignore:Failed to import dcdreader")
def test_garnett_dcd(self):
import garnett

with garnett.read(LJ_DCD) as traj:
with gsd.hoomd.open(LJ_GSD, GSD_READ_FLAG) as traj:
self.run_analyses(traj)

def test_ovito_gsd(self):
Expand Down
18 changes: 13 additions & 5 deletions tests/validation/test_Minkowski_Structure_Metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,21 @@

import os

import garnett
import gsd
import gsd.hoomd
import numpy as np
import numpy.testing as npt
import pytest

import freud

try:
GSD_VERSION = gsd.__version__
GSD_READ_FLAG = "rb"
except AttributeError:
GSD_VERSION = gsd.version.version
GSD_READ_FLAG = "r"


def _get_structure_data(structure, qtype):
return np.genfromtxt(
Expand All @@ -30,15 +38,15 @@ def test_minkowski_structure_metrics(self, structure):
expected_wl = _get_structure_data(structure, "w")
expected_avwl = _get_structure_data(structure, "avw")

with garnett.read(
snap = gsd.hoomd.open(
os.path.join(
os.path.dirname(__file__),
"files",
"minkowski_structure_metrics",
f"{structure}.gsd",
)
) as traj:
snap = traj[0]
),
mode=GSD_READ_FLAG,
)[0]

voro = freud.locality.Voronoi()
voro.compute(snap)
Expand Down

0 comments on commit ce57639

Please sign in to comment.