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
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
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
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
4ae54f3ded
Added --example/-x option to generate a configuration example.
...
The example contains all the available preflights and outputs.
If the user specifies a PCB the names of the layers are from the provided PCB
2020-06-30 20:09:14 -03:00
Salvador E. Tropea
3c6f4950c7
Now the schematic can be specified separately.
...
We now test if the PCB and/or SCH are there only when we need them.
2020-06-29 19:25:54 -03:00
Salvador E. Tropea
42d1f14056
Now layers are solved when we really need it.
...
So we can do some operations (like --list) without loading the board.
Also: now the names for the layers are asked to pcbnew classes (not from file)
2020-06-29 12:55:02 -03:00
Salvador E. Tropea
2f0f3f755d
Changed the command line parser from argparse to docopt.
...
This make the code cleaner and better documented.
Now the usage is more clear, and also a little bit more strict.
I'm using a modified docopt because I preffer using args.option instead of
args['--option'], I also fixed a few flake8 issues in docopt.py.
2020-06-26 12:04:56 -03:00
Salvador E. Tropea
7679604646
Major code refactor
...
Pro:
- Much easier to add new outputs and pre-flights
- All options are optional
- Much better configuration syntax check
- Access to data is simpler
Cons:
- Much more source code files
- I focused on one application, not multiple instances running on the same
process.
2020-06-19 15:54:55 -03:00
Salvador E. Tropea
b8f8ed53bd
Added a mechanism to avoid problems with ibom
...
This new mechanism should be accepted in the upstream.
So we will be able to use unpatched ibom.
2020-06-17 15:34:43 -03:00
Salvador E. Tropea
3382b4fe7b
Fixed the way options with arguments are passed to kicad2step.
2020-06-15 15:58:08 -03:00
Salvador E. Tropea
ef64a57697
Documented the fact that current kicad2step program never fails.
...
Well, it fails, but returns 0.
2020-06-15 15:17:09 -03:00
Salvador E. Tropea
2766b5afcb
Added STEP file output
2020-06-15 13:21:24 -03:00
Salvador E. Tropea
0d9256fb24
The 'check_zone_fills' option is now independent of 'run_drc'
...
Implemented in a different way.
For all internal commands now we use Python bindings to fill the zones as
suggested by @arikrupnik in johnbeard/kiplot#11
For 'print_pcb' now we ask KiCad to do it before printing (needs v1.4.1)
2020-06-14 15:12:56 -03:00
Salvador E. Tropea
61f1ebbab2
Better debug info, fixed errors and no .kicad_pcb dependency
...
- When a BoM operation fails now we show the output of the child process.
(Only enabled when using debug verbosity)
- The error levels 1 and 2 were overlapped with internal Python codes.
- Now we delay the PCB load until we really need it. Which could be never.
2020-06-12 15:10:56 -03:00
Salvador E. Tropea
c390ec3cb8
Added support for kicad-automation-tools v1.4.0 DRC/ERC filters
2020-06-09 13:49:04 -03:00
Salvador E. Tropea
9e3865d881
Removed another redundant makedirs.
2020-05-26 19:28:14 -03:00
Salvador E. Tropea
46248a6e2e
Removed redundant checks to create the output dir.
...
They became useless after adding it to _configure_output_dir
2020-05-26 19:15:10 -03:00
Salvador E. Tropea
153d967015
Excluded an "internal error check" from coverage and commented why.
2020-05-25 20:01:31 -03:00
Salvador E. Tropea
1dda835cc5
Removed some dead code about configurations.
...
_configure_plot_ctrl is called only for "layer" outputs, there is no
point trying to configure other formats.
Also some of the "configuration" were ridiculous calls with an assert
that only tested Python's sanity. Probably optimized out by python
compiler.
2020-05-25 19:23:11 -03:00
Salvador E. Tropea
c22ccb607a
Fixed: All pcbnew plot formats generated gerber job files
2020-05-25 18:31:31 -03:00
Salvador E. Tropea
da94eb3f57
Excluded from coverage the test for pcbnew import
2020-05-20 09:24:59 -03:00
Salvador E. Tropea
26b4f5c385
Adapted to kicad-automation-scripts 1.3.x
2020-05-19 12:09:19 -03:00
Salvador E. Tropea
bcfaead5f1
Fixed: for print_sch, when the PCB name included a path, it wasn't removed and the
...
output pointed to a mix of both paths, failing.
2020-05-19 11:37:51 -03:00
Salvador E. Tropea
da09a617c4
Problems for kibom output when the PCB name included a path
2020-05-15 10:38:26 -03:00
Salvador E. Tropea
a58d99325a
Added assert for the pcbnew initialization. Also made some debug messages more clear.
...
I'm getting errors when the test is done using --plot_dir
2020-05-14 09:41:18 -03:00
Salvador E. Tropea
ba22eae5b8
Tunned flake8 and removed all unfiltered warnings and errors
2020-04-28 17:56:50 -03:00
Salvador E. Tropea
90004f923a
Removed KiBoM temporal files
2020-04-20 17:46:22 -03:00
Salvador E. Tropea
92980bb8fa
Fixed pre-flight tasks that didn't honor --out-dir
2020-04-20 17:45:18 -03:00
Salvador E. Tropea
540a0b080d
Fixed problem when the excellon drill target directory didn't exist (now created)
2020-04-18 15:56:53 -03:00
Salvador E. Tropea
82e4cba655
Added inner layers check for the pdf_pcb_print type
2020-03-23 01:06:04 -03:00
Salvador E. Tropea
e7d5accaa6
Put PlotError for the case of an incorrect inner layer.
2020-03-23 01:01:35 -03:00
Salvador E. Tropea
9747d6457c
Removed the PlotError exception in favor of simple error messages
2020-03-22 21:07:01 -03:00
Salvador E. Tropea
9267597330
Made flake8 compliant
2020-03-22 20:16:57 -03:00
Salvador E. Tropea
3aaf1ce045
Added support to print the PCB in PDF format (using print, not plot)
2020-03-21 14:34:02 -03:00
Salvador E. Tropea
d0d9c37064
Added schematic printing to PDF.
...
Partially added PCB printing to PDF.
2020-03-19 19:59:19 -03:00
Salvador E. Tropea
46e2a12385
Simplified the scripts installation check.
...
Moved names and URLs to constants defined in misc module.
2020-03-19 16:58:41 -03:00
Salvador E. Tropea
6d6a11a02b
Fixed debug message 'Skipping update_xml'
2020-03-19 16:30:03 -03:00
Salvador E. Tropea
438142dabd
Added KiBoM and InteractiveHtmlBoM support
2020-03-19 16:26:45 -03:00
Salvador E. Tropea
85acaadf26
Added generation of the BoM in XML format
2020-03-19 09:57:11 -03:00
Salvador E. Tropea
ef3ef2bbe6
Added check for pcbnew_run_drc 1.1.0 or newer
2020-03-18 23:19:40 -03:00
Salvador E. Tropea
5a386bdd32
Added ERC check
2020-03-18 23:15:17 -03:00
Salvador E. Tropea
7d02012dbc
Made --skip-pre to take a list of actions.
2020-03-18 19:49:22 -03:00
Salvador E. Tropea
e4b94eec08
Added option to skip the pre-flight actions
2020-03-18 19:14:41 -03:00
Salvador E. Tropea
ea18fb7be0
Merge branch 'run_drc'
2020-03-17 20:42:38 -03:00
Salvador E. Tropea
e269d04ceb
Implemented check_zone_fills, it saves the updated zones after DRC.
2020-03-17 20:39:41 -03:00
Salvador E. Tropea
d78d6d8a9d
Changed sys.exit to exit
2020-03-16 11:02:47 -03:00
Salvador E. Tropea
2af2c0c88d
Added DRC support using kicad-automation-scripts
2020-03-16 10:59:36 -03:00
Salvador E. Tropea
070989c7b0
Changed the exceptions for check_zone_fills and run_drc to simple errors.
2020-03-16 10:24:11 -03:00