From 81d35f4f0e505debb14539dccfbedfc57bb2cac3 Mon Sep 17 00:00:00 2001 From: Emma Johnson Date: Mon, 12 Aug 2024 13:12:47 -0600 Subject: [PATCH] Black --- pyomo/contrib/piecewise/ordered_3d_j1_triangulation_data.py | 3 +++ pyomo/contrib/piecewise/tests/test_triangulations.py | 1 + 2 files changed, 4 insertions(+) diff --git a/pyomo/contrib/piecewise/ordered_3d_j1_triangulation_data.py b/pyomo/contrib/piecewise/ordered_3d_j1_triangulation_data.py index 7988ec159cb..009107fd6ec 100644 --- a/pyomo/contrib/piecewise/ordered_3d_j1_triangulation_data.py +++ b/pyomo/contrib/piecewise/ordered_3d_j1_triangulation_data.py @@ -12,6 +12,7 @@ from pyomo.common.dependencies import networkx as nx import itertools + def _get_double_cube_graph(): # Graph of a double cube sign_vecs = list(itertools.product((-1, 1), repeat=3)) @@ -41,6 +42,7 @@ def _get_double_cube_graph(): return G + """ This code was used to generate the data structure in this file. It should never need to be run again, but is here for the sake of documentation: @@ -103,6 +105,7 @@ def _get_double_cube_graph(): """ + # This file was generated using generate_ordered_3d_j1_triangulation_data.py # Data format: Keys are a pair of simplices specified as the direction they are facing, # as a standard unit vector or negative of one, and a tag, 1 or 2, disambiguating which diff --git a/pyomo/contrib/piecewise/tests/test_triangulations.py b/pyomo/contrib/piecewise/tests/test_triangulations.py index ea0e287ac6d..7217750dfb1 100644 --- a/pyomo/contrib/piecewise/tests/test_triangulations.py +++ b/pyomo/contrib/piecewise/tests/test_triangulations.py @@ -225,6 +225,7 @@ def test_grid_hamiltonian_paths(self): self.check_grid_hamiltonian(3, 5) self.check_grid_hamiltonian(4, 3) + @unittest.skipUnless(networkx_available, "Networkx is not available") class TestHamiltonianPaths(unittest.TestCase): def test_hamiltonian_paths(self):