diff --git a/docs/conf.py b/docs/conf.py index 8ce743d9..0c62f27f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -93,7 +93,7 @@ "version_info": { "current": release, "versions": { - "main": "/main/", + "main": "/", } } } @@ -101,7 +101,7 @@ # Add any tags to the versions dictionary import subprocess try: - tags = subprocess.check_output(['git', 'tag', '-l', 'v*.*.*']).decode().strip().split('\n') + tags = subprocess.check_output(['git', 'tag', '-l', '"v*.*.*"']).decode().strip().split('\n') for tag in tags: if tag: html_context["version_info"]["versions"][tag] = f"/{tag}/" diff --git a/engibench/problems/airfoil/pyopt_history.py b/engibench/problems/airfoil/pyopt_history.py index 4ff559b2..ef0fb76b 100644 --- a/engibench/problems/airfoil/pyopt_history.py +++ b/engibench/problems/airfoil/pyopt_history.py @@ -1,4 +1,4 @@ -# ruff: noqa: D101,N999,D205,N803,N802,N806,FBT002,D416,SIM118,RET503,RET502,RET505,D212,ISC003,SLF001,C901,PLR0913,PLR0912,PLR0915,S110,BLE001,SIM102,PLR2004 +# ruff: noqa: D101,D205,N803,N802,N806,FBT002,D416,SIM118,RET503,RET502,RET505,D212,ISC003,SLF001,C901,PLR0913,PLR0912,PLR0915,S110,BLE001,SIM102,PLR2004 """This file is copy pasted from pyOptSparse: https://github.com/mdolab/pyoptsparse/blob/main/pyoptsparse/pyOpt_history.py. It is used to read the history of an optimization run. diff --git a/engibench/problems/airfoil/v0.py b/engibench/problems/airfoil/v0.py index 3581833b..1edc334f 100644 --- a/engibench/problems/airfoil/v0.py +++ b/engibench/problems/airfoil/v0.py @@ -22,6 +22,7 @@ from typing import Annotated, Any from gymnasium import spaces +import matplotlib.pyplot as plt import numpy as np import numpy.typing as npt import pandas as pd @@ -532,8 +533,6 @@ def render(self, design: DesignType, *, open_window: bool = False, save: bool = Returns: Any: The rendered design. """ - import matplotlib.pyplot as plt - fig, ax = plt.subplots() coords = design["coords"] alpha = design["angle_of_attack"] @@ -561,8 +560,6 @@ def render_optisteps(self, optisteps_history: list[OptiStep], *, open_window: bo Returns: Any: Rendered optimization step history. """ - import matplotlib.pyplot as plt - fig, ax = plt.subplots() steps = np.array([step.step for step in optisteps_history]) objectives = np.array([step.obj_values[0][0] for step in optisteps_history]) diff --git a/engibench/problems/beams2d/backend.py b/engibench/problems/beams2d/backend.py index 4f082797..108f7012 100644 --- a/engibench/problems/beams2d/backend.py +++ b/engibench/problems/beams2d/backend.py @@ -1,4 +1,4 @@ -# ruff: noqa: N806, N815, N816 +# ruff: noqa: N806, N815 # Disabled variable name conventions """Beams 2D problem. diff --git a/engibench/problems/beams2d/v0.py b/engibench/problems/beams2d/v0.py index 4e93f856..87ab97cb 100644 --- a/engibench/problems/beams2d/v0.py +++ b/engibench/problems/beams2d/v0.py @@ -1,4 +1,4 @@ -# ruff: noqa: N806, N815, N816 +# ruff: noqa: N806 # Disabled variable name conventions """Beams 2D problem.""" @@ -9,8 +9,10 @@ from typing import Annotated, Any from gymnasium import spaces +import matplotlib.pyplot as plt import numpy as np import numpy.typing as npt +import seaborn as sns from engibench.constraint import bounded from engibench.constraint import constraint @@ -300,9 +302,6 @@ def render(self, design: np.ndarray, *, open_window: bool = False) -> Any: Returns: Any: The rendered design. """ - import matplotlib.pyplot as plt - import seaborn as sns - fig, ax = plt.subplots(figsize=(8, 4)) sns.heatmap(design, cmap="coolwarm", ax=ax, vmin=0, vmax=1) diff --git a/engibench/problems/heatconduction2d/v0.py b/engibench/problems/heatconduction2d/v0.py index 01a29edf..acf8e50e 100644 --- a/engibench/problems/heatconduction2d/v0.py +++ b/engibench/problems/heatconduction2d/v0.py @@ -10,6 +10,7 @@ from typing import Annotated, Any from gymnasium import spaces +import matplotlib.pyplot as plt import numpy as np import numpy.typing as npt @@ -270,8 +271,6 @@ def render(self, design: npt.NDArray, *, open_window: bool = False) -> Any: if design is None: design = self.initialize_design() - import matplotlib.pyplot as plt - fig, ax = plt.subplots() im = ax.imshow(design, "hot") diff --git a/engibench/problems/heatconduction3d/v0.py b/engibench/problems/heatconduction3d/v0.py index 70b4aee1..78cfa32c 100644 --- a/engibench/problems/heatconduction3d/v0.py +++ b/engibench/problems/heatconduction3d/v0.py @@ -10,6 +10,7 @@ from typing import Annotated, Any from gymnasium import spaces +import matplotlib.pyplot as plt import numpy as np import numpy.typing as npt @@ -273,8 +274,6 @@ def render(self, design: npt.NDArray, *, open_window: bool = False) -> Any: if design is None: design = self.initialize_design() - import matplotlib.pyplot as plt - size = len(design) + 1 fig = plt.figure() diff --git a/engibench/problems/power_electronics/utils/config.py b/engibench/problems/power_electronics/utils/config.py index 4b6142fe..ea3f0a3b 100644 --- a/engibench/problems/power_electronics/utils/config.py +++ b/engibench/problems/power_electronics/utils/config.py @@ -1,5 +1,5 @@ """Set up the configuration for the Power Electronics problem.""" -# ruff: noqa: N806, N815 # Upper case +# ruff: noqa: N815 # Upper case from dataclasses import dataclass from dataclasses import field diff --git a/engibench/problems/power_electronics/utils/process_log_file.py b/engibench/problems/power_electronics/utils/process_log_file.py index 422d1fbe..0a35b9cf 100644 --- a/engibench/problems/power_electronics/utils/process_log_file.py +++ b/engibench/problems/power_electronics/utils/process_log_file.py @@ -1,5 +1,5 @@ """Read from the log file to get the DcGain and Voltage Ripple values.""" -# ruff: noqa: N806, N815 # Upper case +# ruff: noqa: N806 # Upper case import numpy as np diff --git a/engibench/problems/power_electronics/utils/process_sweep_data.py b/engibench/problems/power_electronics/utils/process_sweep_data.py index 3b3a70c7..00133b27 100644 --- a/engibench/problems/power_electronics/utils/process_sweep_data.py +++ b/engibench/problems/power_electronics/utils/process_sweep_data.py @@ -1,5 +1,3 @@ -# ruff: noqa: N806, N815 # Upper case - """Use the sweep_data to set config parameters.""" from engibench.problems.power_electronics.utils.config import Config diff --git a/engibench/problems/power_electronics/v0.py b/engibench/problems/power_electronics/v0.py index bef296d4..f52e1a76 100644 --- a/engibench/problems/power_electronics/v0.py +++ b/engibench/problems/power_electronics/v0.py @@ -1,4 +1,4 @@ -# ruff: noqa: N806, N815 +# ruff: noqa: N806 """Power Electronics problem."""