Skip to content

Commit

Permalink
Merge pull request #471 from simbilod/process_version
Browse files Browse the repository at this point in the history
process plugin version
  • Loading branch information
joamatab authored Aug 19, 2024
2 parents 653971f + 57b3c51 commit 98458f9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion gplugins/sentaurus/sprocess.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import importlib
import math
import pathlib
from pathlib import Path
Expand All @@ -15,7 +16,10 @@
from gdsfactory.typings import Dict, Tuple

from gplugins.gmsh.parse_gds import cleanup_component_layermap
from gplugins.sentaurus.mask import get_sentaurus_mask_2D, get_sentaurus_mask_3D
from gplugins.sentaurus.mask_sprocess import (
get_sentaurus_mask_2D,
get_sentaurus_mask_3D,
)

DEFAULT_INIT_LINES = """AdvancedCalibration
mgoals accuracy=2e-5
Expand Down Expand Up @@ -212,6 +216,12 @@ def write_sprocess(
num_threads (int): for parallelization
"""

gf_version = importlib.metadata.version("gdsfactory")
if int(gf_version.split(".")[0]) >= 8:
raise ImportError(
"The Sentaurus Process plugin is not compatible with gdsfactory version 8 or above."
)

save_directory = (
Path("./sprocess/") if save_directory is None else Path(save_directory)
)
Expand Down

0 comments on commit 98458f9

Please sign in to comment.