diff --git a/precheck/precheck.py b/precheck/precheck.py index 54ae9a8..41a95eb 100644 --- a/precheck/precheck.py +++ b/precheck/precheck.py @@ -9,7 +9,6 @@ import time import traceback import xml.etree.ElementTree as ET -import brotli import gdstk import klayout.db as pya import klayout.rdb as rdb @@ -282,17 +281,16 @@ def main(): gds_stem = args.gds.removesuffix(".gds") gds_temp = None gds_file = args.gds - elif args.gds.endswith(".gds.br"): - gds_stem = args.gds.removesuffix(".gds.br") + elif args.gds.endswith(".oas"): + gds_stem = args.gds.removesuffix(".oas") gds_temp = tempfile.NamedTemporaryFile(suffix=".gds", delete=False) gds_file = gds_temp.name - logging.info(f"decompressing {args.gds} to {gds_file}") - with open(args.gds, "rb") as f: - data = f.read() - with open(gds_file, "wb") as f: - f.write(brotli.decompress(data)) + logging.info(f"Converting {args.gds} to {gds_file}") + layout = pya.Layout() + layout.read(args.gds) + layout.write(gds_file) else: - raise PrecheckFailure("Layout file extension is neither .gds nor .gds.br") + raise PrecheckFailure("Layout file extension is neither .gds nor .oas") tech = args.tech if tech not in tech_names: diff --git a/precheck/pyproject.toml b/precheck/pyproject.toml index b09ddc3..9b68a34 100644 --- a/precheck/pyproject.toml +++ b/precheck/pyproject.toml @@ -3,7 +3,6 @@ name = "tt-precheck" requires-python = ">=3.11" dynamic = ["version"] dependencies = [ - "brotli", "gdstk", "klayout>=0.28.17.post1,<0.29.0", "numpy<2", diff --git a/precheck/requirements.txt b/precheck/requirements.txt index e2cc11c..83c6340 100644 --- a/precheck/requirements.txt +++ b/precheck/requirements.txt @@ -1,11 +1,9 @@ # -# This file is autogenerated by pip-compile with Python 3.13 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # pip-compile # -brotli==1.1.0 - # via tt-precheck (pyproject.toml) gdstk==0.9.52 # via tt-precheck (pyproject.toml) iniconfig==2.0.0