From 4d7709d615d3c048b26537955ba52c6a1416f4e6 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Thu, 31 Mar 2022 00:43:54 -0700 Subject: [PATCH] rename to snarled --- README.md | 24 +++++++++++------------ examples/check.py | 10 +++++----- setup.py | 8 ++++---- {snarl => snarled}/VERSION.py | 0 {snarl => snarled}/__init__.py | 8 ++++---- {snarl => snarled}/clipper.py | 0 {snarl => snarled}/interfaces/__init__.py | 0 {snarl => snarled}/interfaces/masque.py | 10 +++++----- {snarl => snarled}/main.py | 4 ++-- {snarl => snarled}/poly.py | 0 {snarl => snarled}/py.typed | 0 {snarl => snarled}/tracker.py | 0 {snarl => snarled}/types.py | 0 {snarl => snarled}/utils.py | 0 14 files changed, 32 insertions(+), 32 deletions(-) rename {snarl => snarled}/VERSION.py (100%) rename {snarl => snarled}/__init__.py (62%) rename {snarl => snarled}/clipper.py (100%) rename {snarl => snarled}/interfaces/__init__.py (100%) rename {snarl => snarled}/interfaces/masque.py (92%) rename {snarl => snarled}/main.py (99%) rename {snarl => snarled}/poly.py (100%) rename {snarl => snarled}/py.typed (100%) rename {snarl => snarled}/tracker.py (100%) rename {snarl => snarled}/types.py (100%) rename {snarl => snarled}/utils.py (100%) diff --git a/README.md b/README.md index bf780c0..3015e05 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ -snarl README +snarled README ============ Layout connectivity checker. -`snarl` is a python package for checking electrical connectivity in multi-layer layouts. +`snarled` is a python package for checking electrical connectivity in multi-layer layouts. It is intended to be "poor-man's LVS" (layout-versus-schematic), for when poverty has deprived the man of both a schematic and a better connectivity tool. -- [Source repository](https://mpxd.net/code/jan/snarl) -- [PyPI](https://pypi.org/project/snarl) +- [Source repository](https://mpxd.net/code/jan/snarled) +- [PyPI](https://pypi.org/project/snarled) ## Installation @@ -21,12 +21,12 @@ Requirements: Install with pip: ```bash -pip3 install snarl +pip3 install snarled ``` Alternatively, install from git ```bash -pip3 install git+https://mpxd.net/code/jan/snarl.git@release +pip3 install git+https://mpxd.net/code/jan/snarled.git@release ``` ## Example @@ -35,8 +35,8 @@ See `examples/check.py`. Note that the example uses `masque` to load data. ```python3 from pprint import pformat from masque.file import gdsii, oasis -import snarl -import snarl.interfaces.masque +import snarled +import snarled.interfaces.masque # Layer definitions connectivity = { @@ -49,8 +49,8 @@ connectivity = { cells, props = oasis.readfile('connectivity.oas') topcell = cells['top'] -polys, labels = snarl.interfaces.masque.read_cell(topcell, connectivity) -nets_info = snarl.trace_connectivity(polys, labels, connectivity) +polys, labels = snarled.interfaces.masque.read_cell(topcell, connectivity) +nets_info = snarled.trace_connectivity(polys, labels, connectivity) print('\nFinal nets:') print([kk for kk in nets_info.nets if isinstance(kk.name, str)]) @@ -103,7 +103,7 @@ Open nets: ## Code organization - The main functionality is in `trace_connectivity`. -- Useful classes, namely `NetsInfo` and `NetName`, are in `snarl.tracker`. -- `snarl.interfaces` contains helper code for interfacing with other packages. +- Useful classes, namely `NetsInfo` and `NetName`, are in `snarled.tracker`. +- `snarled.interfaces` contains helper code for interfacing with other packages. diff --git a/examples/check.py b/examples/check.py index 846087b..f2594b9 100644 --- a/examples/check.py +++ b/examples/check.py @@ -1,13 +1,13 @@ """ Example code for checking connectivity in a layout by using -`snarl` and `masque`. +`snarled` and `masque`. """ from pprint import pformat from masque.file import gdsii, oasis -import snarl -import snarl.interfaces.masque +import snarled +import snarled.interfaces.masque connectivity = { @@ -21,8 +21,8 @@ connectivity = { cells, props = oasis.readfile('connectivity.oas') topcell = cells['top'] -polys, labels = snarl.interfaces.masque.read_cell(topcell, connectivity) -nets_info = snarl.trace_connectivity(polys, labels, connectivity) +polys, labels = snarled.interfaces.masque.read_cell(topcell, connectivity) +nets_info = snarled.trace_connectivity(polys, labels, connectivity) print('\nFinal nets:') print([kk for kk in sorted(nets_info.nets.keys()) if isinstance(kk.name, str)]) diff --git a/setup.py b/setup.py index b64f207..817bef6 100644 --- a/setup.py +++ b/setup.py @@ -6,20 +6,20 @@ from setuptools import setup, find_packages with open('README.md', 'rt') as f: long_description = f.read() -with open('snarl/VERSION.py', 'rt') as f: +with open('snarled/VERSION.py', 'rt') as f: version = f.readlines()[2].strip() -setup(name='snarl', +setup(name='snarled', version=version, description='CAD layout electrical connectivity checker', long_description=long_description, long_description_content_type='text/markdown', author='Jan Petykiewicz', author_email='jan@mpxd.net', - url='https://mpxd.net/code/jan/snarl', + url='https://mpxd.net/code/jan/snarled', packages=find_packages(), package_data={ - 'snarl': ['py.typed', + 'snarled': ['py.typed', ] }, install_requires=[ diff --git a/snarl/VERSION.py b/snarled/VERSION.py similarity index 100% rename from snarl/VERSION.py rename to snarled/VERSION.py diff --git a/snarl/__init__.py b/snarled/__init__.py similarity index 62% rename from snarl/__init__.py rename to snarled/__init__.py index 9016ae0..0c99844 100644 --- a/snarl/__init__.py +++ b/snarled/__init__.py @@ -1,17 +1,17 @@ """ -snarl +snarled ===== Layout connectivity checker. -`snarl` is a python package for checking electrical connectivity in multi-layer layouts. +`snarled` is a python package for checking electrical connectivity in multi-layer layouts. It is intended to be "poor-man's LVS" (layout-versus-schematic), for when poverty has deprived the man of both a schematic and a better connectivity tool. The main functionality is in `trace_connectivity`. -Useful classes, namely `NetsInfo` and `NetName`, are in `snarl.tracker`. -`snarl.interfaces` contains helper code for interfacing with other packages. +Useful classes, namely `NetsInfo` and `NetName`, are in `snarled.tracker`. +`snarled.interfaces` contains helper code for interfacing with other packages. """ from .main import trace_connectivity from .tracker import NetsInfo, NetName diff --git a/snarl/clipper.py b/snarled/clipper.py similarity index 100% rename from snarl/clipper.py rename to snarled/clipper.py diff --git a/snarl/interfaces/__init__.py b/snarled/interfaces/__init__.py similarity index 100% rename from snarl/interfaces/__init__.py rename to snarled/interfaces/__init__.py diff --git a/snarl/interfaces/masque.py b/snarled/interfaces/masque.py similarity index 92% rename from snarl/interfaces/masque.py rename to snarled/interfaces/masque.py index c472de2..0e6c1f5 100644 --- a/snarl/interfaces/masque.py +++ b/snarled/interfaces/masque.py @@ -24,18 +24,18 @@ def read_cell( """ Extract `polys` and `labels` from a `masque.Pattern`. - This function extracts the data needed by `snarl.trace_connectivity`. + This function extracts the data needed by `snarled.trace_connectivity`. Args: cell: A `masque` `Pattern` object. Usually your topcell. connectivity: A sequence of 3-tuples specifying the layer connectivity. - Same as what is provided to `snarl.trace_connectivity`. + Same as what is provided to `snarled.trace_connectivity`. label_mapping: A mapping of `{label_layer: metal_layer}`. This allows labels to refer to nets on metal layers without the labels themselves being on that layer. Returns: - `polys` and `labels` data structures, to be passed to `snarl.trace_connectivity`. + `polys` and `labels` data structures, to be passed to `snarled.trace_connectivity`. """ metal_layers, via_layers = connectivity2layers(connectivity) @@ -80,7 +80,7 @@ def load_polys( layers: Sequence[layer_t], ) -> defaultdict[layer_t, List[NDArray[numpy.float64]]]: """ - Given a *flat* `masque.Pattern`, extract the polygon info into the format used by `snarl`. + Given a *flat* `masque.Pattern`, extract the polygon info into the format used by `snarled`. Args: cell: The `Pattern` object to extract from. @@ -88,7 +88,7 @@ def load_polys( Returns: `{layer0: [poly0, [(x0, y0), (x1, y1), ...], poly2, ...]}` - `polys` structure usable by `snarl.trace_connectivity`. + `polys` structure usable by `snarled.trace_connectivity`. """ polys = defaultdict(list) for ss in cell.shapes: diff --git a/snarl/main.py b/snarled/main.py similarity index 99% rename from snarl/main.py rename to snarled/main.py index b633431..91abf88 100644 --- a/snarl/main.py +++ b/snarled/main.py @@ -1,5 +1,5 @@ """ -Main connectivity-checking functionality for `snarl` +Main connectivity-checking functionality for `snarled` """ from typing import Tuple, List, Dict, Set, Optional, Union, Sequence, Mapping from collections import defaultdict @@ -29,7 +29,7 @@ def trace_connectivity( """ Analyze the electrical connectivity of the layout. - This is the primary purpose of `snarl`. + This is the primary purpose of `snarled`. The resulting `NetsInfo` will contain only disjoint `nets`, and its `net_aliases` can be used to understand which nets are shorted (and therefore known by more than one name). diff --git a/snarl/poly.py b/snarled/poly.py similarity index 100% rename from snarl/poly.py rename to snarled/poly.py diff --git a/snarl/py.typed b/snarled/py.typed similarity index 100% rename from snarl/py.typed rename to snarled/py.typed diff --git a/snarl/tracker.py b/snarled/tracker.py similarity index 100% rename from snarl/tracker.py rename to snarled/tracker.py diff --git a/snarl/types.py b/snarled/types.py similarity index 100% rename from snarl/types.py rename to snarled/types.py diff --git a/snarl/utils.py b/snarled/utils.py similarity index 100% rename from snarl/utils.py rename to snarled/utils.py