Commit Graph

107 Commits

Author SHA1 Message Date
Salvador E. Tropea c26481790a Added support for filters to sch_variant 2020-09-01 16:55:36 -03:00
Salvador E. Tropea 0216fc93c7 Added support for filters and variants to pdf_print_sch 2020-09-01 16:54:51 -03:00
Salvador E. Tropea 05f14e2049 Removed the plural in variant.
Is just one. It can be complex, but one name.
2020-09-01 16:51:11 -03:00
Salvador E. Tropea 16aefbffb6 Removed debug print. 2020-09-01 16:49:51 -03:00
Salvador E. Tropea 7cd0ccafa1 Fixed component save method.
The first value of the redundant position is the unit.
Not always 1.
2020-09-01 16:48:43 -03:00
Salvador E. Tropea 744aa3b9c5 Added a simple output to generate filtered schematics.
They can display DNF components crossed!
2020-08-31 20:51:20 -03:00
Salvador E. Tropea 4cc8a0916f Added filters to the variants.
So they have the same functionality than internal BoM.
I keep the (redundant) filters in internal BoM so users doesn't need to
create a variant just to apply a filter.
2020-08-31 20:49:41 -03:00
Salvador E. Tropea 7882cb0f4f Moved internal filters to the base class.
So they can be used not only for internal BoM purposes.
2020-08-31 20:48:56 -03:00
Salvador E. Tropea f12c7fc1ce Removed code for testing. 2020-08-31 20:45:08 -03:00
Salvador E. Tropea b0c014abe9 Added support to write schematics. 2020-08-31 20:44:34 -03:00
Salvador E. Tropea 094cf41e7b Added support for Italic and Bold in Text* elements. 2020-08-31 20:43:52 -03:00
Salvador E. Tropea a0db94d67c Added support for cross to multi-part components. 2020-08-31 20:42:06 -03:00
Salvador E. Tropea 8b0247bf80 Fixed rectangle computation for pins.
Left and Right exchanged.
2020-08-31 20:41:02 -03:00
Salvador E. Tropea 6620779e09 Handled missing components. 2020-08-30 18:49:01 -03:00
Salvador E. Tropea fee593c091 Added members to create the cache.lib
This is equivalent to the cache.lib, not the real one.
We can generate two versions, one normal and the other with crossed
components.
Now we need a schematic to use them.
2020-08-30 18:26:27 -03:00
Salvador E. Tropea 48be2fa749
Merge pull request #5 from INTI-CMNB/variants
Added Variants and Filters
2020-08-30 12:10:29 -03:00
Salvador E. Tropea 41c66b1ab4 Added support for '~' as empty value. 2020-08-30 11:54:34 -03:00
Salvador E. Tropea 4ed499531b Removed dead code. 2020-08-30 11:54:15 -03:00
Salvador E. Tropea 58430d8611 Fixed errors in Not and Multi Filters implementation. 2020-08-30 11:53:21 -03:00
Salvador E. Tropea a1455e0f46 Added more flexibility to filters.
Support for:
- Pass all
- Negated (in addition to its internal option)
- List of filters
2020-08-29 19:32:04 -03:00
Salvador E. Tropea c0a1867dd5 Added support for filters to the internal BoM generator.
- Now we can configure more details, like the DNC.
- We can also mix KiBoM and IBoM strategies.
- Adapted the test examples that used filtering.
2020-08-29 17:41:57 -03:00
Salvador E. Tropea 6af9faf909 Created the base filter class and the generic filter.
Moved all the KiBoM and IBoM filter functionality that was in their
variants to this generic mechanism.
2020-08-29 17:39:56 -03:00
Salvador E. Tropea ad7ed9183a Added the concept of `filters`
Closely related to variants, but more abstract.
Will allow much more configurability.
2020-08-29 17:38:32 -03:00
Salvador E. Tropea 006072e842 Documented computed component flags.
fitted, in_bom (new) and fixed
2020-08-29 17:31:35 -03:00
Salvador E. Tropea 249caad348 Implemented the IBoM variants styles.
The core functionality is now tested in the internal BoM.
The IBoM output needs adjust to allow using the variants with it.
2020-08-28 20:12:21 -03:00
Salvador E. Tropea c227b10f86 Interpret as error using unknown fields in variants. 2020-08-28 20:11:07 -03:00
Salvador E. Tropea c6c4b57b3d Added support for global output file name to the gerbers. 2020-08-28 16:56:51 -03:00
Salvador E. Tropea cbf24200a5 Updated the list of file to exclude from Python cache.
Also sorted the list.
2020-08-28 16:50:02 -03:00
Salvador E. Tropea 0bdce78004 Implemented the new variants mechanism in the internal BoM. 2020-08-28 16:49:20 -03:00
Salvador E. Tropea a19c6157b7 Added support to see the variant in the output file name.
Now the variant can affect the output file name.
2020-08-28 16:48:02 -03:00
Salvador E. Tropea 3be45edf07 Added the basic infraestructure for variants.
Now variants are defined separately so we can apply the variants for
more than one output.
It will also allow different variant semantics.
2020-08-28 16:46:24 -03:00
Salvador E. Tropea 7c11370afd Added tests for missing convert and/or rsvg-convert 2020-08-27 19:18:08 -03:00
Salvador E. Tropea c1e63da09a Moved the fields validation to a seprated methode.
To keep the function complexity lower.
2020-08-27 18:03:41 -03:00
Salvador E. Tropea 58fd473a41 Bumped version to 0.6.2. 2020-08-25 13:48:26 -03:00
Salvador E. Tropea 90c0e14b73 Added support for PcbDraw v0.6.0. 2020-08-25 13:47:36 -03:00
Salvador E. Tropea ee69de6e7d Problems with PcbDraw when generating PNG and JPG.
Currently the script uses ImageMagick library. But the SVG conversion
is handled unreliably. ImageMagick has various backends to do it and
some of them don't work. I saw this problem many times, and is now
affecting my system. A more reliable conversion can be achieved using
`rsvg-convert`. Isn't as good as InkScape, but is smaller and works
well.
In the process I'm trimming the extra blank space generated by
PcbDraw when we have objects in layers like "User Drawings" that
extends beyond the PCB size.
I'm also compressing JPGs more aggressively, this makes a real
difference between PNG and JPG outputs. Otherwise the difference
is too small.
2020-08-25 13:16:49 -03:00
Salvador E. Tropea cd8a32f544 Added comment pre-parsing.
Just to make the debug logs about which targets are skipped more
descriptive.
2020-08-25 09:36:59 -03:00
Salvador E. Tropea e08f70e78e No warnings about malformed value for DNFs
Now if the component value is any of the DNF values we avoid parsing it
as a real value.
2020-08-25 09:21:55 -03:00
Salvador E. Tropea d80b145af9 Now extra spaces in user fields are discarded.
The code strips spaces at the beggining and end of user field values.
2020-08-25 09:12:46 -03:00
Salvador E. Tropea 140a45fdc6 Fixed variants BoM logic.
The variants logic for BoMs when a component resquested to be only
added to more than one variant.
This is related to SchrodingersGat/KiBoM#136 issue.
2020-08-24 10:53:56 -03:00
SET c1d9dd3bfa Bumped version to 0.6.1.
Updated CHANGELOG and Debian version.
Also minor details in Debian dependencies.
2020-08-20 10:16:05 -03:00
SET f34cedc4b4 Added copyright to all the MCPY files. 2020-08-19 21:24:52 -03:00
SET ad0d2d5dcd Removed extra parameter that didn't help. 2020-08-19 20:58:41 -03:00
SET 1c95a44d58 Better comments, also left the Python 3.7 code and no 3.8. 2020-08-19 20:56:46 -03:00
SET abbf100d17 Added line information to the "with document" generated lines. 2020-08-19 20:37:22 -03:00
SET 93c824b083 Modified mcpy to better report the line numbers.
Seems to work for Python 3.8, but I have doubts for 3.7.
2020-08-19 19:31:46 -03:00
SET 28947ed70d Added support for relative imports to mcpy 2020-08-19 12:29:38 -03:00
SET 520b9626b1 Added retry to kicad-automation-scripts stuff.
The tests are metastable and fail from time to time.
I hope a retry will reduce the fail probability to something tolerable.
2020-08-19 11:43:10 -03:00
SET 3d1bbc63d8 Now checking the file flags, access is bad idea. 2020-08-18 22:55:54 -03:00
SET c45865e895 Modified to avoid removing read-only caches.
This is mainly to allow successful tests on CI/CD where we are running
as root. In practice is also a good idea to respect the permissions.
In real life installers make them r/w.
2020-08-18 22:38:36 -03:00
SET 422641a295 More robust behavior when the Python cache interferes.
Files using macros can't be cached. Now if we find caches for them we
try to delete the caches (pypi installation for example). If we can't
remove the files a warning is generated.
If we fail to load a plug-in an error explaining it is generated.
Also added a test to reproduce it.
2020-08-18 21:44:09 -03:00
SET 043b7d824e Added the mcpy package to the distribution.
Seems to be a rare dependence, is small and using it from outside
looks like a silly complication.
2020-08-18 21:42:42 -03:00
SET fe5bde9bd3 Allowed verbosity for most operation. 2020-08-18 21:32:49 -03:00
SET 820efd211c Marked sub-packages using __init__.py
Also documented the purpose of these files.
2020-08-18 12:08:52 -03:00
SET a260ccab1f Updated the package meta-data.
Also removed __version__.py, now part of __main__ definitions.
2020-08-18 12:07:44 -03:00
SET 231ffa5628 Added comment about update_xml is no longer needed. 2020-08-17 19:52:32 -03:00
SET 89914443f0 Renamed the kiplot module as kibot.
Also added src/kibot script.
Updated the documentation and Debian packaging.
The default extension for config files now is .kibot.yaml
2020-08-16 22:04:03 -03:00