Commit Graph

151 Commits

Author SHA1 Message Date
Salvador E. Tropea f80480b31e [Dependencies] Added XLSXWriter auto-download 2022-07-01 11:27:44 -03:00
Salvador E. Tropea 8df074df76 Removed the use of distutils.StrictVersion 2022-06-30 13:57:20 -03:00
Salvador E. Tropea e00b6b3f23 Removed unused functions
- check_script
- check_eeschema_do
- Now all the code uses dep_download stuff
2022-06-30 13:11:02 -03:00
Salvador E. Tropea 59d6d2caac [Dependencies] Added auto-download for iBoM 2022-06-30 10:03:26 -03:00
Salvador E. Tropea 25a204da3f Import plugins sorted
- More reproducible
- Should help to avoid random changes in kibot-check
2022-06-11 09:29:18 -03:00
Salvador E. Tropea d9f866cbe3 Fixed problems with PyYaml 3.13 2022-06-08 14:04:34 -03:00
Salvador E. Tropea 043ee382d3 Implemented output priorities
- By default `qr_lib` is high priority and `navigate_results`/
  `compress` are low priority.
- Priorities can be configured.
- A command line option disables it.
2022-06-07 13:57:32 -03:00
Salvador E. Tropea 684b996ced Added `navigate_results` output
- It generates web pages to navigate all generated outputs by category
2022-05-27 13:38:32 -03:00
Salvador E. Tropea 79a8b53f4e More fixes to 9b6b336 patch
- Last commit was bogus
2022-05-26 11:40:42 -03:00
Salvador E. Tropea 9d9ce72d8d More fixes to 9b6b336 patch
- Missing test in out_ibom.py
2022-05-26 11:16:22 -03:00
Salvador E. Tropea b44fe7e3bb Fixed problem intriduced by 9b6b336847
- The python3 stuff was applied too widely
2022-05-26 10:28:54 -03:00
Salvador E. Tropea 0a3dff85f2 Added support for iBoM installed as plugin
- Not yet functional, we are working on iBoM layout
See: openscopeproject/InteractiveHtmlBom#301
2022-05-26 09:34:44 -03:00
Salvador E. Tropea fb082fcbb3 Added `kibot-check` tool to check the installation 2022-05-20 13:26:41 -03:00
Salvador E. Tropea 287f8626ba Already configured outputs not created (i.e. when creating reports) 2022-05-20 07:24:41 -03:00
Salvador E. Tropea 5f22d5a3a9 Now --quick-start is more robuts
- sys.exit() is skipped
- Passed dont_stop to the run stage (was only in config)
2022-05-06 13:03:38 -03:00
Salvador E. Tropea 5504ee228d Added --type option to --quick-start to select outputs
- Useful to debug a particular output
2022-04-29 09:02:52 -03:00
Salvador E. Tropea 74d77f037c Added 'qr_lib' to --quick_start 2022-04-29 09:00:47 -03:00
Salvador E. Tropea 5b637d265e Finished the core functionality of --quick-start
- New --quick-start options:
  - --start starting point for the search
  - -d output directory for the targets
  - --dry only configs, no targets
- Added some warning filters
- Sorted scan and generation
2022-04-28 14:50:58 -03:00
Salvador E. Tropea 494c9126f7 Fixed used layers detection in --quick-start
- We must reset some Layer members before doing a new detect
2022-04-28 14:26:02 -03:00
Salvador E. Tropea 11dd1b16bf Now --quick-start is recursive
- Fixed some obvious details about cross pcb/sch generation
- Improved .kicad_sch guess when more than one and no project
2022-04-26 16:23:20 -03:00
Salvador E. Tropea bee8dab0ca Added yaml module not installed message in kiplot.py 2022-04-26 12:16:47 -03:00
Salvador E. Tropea 56030c5dc9 Added the first stepof the new `--quick-start` option
- Should be a way to quickly start using KiBot without any config
2022-04-26 09:51:14 -03:00
Salvador E. Tropea 96201e7f03 Avoid retrying when KiAuto reports a KiCad crash
- It will be implemented in KiAuto 1.6.11
2022-04-20 10:38:19 -03:00
Salvador E. Tropea 5940e7bcd6 Fixed missing BoardViewOptions.get_targets
Fixes #167
2022-03-24 14:05:48 -03:00
Salvador E. Tropea b5d5bea324 Made more clear which preflight options modifies files
- Also unified to "preflight" (more common than pre-flight)
Related to #165
2022-03-24 13:08:51 -03:00
Salvador E. Tropea 0c0c6ffd62 New output to join PDFs.
Closes #156
2022-03-03 16:13:00 -03:00
Salvador E. Tropea 6281a40335 Fixed spelling 2022-02-16 19:56:04 -03:00
Salvador E. Tropea b2ab00f6cb Added global *units* option
Solves the KiCad 6 dimensions issue. See #146
2022-02-14 15:42:54 -03:00
Salvador E. Tropea 5d2d0a4195 Added MacroFab XYRS support
- Internal BoM options:
  - `angle_positive`
  - `csv.hide_header`
  - `footprint_populate_values`
  - `footprint_type_values`
  - `units` mils
- Columns:
  - `Footprint Type`
  - `Footprint Populate`
  - `Footprint X-Size`
  - `Footprint Y-Size`
2022-02-14 13:49:56 -03:00
Salvador E. Tropea d7430499d2 Removed coverage exclusions for KiCad 6 code 2022-02-11 12:58:39 -03:00
Salvador E. Tropea 644f6d1fda Internal BoM: Added footprint X, Y, rotation and side columns
- First step towards XYRS support
2022-02-11 11:01:14 -03:00
Salvador E. Tropea 24ba23d203 Separated YAML tests that makes reference to SCH files
- Avoiding KiCad 5 and 6 mixes
2022-01-10 20:48:11 -03:00
Salvador E. Tropea 7992fd9888 Added preflight option to update the QR codes.
- Needed for s-expression files
- Not working for KiCad 6 (bug in the Python API)
2022-01-04 10:21:59 -03:00
Salvador E. Tropea 64bfc4824d Added `--cli-order` option to generate outputs in arbitrary order.
- Also updated some output details in the README
Related to #106
2021-12-31 10:40:17 -03:00
Salvador E. Tropea 9417b61478 Moved all loggers to the same domain.
- To fix the warnings count
2021-12-30 11:09:36 -03:00
Salvador E. Tropea 167bdcd4e9 Fixed problems when generating a Makefile and no PCB or SCH is defined 2021-12-29 15:18:47 -03:00
Diego Capusotto 6e5176b273 Simplified the code that detects KiCad v6 2021-12-17 13:11:42 -03:00
Diego Capusotto 69c874fdbd KiCad v6: Added support for the new "modules" name ("footprints")
- No alias provided, as usual
2021-12-17 12:46:40 -03:00
Diego Capusotto 25d036f8fa Added some preliminary support for v6 SCHs
- Currently just loads the files
- No save implemented
- Seems to be enough to generate some trivial BoMs
2021-12-16 17:08:33 -03:00
Salvador E. Tropea 70fb334856 A mechanism to avoid running some outputs by default.
Related to #112
2021-12-02 18:47:40 -03:00
Salvador E. Tropea 95135c8c56 New expansion patterns and out_dir from global section.
- Also added expansion in out_dir
- Related to #116
2021-11-30 19:12:14 -03:00
Salvador E. Tropea ad173a3c07 Added command line debug for exec_with_retry()
- When debug level > 2 prints a line we can copy & paste
2021-11-25 11:27:58 -03:00
Salvador E. Tropea 79651eaa07 Fixed: Makefile: %VALUE not expanded in the directory targets. 2021-11-15 13:58:31 -03:00
Salvador E. Tropea 7c23381adb Added distributors selection to KiCost+KiBot 2021-04-28 12:13:12 -03:00
Salvador E. Tropea 1b48e614a7 Added pattern expansion in the `dir` option for outputs
Closes #58
2021-03-12 21:14:39 -03:00
Salvador E. Tropea a5b3b0569f Fix `out_pcb` and `out_sch` targets
Introduced by c104d14511
2021-03-12 15:02:36 -03:00
Salvador E. Tropea 4f73de1157 Makefile variables KIBOT, DEBUG and LOGFILE can be defined from outside. 2021-03-03 13:08:52 -03:00
Salvador E. Tropea f9ac0d001f Fixed extra dirs created during makefile generation. 2021-02-24 14:24:22 -03:00
Salvador E. Tropea c104d14511 Uncatched exceptions during makefile generation 2021-02-24 14:08:38 -03:00
Salvador E. Tropea 5560c62d14 Errors and warnings from KiAuto now are printed as is. 2021-02-24 12:58:47 -03:00
Salvador E. Tropea c82485acc8 Added remove of forced video in GitLab CI
Note that this video recording is needed in the tests, but I don't know
why.
2021-02-22 12:55:02 -03:00
Salvador E. Tropea 9e33b7a774 Trying to force KiAuto record on GitLab CI/CD 2021-02-22 12:25:14 -03:00
Salvador E. Tropea 3499087e86 Test disabling the KiAuto record.
This is just a test trying to solve GitLab issues.
2021-02-22 11:13:59 -03:00
Salvador E. Tropea 57c517d02b Passed the same verbosity level to KiAuto scripts. 2021-02-18 12:47:21 -03:00
Salvador E. Tropea 32310ba1fa Added test for makefile generation running the script from system. 2021-02-12 14:56:51 -03:00
Salvador E. Tropea b718bc671e Removing extra debug 2021-02-12 13:31:31 -03:00
Salvador E. Tropea d5a1df9eb7 Modified test suite to collect the error in test_search_as_plugin_ok 2021-02-12 13:10:22 -03:00
Salvador E. Tropea 3f565b616a Makefiles generated with debug enabled contains debug stuff.
- pass the verbosity to kibot
- logs to the console
- shows the command executed
2021-02-11 11:56:55 -03:00
Salvador E. Tropea d104c06cef Reduced the complexity of generate_makefile 2021-02-11 08:45:33 -03:00
Salvador E. Tropea b5648b1231 Added the KiBot config as depenency for all makefile targets.
Any change in the configuration forces a refresh of all targets.
2021-02-10 20:30:41 -03:00
Salvador E. Tropea 20a64aa2bb Added more PCB/SCH makefile targets. 2021-02-10 20:15:41 -03:00
Salvador E. Tropea a2d5ad294c Added makefile targets for PCB/SCH related stuff (pre and all). 2021-02-10 20:08:20 -03:00
Salvador E. Tropea 99dfbbd99d Use the full path for kibot in the makefile if not installed.
When we detect the run isn't from the system installation.
2021-02-10 19:47:15 -03:00
Salvador E. Tropea f698e44642 Now we can load InteractiveHtmlBom even when installed only as plugin
Fixes #49
2021-02-08 15:37:01 -03:00
Salvador E. Tropea ce0f22edce Adjusted some details about the time-out control
- Warning when detected pointing to use the global options
- Now pcbnmew_do/eeschema_do output is captured
- Warning when using floating value for kiauto_wait_start (no fail)
- A simple test for time-out
Fixes #48
2021-02-08 12:07:54 -03:00
Salvador E. Tropea 34e85d646c Added KiAuto time-out control (EXPERIMENTAL!!)
Related to #48
2021-02-06 20:48:34 -03:00
Salvador E. Tropea 76db8a65e4 Removed KiCad 6 code from coverage. 2021-02-01 14:52:52 -03:00
Salvador E. Tropea 003fa15715 Support for mcpyrate macros deactivation. 2021-02-01 14:51:42 -03:00
Salvador E. Tropea d796abde2e Separated some complex tests from the test_misc.
- Moved them test_misc_2
- Refined the tests in test_misc_2 to work together
2021-01-29 13:28:29 -03:00
Salvador E. Tropea 2764e087e8 Fixed makefile generation of incomplete targets. 2021-01-29 11:23:09 -03:00
Salvador E. Tropea d20d7e5d5c Fixed STEP dependencies generation. 2021-01-29 10:36:33 -03:00
Salvador E. Tropea 84470bbc11 Added first makefile generation test 2021-01-28 12:43:01 -03:00
Salvador E. Tropea 73cb98f113 Makefile generation. 2021-01-22 17:22:18 -03:00
Salvador E. Tropea 15474ae4d7 Now you can consolidate more than one project in one BoM.
The basic idea comes from pimpmykicadbom by Anton Savov (@antto)
2021-01-21 14:43:47 -03:00
Salvador E. Tropea 88cd5927dc Now you can ask to compress the targets of an output (by out put name) 2021-01-18 16:12:30 -03:00
Salvador E. Tropea b347a6ca30 The board object is no longer passed to run methodes.
The global GS.board is used instead.
2021-01-15 14:14:17 -03:00
Salvador E. Tropea 159e8996e8 Added support for ZIP/TAR/RAR generation. 2021-01-15 13:33:33 -03:00
Salvador E. Tropea e0ab45e95d Now the default output name applies to the DRC and ERC report names.
This provides more coherent file names.
2021-01-12 13:44:09 -03:00
Salvador E. Tropea ab9071b693 Moved pcbnew detection from kiplot.py to __main__.py.
Now the KiCad version is printed when debug is enabled.
2021-01-06 12:25:54 -03:00
Salvador E. Tropea 5d6bdeb9e2 Fixed rot_footprint filter reset. 2020-12-29 12:33:50 -03:00
Salvador E. Tropea 4a3e7faace Added a new filter used to rotate footprints.
Used to generate position files for some manufacturers like JLC.
Also in this patch:
- Now position files are naturally sorted (R10 after R9, not after R1)
- Position files in CSV format quotes only the columns that could
  contain an space. Just like KiCad does.
- Fixed: Generic filter `include_only` option worked only when debug
  enabled.
2020-12-28 18:26:27 -03:00
Salvador E. Tropea bb3087c996 Added a hint for pip installations without using `--no-compile`.
Closes #31
2020-12-16 12:40:56 -03:00
Salvador E. Tropea 1a77b2d007 Added support for build versions of KiCad compiled locally. 2020-10-22 13:01:53 -03:00
Salvador E. Tropea 263b9c41e4 Fixed log.init() errors when pcbnew/yaml modules aren't installed.
Also added tests for these cases.
2020-10-20 11:41:01 -03:00
Salvador E. Tropea 307e553534 Added more info to the plug-ins load fail.
Trying to see why it fails (not in my docker image?!)
2020-10-17 12:03:33 -03:00
Salvador E. Tropea 7c7549e6d7 Changed mcpy by mcpyrate to test its functionality. 2020-10-16 15:32:00 -03:00
Salvador E. Tropea 235e4831a8 Avoid loading KiCad 6 schematics.
Waiting for the Python bindings.
2020-10-15 18:53:44 -03:00
Salvador E. Tropea 86ead74c27 Added KiBot warning filters.
- Closes #15
- This patch also changes the logging initialization, that was broken at
  some recent point.
- Also adds tests to ensure the mechanism used to avoid repeated
  warnings is working.
2020-10-12 16:31:47 -03:00
Salvador E. Tropea c8e81a4668 Added numbers to all the warnings 2020-10-09 18:33:51 -03:00
Salvador E. Tropea c59c31fb6e Added support for KiCad v6 to the position output. 2020-09-21 19:17:31 -03:00
Salvador E. Tropea ed7eae0338 Added support to load pcbnew from nightly. 2020-09-21 19:14:31 -03:00
Salvador E. Tropea d681528a03 Fixed: SCH load and PCB components consolidation reuse.
The code did the tasks over and over.
2020-09-02 18:08:04 -03:00
Salvador E. Tropea 9558f7cf45 Added test for rogue component in PCB. 2020-09-02 15:16:23 -03:00
Salvador E. Tropea 42562185ea Added filter options using PCB attributes.
KiCad 6 will break this, we'll see how to adapt.
2020-09-02 14:48:26 -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 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 90c0e14b73 Added support for PcbDraw v0.6.0. 2020-08-25 13:47:36 -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 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