Jan Petykiewicz
d079b44883
Revert "allow ports2data to take a tree"
...
This reverts commit 44f823c736
.
LazyLibrary can't take Trees anymore, so no need for it.
1 year ago
Jan Petykiewicz
1d649389a0
LazyLibrary should not contain `Tree`s
...
altering itself during iteration is not a good idea
1 year ago
Jan Petykiewicz
dc2c12c26f
missing import
1 year ago
Jan Petykiewicz
a1c4cdee1e
fix type for __contains__
1 year ago
Jan Petykiewicz
44f823c736
allow ports2data to take a tree
1 year ago
Jan Petykiewicz
9d466882a0
misc fixes
1 year ago
Jan Petykiewicz
369bad9ae4
Only allow 1-sized Libraries
1 year ago
Jan Petykiewicz
ee6d857cad
Allow lshift to operate on any library. If only one name, return it, else None
1 year ago
Jan Petykiewicz
5e2018a1a1
add missing functions to tree
1 year ago
Jan Petykiewicz
5446a8c40b
add Pather.mk()
1 year ago
Jan Petykiewicz
a9188c5655
add name arg
1 year ago
Jan Petykiewicz
05f327387e
pather reorganization/clenaup
1 year ago
Jan Petykiewicz
482ca058bb
add lshift operator to MutableLibrary
1 year ago
Jan Petykiewicz
c69081331c
set default for library to None
1 year ago
Jan Petykiewicz
4a2c4c5220
Turn Builder into a subset of Pather
1 year ago
Jan Petykiewicz
83c710a85f
fix add_tree operator
1 year ago
Jan Petykiewicz
81171e9b02
Allow LazyLibrary to store Trees as well?
1 year ago
Jan Petykiewicz
02da37a890
Use lshift for tree combination
1 year ago
Jan Petykiewicz
7da6f5126b
stringy type
1 year ago
Jan Petykiewicz
b9848d149c
ergonomics
1 year ago
Jan Petykiewicz
454f167340
Add Tree as a possible way to allow construction of whole subtrees at once
1 year ago
Jan Petykiewicz
7191e5f62c
Add move_references() and auto-move references during add()-with-rename
...
Also remove enable_cache, since we now rely on the cache.
1 year ago
Jan Petykiewicz
3be4da3e7c
implement auto-renaming during merge, and change _merge() to support it
1 year ago
jan
6f6143da1a
remove some trailing undescores
1 year ago
Jan Petykiewicz
3105a669b4
add NamedPattern
1 year ago
Jan Petykiewicz
171d61ccab
add .create()
1 year ago
Jan Petykiewicz
0be7f9d42a
note in comments
1 year ago
Jan Petykiewicz
7fc0902fe7
Add recurse arg to get_bounds
1 year ago
Jan Petykiewicz
3758df6938
remove log messages
1 year ago
Jan Petykiewicz
3205091286
Return WrapLibrary from read() and readfile()
1 year ago
Jan Petykiewicz
9351f5b5f8
Default to adding ports at the origin
1 year ago
Jan Petykiewicz
658eca5eea
some cleanup
1 year ago
Jan Petykiewicz
783953bb73
add FlatBuilder
1 year ago
Jan Petykiewicz
afab6fd940
import ports2data at top level
1 year ago
Jan Petykiewicz
7adaea32ec
add library .rename(...)
1 year ago
Jan Petykiewicz
d6b897131b
missing comma
1 year ago
Jan Petykiewicz
6172abf77c
writefile should write to a temporary file first
1 year ago
Jan Petykiewicz
6cbdd7930d
add name_and_set
1 year ago
Jan Petykiewicz
a061c5a2d9
add missing comments
1 year ago
Jan Petykiewicz
f80c21ed4d
Allow library __setitem__ to take in either Pattern or Callable
...
No longer need it to be Generic!
1 year ago
Jan Petykiewicz
089e5192e3
various fixes and cleanup
...
mainly involving ports_to_data and data_to_ports
1 year ago
Jan Petykiewicz
6599dad48f
move builder.port_utils into utils.ports2data
...
and rename functions
1 year ago
Jan Petykiewicz
c2ce9ed547
more fixes and improvements
1 year ago
Jan Petykiewicz
6eb4af3203
get things working with a LazyLibrary hack while we think about cycles
1 year ago
Jan Petykiewicz
22735125d5
Lots of progress on tutorials
1 year ago
Jan Petykiewicz
34a5369a55
Add note about reproducibility for DXF
1 year ago
Jan Petykiewicz
7cec1e84c9
remove dead code
1 year ago
Jan Petykiewicz
592b91044b
formatting
1 year ago
Jan Petykiewicz
060f6978cd
Fix extra vertex added during OASIS loading
1 year ago
Jan Petykiewicz
1b04fb7ed0
lots of fixes to get test_rep running
1 year ago
Jan Petykiewicz
88b64bf525
improve gzipped file reproducibility
...
Mostly avoid writing the old filename and modification time to the gzip
header
1 year ago
Jan Petykiewicz
bd14ef37c7
clarify comment
1 year ago
Jan Petykiewicz
95c41d4519
get rid of Mapping stuff on PortsList
1 year ago
Jan Petykiewicz
c0b9b7fe81
add todos
1 year ago
Jan Petykiewicz
189f517dcf
add AbstractView
1 year ago
Jan Petykiewicz
9f041e51f4
Move Abstract into its own file
1 year ago
Jan Petykiewicz
09d76203e8
handle library=None
1 year ago
Jan Petykiewicz
2302d29433
library can generate abstracts
1 year ago
Jan Petykiewicz
09b7ecd80e
B becomes BB for searchability
1 year ago
Jan Petykiewicz
aff0df33cc
PortsRef -> Abstract
1 year ago
Jan Petykiewicz
326c9b9727
flake8-aided fixes
1 year ago
Jan Petykiewicz
8484628f2f
fix more type issues
1 year ago
Jan Petykiewicz
6565b8baa3
more wip -- most central stuff is first pass done
1 year ago
Jan Petykiewicz
df1acd7c87
wip -- more fixes
1 year ago
jan
743428d8d7
wip
1 year ago
jan
e482107366
wip
1 year ago
Jan Petykiewicz
a15131f22a
busL -> mpath
1 year ago
Jan Petykiewicz
cb8897b8fe
some type updates
1 year ago
Jan Petykiewicz
83b9af0cc3
Remove support for dose
...
Since there isn't GDS/OASIS level support for dose, this can be mostly
handled by using arbitrary layers/dtypes directly. Dose scaling isn't
handled as nicely that way, but it corresponds more directly to what
gets written to file.
1 year ago
Jan Petykiewicz
dfdceefdcd
fix some type-related issues
1 year ago
Jan Petykiewicz
ecb61c9174
get rid of "identifier"
1 year ago
jan
1741cfb755
wip again
1 year ago
jan
58894fa596
delete duplicate utils submodule
1 year ago
Jan Petykiewicz
5bb67c817f
partial work on device libraries
1 year ago
Jan Petykiewicz
fd045e16d4
various fixes
1 year ago
Jan Petykiewicz
073ccacee9
remove duplicatre __delitem__
1 year ago
Jan Petykiewicz
804b662780
improve docs
1 year ago
Jan Petykiewicz
14e9a7ccbe
indirect type spec for Pattern
1 year ago
jan
9bb7ddbb79
Add lib types
1 year ago
jan
273d828d87
bifurcate Device into DeviceRef
1 year ago
Jan Petykiewicz
b4eee6b84e
make error message prettier
1 year ago
jan
42c3a2b1e1
WIP: make libraries and names first-class!
1 year ago
Jan Petykiewicz
fff20b3da9
Avoid generating a container if only a single port is passed
1 year ago
Jan Petykiewicz
4bae737630
allow bounds to be passed as args
1 year ago
Jan Petykiewicz
9891ba9e47
allow passing a single Tool to be used as the default
1 year ago
Jan Petykiewicz
df320e80cc
Add functionality for building paths (single use wires/waveguides/etc)
1 year ago
jan
8edb7b0956
round().astype() -> rint(...)
1 year ago
Jan Petykiewicz
5b5cbe94d3
Move from setuputils and setup.py to hatch and pyproject.toml
1 year ago
Jan Petykiewicz
a713967911
Add an alternate constructor for axis-aligned 2D grids
2 years ago
Jan Petykiewicz
51b7021bdc
bump version to 2.7
2 years ago
Jan Petykiewicz
b188589b60
Fix / simplify some cases where the arc is a sector
2 years ago
Jan Petykiewicz
eb9682b1b8
Avoid calling new.unlock() in __deepcopy__()
...
since the new object's properties aren't necessarily deepcopied yet...
2 years ago
Jan Petykiewicz
48b28351ed
speed up GDS writing
...
by preallocating xy array and directly rounding to target dtype
2 years ago
Jan Petykiewicz
bfabd351c4
fix circular import
2 years ago
jan
4cc824526b
fix deepcopy for locked shapes
2 years ago
Jan Petykiewicz
e48183ee0b
dose==1 is the identity situation
2 years ago
Jan Petykiewicz
6886360f6d
fix getting displacements in Arbitrary repetition
2 years ago
Jan Petykiewicz
b5ddb5749c
fix calculation of displacements
2 years ago
jan
67d312162a
speed up as_pattern()
...
mainly used by `flatten()`
2 years ago
Jan Petykiewicz
97db83a1d5
add utils.vertices.poly_contains_points
2 years ago
Jan Petykiewicz
fd0b2ba4cd
no longer ignore numpy types
2 years ago
Jan Petykiewicz
9f1c7aea01
add _displacements to __slots__
2 years ago
Jan Petykiewicz
3640de27c7
Fix OASIS loading when strings are stored by-reference
2 years ago
Jan Petykiewicz
ed9b0df057
fix scaling for objects with repetitions
2 years ago
jan
a4aa50d814
fix another instance where numpy prohibits using `not bounds`
2 years ago
jan
2b8195ad3e
move dev2pat and pat2dev into masque.builder.port_utils
2 years ago
jan
36f6edac21
fix wrong var name
2 years ago
jan
210f5c21bc
wrap_device can be used on DeviceLibrary
2 years ago
jan
bfee560693
simplify type hints
2 years ago
jan
f4c2357737
fix type hint
2 years ago
jan
20be409341
fix numpy complaining about .any() / .all()
2 years ago
jan
d8b60da827
use_ours & use_theirs should be passed verbatim to the underlying library
2 years ago
jan
3b0ef1e08d
always couple LibDeviceLibrary keys to the underlying Library
...
See comment for why this is necessary
2 years ago
jan
7603a7a1c8
fix typevar naming
2 years ago
jan
0c1954c9d1
fix missing imports
2 years ago
jan
30025ba081
fixup dxf read
2 years ago
jan
5ef34794ff
keep ordering stable for same-y ports
2 years ago
jan
c8b4075fcc
Avoid circular import
2 years ago
jan
40b98b2511
add missing colon
2 years ago
jan
0471addd65
add get_bounds_nonempty
2 years ago
jan
780d1ca97f
export LibDeviceLibrary
2 years ago
jan
fc7a6c6f4a
fix some unused code
2 years ago
jan
81430fe632
add LibDeviceLibrary
2 years ago
jan
6a1208bc33
add some helper functions to libraries
2 years ago
jan
f36350ebee
Add some warnings around cache invalidation when mutating items
2 years ago
jan
2e5d51b0af
resolve name conflicts rather than just giving up
...
this lets us merge libraries without having to mutate `other`, which
brings a bunch of problems around cache invalidation
2 years ago
jan
566ba99f9c
set_const doesn't need to take in a separate key, can just use the pattern's name
...
might as well make the convenience function convenient
2 years ago
jan
86315fc32b
improve DeviceLibrary docstring
2 years ago
jan
f178e94d82
remove old overloads
2 years ago
jan
7612a2660c
add DeviceLibraryError
2 years ago
Jan Petykiewicz
7aa850a239
add todo note
2 years ago
Jan Petykiewicz
9a9a05d1d7
add guillotine_bssf_sas
2 years ago
Jan Petykiewicz
c2994b74bd
add utils.pack2d.pack_patterns
2 years ago
Jan Petykiewicz
a9e3bf8b2a
return a set of rejected indices
2 years ago
Jan Petykiewicz
fc1a0f5a5a
break apart utils into submodules, and add utils.pack2d
2 years ago
jan
a4fe3d9e2e
Use ArrayLike and NDArray wherever possible. Some type fixes and some related corner cases
2 years ago
jan
89f327ba37
reformat some multiline arg lists and add missing 'None' return types
2 years ago
Jan Petykiewicz
47e8cab73c
fix format string now that ptypes are str-typed
3 years ago
Jan Petykiewicz
a92ab9425b
typo in 4788fa3c
3 years ago
Jan Petykiewicz
576077c461
add docstring for Pattern.rename()
3 years ago
Jan Petykiewicz
4788fa3ca5
add Device.rename()
3 years ago
Jan Petykiewicz
dbee0027b2
fix wrap_repated_shapes for labels
3 years ago
Jan Petykiewicz
52c6634a25
fix port comparison regression
3 years ago
Jan Petykiewicz
886bd59726
should be casting with numpy.array() not .ndarray()
3 years ago
Jan Petykiewicz
4796676a4e
use ArrayLike when accepting pseudo-ndarrays
3 years ago
Jan Petykiewicz
3aefa644e5
fix type annotations for Device.__getitem__
3 years ago
Jan Petykiewicz
65466a5986
Force keyword args in more cases
3 years ago
Jan Petykiewicz
21ef4207df
Enable repetition arg for other Polygon constructors
3 years ago
Jan Petykiewicz
78a4416f4c
Fix wrap_repeated_shapes
3 years ago
Jan Petykiewicz
0d733bdc6f
Breaking change: Use string-valued ptypes, with default value 'unk'
3 years ago