Commit Graph

270 Commits

Author SHA1 Message Date
SET f7473bca12 Fixed the "non grouping" criteria.
Now we don't get repeated references for multi-part components.
2020-08-12 09:50:02 -03:00
SET 0503d9ef7d Added stack trace for the SCH loading.
Only when debug enabled.
2020-08-12 09:48:44 -03:00
SET d26c9a39bd Modified the "human readable" sheet path to be "/" for the root sheet.
Not just empty.
2020-08-12 09:46:46 -03:00
SET 4502860f79 Fixed SCH "Image" load 2020-08-12 09:45:15 -03:00
SET 148b4887ce Fixed SCH "Entry" load 2020-08-12 09:43:19 -03:00
SET c44955faec Adjusted test_regex and exclude_any help messages 2020-08-11 18:57:21 -03:00
SET c4833e198a Excluded "Part" field from collisions.
Is natural for aliases.
2020-08-11 18:34:19 -03:00
SET 4fa2267021 Fixed "exclude_any" logic. 2020-08-11 18:19:28 -03:00
SET 17b5e61a43 Removed dead code. 2020-08-11 16:02:00 -03:00
SET ce7b985062 Added more information to the field collision warning 2020-08-11 15:51:58 -03:00
SET d2bd0da962 Removed more dead code 2020-08-11 15:09:46 -03:00
SET 92514e38f0 Removed dead code. 2020-08-11 14:36:32 -03:00
SET ace151f1ef Removed dead code in Joiner class. 2020-08-11 13:40:14 -03:00
SET acfb74335b Fixed the Optionable._type method for empty lists. 2020-08-11 13:20:01 -03:00
SET 6d09d662be Fixed flake8 style details 2020-08-11 12:46:36 -03:00
SET e530a3bb98 Fixed the merge_blank_fields logic.
Now it uses empty fileds as wildcards.
2020-08-11 12:25:08 -03:00
SET fae2a024dd Optimized field names collection.
Now they are collected on the fly. No need to visit all the components
again.
2020-08-10 19:56:52 -03:00
SET 67cc8e9fca Enabled LibAlias.__str__ member.
Is used only for debug, but helps.
2020-08-10 18:58:36 -03:00
SET ab0591f102 Removed old comment. 2020-08-10 18:58:03 -03:00
SET b164e008e3 Fixed HTML output for internal BoM.
Reference to wrong config variable.
2020-08-10 18:56:39 -03:00
SET 8828be17e4 Fixed default variant name. 2020-08-10 18:55:58 -03:00
Salvador E. Tropea 78cfcd16c0 Added option to disable the red color for empty cells.
Applies only when using colors for column types.
Is for HTML and XLSX
2020-08-06 09:24:48 -03:00
Salvador E. Tropea 77bf713b26 Max number of chars per column configurable in XLSX.
Also added row height adjust.
2020-08-06 09:04:16 -03:00
Salvador E. Tropea 7298a5662f Give more priority to user defined 'Description' field.
Only using the one from libs if the user didn't define it.
2020-08-06 09:02:39 -03:00
Salvador E. Tropea 3555059f8f Better support for UTF-8 in XML output.
From SchrodingersGat/KiBoM#129 and SchrodingersGat/KiBoM#130
Fixes problems on Windows 10
2020-08-06 08:59:25 -03:00
Salvador E. Tropea 7563d1a9ad Implemented the KiCad version in the Internal BoM. 2020-08-05 21:17:20 -03:00
Salvador E. Tropea 46c55fcf91 Separated the format specific options for internal BoM
And now we have more options.
- CVS: can quote all values.
- HTML and XLSX: styles adjust, including a logo.
- XLSX: now has the same options as HTML
Also a fix in the "join" mechanism for "case insensitive" support.
2020-08-05 19:57:32 -03:00
Salvador E. Tropea 3e6648773f Fixed column names must be lower case for internal usage. 2020-08-05 19:55:01 -03:00
Salvador E. Tropea 61909127cd Fixed initialization of empty sub-options. 2020-08-05 19:53:57 -03:00
Salvador E. Tropea 547c3a22bb Simplified the columns logic for the internal BoM.
The ColumnList class now is just a place holder for column names.
We just create the list of columns from the user preferences or
creating a good default and then we just use this list.
2020-08-01 20:15:33 -03:00
Salvador E. Tropea 71c87bf2ea Optimized the list of fields reported by the components.
Avoiding to iterate on fields that we'll reject and also providing the
value in the same operation.
2020-08-01 19:11:58 -03:00
Salvador E. Tropea f062eca7aa Removed counter no longer used in HTML and CSV BoM writers. 2020-08-01 18:50:50 -03:00
Salvador E. Tropea a9cd9a649b Moved the BoM stats computation.
Now is in a loop that already operates with this information.
2020-08-01 18:39:34 -03:00
Salvador E. Tropea 5be7254594 Now the row number column is a regular column.
Its name is `Row` and you can put everywhere.
No `number_rows` option needed or special cases, is just another column
2020-08-01 18:31:26 -03:00
Salvador E. Tropea 64576e3975 Moved some repeated code in BoM writers.
All the writers computed some stats. Now they are computed in one place
avoiding repetition.
2020-08-01 16:55:33 -03:00
Salvador E. Tropea 6b9be4a2fc Implemented the group_connectors option of the internal BoM 2020-08-01 16:06:54 -03:00
Salvador E. Tropea 0f57ff8b73 Fixed 'component' column isn't always added, so we must test before remove. 2020-08-01 15:35:12 -03:00
Salvador E. Tropea d66410636e Fixed the column rename feature of the internal BoM 2020-08-01 15:17:54 -03:00
Salvador E. Tropea 107c1c1267 Fixed the use of component.ref_suffix
This is an string and can be '?' or a number.
2020-08-01 14:34:56 -03:00
Salvador E. Tropea 2ad4cccf21 Fixed internal BoM "Join" feature. 2020-08-01 13:16:44 -03:00
Salvador E. Tropea 65f9612104 Removed old comment about KiBoM PR number 2020-08-01 13:16:07 -03:00
Salvador E. Tropea ca67cc8ac3 Fixed columns capitalization.
Now the capitalization is preserved, even when internally we match all
using lowercase.
2020-07-31 20:08:12 -03:00
Salvador E. Tropea 8a5c3724a1 Fixed the "References" column
Now plural as in KiBoM.
2020-07-31 20:01:43 -03:00
Salvador E. Tropea 99bec61576 Fixed references sorting.
Also added a test to check it.
2020-07-31 19:52:01 -03:00
Salvador E. Tropea d55846fe85 Added missing empty line (flake8 detail) 2020-07-31 12:01:25 -03:00
Salvador E. Tropea a523c3ceb9 Added debug information about the SCH, PCB and Config used. 2020-07-31 12:00:49 -03:00
Salvador E. Tropea 984b81fea1 Added support for "Description" BoM column.
For this we are loading:
- The KiCad configuration
- The default and project symbol libs tables
- All the used libs
- All the used DCMs
2020-07-31 11:58:07 -03:00
Salvador E. Tropea 956cba7c98 Fixed verbosity levels bigger than 1.
Partially my fault and also a bug in docopt.
2020-07-28 23:09:33 -03:00
Salvador E. Tropea 9d3645fa41 Implemented the 'Sheetpath' column. 2020-07-28 20:05:50 -03:00
Salvador E. Tropea d8ff6c92aa Implemented 'Part Lib' and 'Footprint Lib' columns. 2020-07-28 19:40:56 -03:00
Salvador E. Tropea 544f34c6fc Added native BoM generator.
Based on KiBoM, but reading the data directly from the .sch
Information from the libs not supported yet.
2020-07-27 22:04:01 -03:00
Salvador E. Tropea f824bee832 Added KiCad v5.x schematic support.
It provides extra information, like which files are part of the
Schematic.
Library components not yet implemented.
2020-07-27 22:01:12 -03:00
Salvador E. Tropea 7dc94bf7be Added default output file name pattern.
Can be applied to all outputs.
2020-07-23 18:26:03 -03:00
Salvador E. Tropea d4d88a5c9d Normalized the PCB and SCH file names.
Now the GS members contains the absolute path and various useful parts
of the name are computed and stored in GS to avoid computing them in
each output.
2020-07-23 12:03:42 -03:00
Salvador E. Tropea 43b97db20c Now IBoM output file is coherent with other outputs.
The user can select the IBoM name mechanism, but the default is to use
a name coherent with all the other outputs.
2020-07-22 19:51:35 -03:00
Salvador E. Tropea d48ed3b23b Added a cache to avoid running external scripts many times to check
their versions
2020-07-22 18:48:18 -03:00
Salvador E. Tropea de6835d366 Fixed import no longer used. 2020-07-22 18:34:26 -03:00
Salvador E. Tropea 165d9aa15d Added full KiBoM configuration from the YAML config. 2020-07-22 18:33:53 -03:00
Salvador E. Tropea 97e95ff7c5 Fixed drill output default value not shown in help.
The docstring macro can evaluate attributes.
2020-07-22 18:30:58 -03:00
Salvador E. Tropea a0a97d8cd6 Added a mechanism to keep docstring spaces at the begining.
If dots are used they are converted into spaces (that aren't counted
for the indentation).
2020-07-22 18:28:49 -03:00
Salvador E. Tropea 53d840a5b1 Delayed the outputs configuration until last moment.
Now we set the data tree, but only configure the used outputs.
This gives a chance to setup things like the PCB and SCH meta-data.
2020-07-22 18:26:12 -03:00
Salvador E. Tropea a4c0df7fb5 Fixed flake8 warnings. 2020-07-22 18:16:18 -03:00
Salvador E. Tropea b89d1f481c Fixes in SCH meta-data collection.
- filename destruction
- code not executed
Also a test to cover all the cases.
2020-07-22 18:14:04 -03:00
Salvador E. Tropea d5168c37cd Added filename expansion for SCH related outputs.
pdf_sch_print is the first to support it.
2020-07-13 19:20:25 -03:00
Salvador E. Tropea 3822a39671 Added _pos to all position formats in the ID field. 2020-07-12 18:59:50 -03:00
Salvador E. Tropea 9d10c991da Changed default name for step files (adds -3D) 2020-07-12 18:55:08 -03:00
Salvador E. Tropea 031c69e27c Added `position` output configuration. 2020-07-12 18:46:37 -03:00
Salvador E. Tropea 36eedc9fce Added `drill` output configuration 2020-07-12 17:43:15 -03:00
Salvador E. Tropea b8b1277f5f Drill map file names can be configured. 2020-07-12 17:01:23 -03:00
Salvador E. Tropea b6347d8992 Drill report now uses %i='drill_report' %x='txt' 2020-07-12 16:27:46 -03:00
Salvador E. Tropea bc52d932b0 Changed default file name for pdf_pcb_print
Now %i is the list of layers (suffixes) and %x is PDF.
The default is %f-%i.%x
2020-07-12 16:17:38 -03:00
Salvador E. Tropea f8c339aa3d Simplified the Optionable.expand_filename() usage.
Now the dir concatenation and absolute expansion is done in the
function avoiding repetition.
2020-07-12 16:15:56 -03:00
Salvador E. Tropea acf6bedda8 Defined %i as 'job' for gerber job files. 2020-07-12 15:55:25 -03:00
Salvador E. Tropea 41de8c032c Added `output` option to control the file name to all plot output formats. 2020-07-12 13:00:38 -03:00
Salvador E. Tropea e2854ef524 Added gerber.gerber_job_file option to control the gerber job file name. 2020-07-12 12:28:00 -03:00
Salvador E. Tropea 63999aa009 Preflight filters parsed by Optionable class.
This makes the filters similar to output options.
- Adds coherence to error messages.
- Enable aliases (used the ones suggested by @leoheck)
Additionally now the README.md preflights documentation comes directly
from --help-preflights
2020-07-12 11:52:44 -03:00
Salvador E. Tropea 9fdc02ecea Added aliases for options.
The test case is the pdf_pcb_print.output_name, which is different than
other *.output options. Now output_name is an alias for output.
2020-07-12 09:41:16 -03:00
Salvador E. Tropea 2dab2417e0 Bumped version to 0.5.0 2020-07-11 14:02:09 -03:00
Salvador E. Tropea 52e6bb1b5f Added support for PcbDraw 2020-07-11 13:49:03 -03:00
Salvador E. Tropea c468dd44e1 Removed unused log import 2020-07-09 18:50:29 -03:00
Salvador E. Tropea f72ff3f441 Extra dot in step.metric_units docstring.
Remove dead code in check_eeschema_do()
Fixed the way we read scale stuff from a PCB
Added special checks for check_script and check_version
2020-07-09 12:50:27 -03:00
Salvador E. Tropea 587ef177b3 Added test for corrupted PCB, skip a preflight that isn't in use and output
plugin
2020-07-09 09:54:25 -03:00
Salvador E. Tropea a48e9ecc96 Added tests to cover out_pdf_pcb_print.py, error case left out 2020-07-09 09:20:52 -03:00
Salvador E. Tropea 2ade49bde5 Removed Layer.get_id(), no longer used. 2020-07-08 23:43:08 -03:00
Salvador E. Tropea d4677a2c2e Added tests for:
- Inner layer that doesn't exist
- Technical layers
- Wrong layer group/spec
2020-07-08 23:34:45 -03:00
Salvador E. Tropea 995b6990aa Added HPGL and PS autoscaling tests.
Added test for example in a dir that must be created.
Removed code not used in docstring trim.
2020-07-08 23:16:04 -03:00
Salvador E. Tropea 05460f4541 Added test for wrong boolean 2020-07-08 21:06:35 -03:00
Salvador E. Tropea 1917b4c601 Added more tests for errors 2020-07-08 20:41:16 -03:00
Salvador E. Tropea 307bed3a36 Added more preflight tests 2020-07-08 19:49:33 -03:00
Salvador E. Tropea 38baa62cbe Fixed ERC/DRC error count report. 2020-07-08 19:28:07 -03:00
Salvador E. Tropea 922b853084 Fixed ignore_unconnected.
Also added a test and a test for the error type.
Additionally the BasePreflight now provides default run/apply members.
2020-07-08 16:29:30 -03:00
Salvador E. Tropea 4368364489 Refactored the BaseOutput class to make it more similar to the YAML
Now the options are just an attribute of the outputs.
It means we have a set of classes for the options.
All the output content is parsed by the classes, including the Layers.
Now the layers support a simple string (with interesting shortcuts), a list of
strings or the original list of dicts.
2020-07-08 15:17:24 -03:00
Salvador E. Tropea 1c4c94cfa2 Some super() use clean-up.
Now using Python3 style everywhere.
Added some missing calls to allow more cases of use.
2020-07-05 19:11:52 -03:00
Salvador E. Tropea 45ecb1d02a Added a mechanism to specify suboptions.
Now the legacy drill.map.type and drill.report.filename are specified in this
way.
The BaseOutput class now inherits from Optionable.
Suboptions are just Optionable classes.
Also: added traceback print when an error is reported and we are in debug mode.
2020-07-05 12:40:57 -03:00
Salvador E. Tropea ee11ecf8e7 Added number, variant, conf and separator KiBoM options. 2020-07-02 23:30:57 -03:00
Salvador E. Tropea b48998bb86 Applied abspath to the output path to make is cleaner. 2020-07-02 23:29:53 -03:00
Salvador E. Tropea 4538236574 Now outputs and preflights are loaded as plugins.
They can be added from ~/.config/kiplot/plugins/
Also sorted the preflights in the YAML example and allower -v for
--help-list-outputs, needed to know from where are the plugins loaded.
2020-07-02 12:30:30 -03:00
Salvador E. Tropea 1ca21efe94 Now the docstring for string options can specify a list of allowed values
This reduces the number of setters/getters we need to write.
On the other side the time to validate the YAML is increased.
2020-07-02 09:25:06 -03:00
Salvador E. Tropea ec35d2443f Added option to copy plot options from the PCB to the YAML example.
Also added DXF.metric_units and updated the README.
2020-07-01 20:43:03 -03:00
Salvador E. Tropea 3685e3cb8b Enforced a limit to line_width [0.02,2] mm 2020-07-01 11:21:25 -03:00