59 Commits

Author SHA1 Message Date
jan
284c7e4fd0 Use quoted first arg for cast()
ruff rule TC006
2025-04-15 17:25:56 -07:00
da7118f521 misc cleanup 2024-07-29 03:13:36 -07:00
ef6c5df386 be more consistent about when copies are made 2024-07-29 03:13:23 -07:00
1ae3ffb9a2 linter cleanup 2024-07-28 20:35:37 -07:00
39d9b88fa4 flatten indentation where it makes sense 2024-07-28 20:31:29 -07:00
9d5b1ef5e6 type annotation updates 2024-07-28 19:44:04 -07:00
jan
6db4bb96db Create an ordering for everything
In order to make layouts more reproducible
Also add pattern.sort() and file.utils.preflight_check()

optionally don't sort elements
elements aren't re-ordered that often, sorting them is slow, and the
sort criteria are arbitrary, so we might want to only sort stuff by name
2024-06-03 17:00:20 -07:00
e47f9b76b1 remove TODO labels from mypy #3004 comments 2023-10-15 16:18:33 -07:00
jan
91465b7175 don't keep track of y-mirroring separately from x 2023-10-15 16:18:33 -07:00
jan
9a28e1617c renderpather, get_bounds includes repetitions, Boundable 2023-10-15 16:18:33 -07:00
jan
22e1c6ae1d fix bounds 2023-10-15 16:18:33 -07:00
jan
e3c7150e18 missing import 2023-10-15 16:18:33 -07:00
jan
723d856915 repetitions affect bounds 2023-10-15 16:18:33 -07:00
1463535676 modernize type annotations 2023-10-15 16:18:33 -07:00
963918d1d9 various fixes and cleanup
mainly involving ports_to_data and data_to_ports
2023-10-15 16:18:32 -07:00
6b01b43559 flake8-aided fixes 2023-10-15 16:18:32 -07:00
jan
d9ae8dd6e3 wip 2023-10-15 16:18:32 -07:00
jan
7ca017d993 wip again 2023-10-15 16:18:32 -07:00
jan
7aaf73cb37 WIP: make libraries and names first-class! 2023-10-15 16:18:32 -07:00
a713967911 Add an alternate constructor for axis-aligned 2D grids 2023-01-04 22:56:17 -08:00
eb9682b1b8 Avoid calling new.unlock() in __deepcopy__()
since the new object's properties aren't necessarily deepcopied yet...
2022-06-08 21:12:39 -07:00
6886360f6d fix getting displacements in Arbitrary repetition 2022-04-01 17:35:21 -07:00
9f1c7aea01 add _displacements to __slots__ 2022-04-01 17:30:07 -07:00
jan
a4fe3d9e2e Use ArrayLike and NDArray wherever possible. Some type fixes and some related corner cases 2022-02-23 15:47:38 -08:00
jan
89f327ba37 reformat some multiline arg lists and add missing 'None' return types 2022-02-23 15:16:25 -08:00
4796676a4e use ArrayLike when accepting pseudo-ndarrays 2021-06-22 18:59:13 -07:00
f364970403 style and type fixes (per flake8)
could potentially fix some bugs in `Library` class and dxf reader
2020-10-16 19:00:50 -07:00
49a3b4e322 add support for annotations
and other fixes
2020-09-20 16:32:17 -07:00
d14182998b various fixes 2020-09-20 16:32:17 -07:00
794ebb6b37 repetition related fixup 2020-09-20 16:32:16 -07:00
bab40474a0 Add repetitions and split up code into traits 2020-09-20 16:32:16 -07:00
f3a1db30c5 Fix order of rotation/mirror/offset when calling as_pattern() on repetitions 2020-07-08 18:36:14 -07:00
d7a8bd7e0d Allow b_count=None 2020-05-17 23:00:25 -07:00
22b2834d55 Documentation improvements 2020-05-17 22:59:54 -07:00
8a404a2602 Allow setting subpattern identifier in constructors 2020-05-17 14:12:27 -07:00
5c6c10d2be fix repetition __repr__ 2020-05-12 14:17:50 -07:00
c236fdb81b Add __repr__ methods to most objects`
These are closer to what __str__ should be and will likely change in the
future.
2020-05-11 20:31:07 -07:00
c79eee2a8c Stricter locking (lock contained ndarrays and turn lists into tuples) 2020-05-11 19:29:00 -07:00
157df47884 Improve type annotations based on mypy errors 2020-05-11 19:09:35 -07:00
00394a62f0 Formally allow instances to point to None (i.e. an 'empty' pattern) 2020-05-11 18:58:57 -07:00
f8c49cdb5e Add setter/getter for .pattern to catch wrong types 2020-05-11 18:52:17 -07:00
fa8fc52dd6 Improve consistency of ndarray members 2020-05-11 18:49:30 -07:00
334633662e Remove extra __author__ declarations 2020-05-11 18:41:13 -07:00
jan
5adabfd25a Docstring format change
(new param and return format)
Also some minor code formatting fixes in utils
2020-02-17 21:02:53 -08:00
jan
20981f10b9 Fix error name
InvalidDataError -> PatternError
2020-02-16 18:17:28 -08:00
jan
a930c65d42 fix gridrepetition mirror 2020-02-10 10:09:07 -08:00
0db70d2c50 Change GridRepetition rotation/mirrored/scale properties so that they consistently apply only to the individual instances; the rotate()/mirror()/scale_by() functions apply to the full array. Add *_elements() versions of the functions 2020-02-07 23:01:14 -08:00
f2e6548d21 fix locking issue in __deepcopy__ 2019-12-13 21:18:31 -08:00
e0db621595 allow locking of all objects 2019-12-13 21:18:31 -08:00
97b7eda21a Force repetition counts to be integers 2019-12-06 22:28:11 -08:00