Commit Graph

227 Commits

Author SHA1 Message Date
Salvador E. Tropea adb9e26750 Added examples of problems using Coverage.py with macros. 2020-06-27 20:38:16 -03:00
Salvador E. Tropea 7cd0afcdb9 Excluded from coverage code in macros.py that we aren't using.
This code covers cases that we aren't using.
2020-06-27 19:18:32 -03:00
Salvador E. Tropea a436aea8e7 Now the README.md is sychronized using the help output.
The --help-outputs and --help are embedded in the README.md
To make it easier to read now options are enclosed in `` and the list of
outputs is sorted.
2020-06-27 18:28:05 -03:00
Salvador E. Tropea c82c2f0c39 Added support for all the missing IBoM options.
Note that variants_blacklist and variants_whitelist needs a fresh IBoM.
These options didn't work and crashed IBoM. It was reported as a result of
the tests included in this commit.
2020-06-27 15:04:35 -03:00
Salvador E. Tropea d48f258c33 Added tests for the various help options. 2020-06-26 14:48:40 -03:00
Salvador E. Tropea c049d8f9ef Excluded docopt.py from coverage. 2020-06-26 14:48:05 -03:00
Salvador E. Tropea f70e484780 Excluded from coverage the last line of the with document block
This isn't recorded as executed and I don't know how to inform to coverage
that this is executed. SO I'm just excluding them.
2020-06-26 14:46:09 -03:00
Salvador E. Tropea 7726732df9 Created a decorator to register the preflight options 2020-06-26 14:45:33 -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 43b7e27a22 Documented the output_class macro 2020-06-26 12:02:18 -03:00
Salvador E. Tropea 5ce3da2bcc Added a macro decorator to register output classes. 2020-06-25 11:32:13 -03:00
Salvador E. Tropea 46a20404a4 Added preflights help. 2020-06-25 10:31:23 -03:00
Salvador E. Tropea 523aaa2ace Added the map/report stuff to the changelog. 2020-06-25 09:43:14 -03:00
Salvador E. Tropea acd5592a45 Now the map.type and report.filename are deprecated in favor of map and report.
The old mechanism is supported, but removed from examples.
Added a test case for the new mechanism.
Documented the reason for the complex properties.
Added docstrings to these particular cases (with None as default).
2020-06-25 09:37:43 -03:00
Salvador E. Tropea fa1ea5bdc9 Outputs help and options review
- Included properties
- The final dot is placed by the printing code (removed from messages)
- docstrings line lengths limited
- Better HPGL help
- Fixed ibom default output (.html.html)
- pdf_pcb_print to use PCB name when not output name
- Default PS scaling factor to 1 (not 2)
2020-06-25 09:05:46 -03:00
Salvador E. Tropea fb5c32f0ad Added negative numbers support to the document macro. 2020-06-25 08:09:39 -03:00
Salvador E. Tropea 6295b00657 Implemented the `sketch_plot` option. 2020-06-24 12:00:53 -03:00
Salvador E. Tropea 505039332b Made sketch_plot default to false when absent. 2020-06-24 11:59:13 -03:00
Salvador E. Tropea a63e12579b Changed all the examples to set "sketch_plot" to false.
This is what we usually want, but this wasn't implemented.
2020-06-24 11:56:39 -03:00
Salvador E. Tropea 090aa6b8f1 Removed the "plot" option "check_zone_fills".
Not used and overlapped with the preflight option.
2020-06-24 11:26:08 -03:00
Salvador E. Tropea ac4ae89aba Added command line help for the outputs.
--help-list-outputs list supported outputs
--help-outputs list details for the supported outputs
--help-output OUTPUT shows the help for this particular output
2020-06-24 11:02:17 -03:00
Salvador E. Tropea 89fb93d6d7 Documented the output formats in the source code. 2020-06-24 11:01:43 -03:00
Salvador E. Tropea cb809cbb8d Added documentation for the technique used for the automagic doc 2020-06-23 11:17:53 -03:00
Salvador E. Tropea a066887744 Modified the macros examples to make them as similar as possible.
So a diff between them is minimal.
2020-06-23 11:16:58 -03:00
Salvador E. Tropea bcb35e90ef Renamed test_mymacros.py to try_mymacros.py for pytest
They aren't regression tests.
2020-06-23 10:36:10 -03:00
Salvador E. Tropea 458d4ba0a9 Removed flake8 issues 2020-06-23 10:27:11 -03:00
Salvador E. Tropea d68376ba2e Added a small test to gerbers output.
Currently commented.
2020-06-23 10:26:29 -03:00
Salvador E. Tropea 6859f89c9c Copied the experiments implementation to the macros file
Is more robust
2020-06-23 10:25:29 -03:00
Salvador E. Tropea 2bb2bd2034 Added preliminary tests to add "automagic" documenation for the output options 2020-06-22 19:47:37 -03:00
Salvador E. Tropea 20d79d58ad Restricted the YAML support to safe features.
I think it doesn't change anything important, but looks sensitive.
2020-06-21 11:58:35 -03:00
Salvador E. Tropea 734d2b9c35 Added an evaluation of "Strict YAML" to replace "PyYAML".
Conclusion: not worth the effort
2020-06-21 11:57:03 -03:00
Salvador E. Tropea 19023ef4e6 Added tests to cover 100% of kiplot/config_reader.py
Mostly parser errors.
2020-06-19 23:38:09 -03:00
Salvador E. Tropea 6ed99d8515 Tests adapted to the new error message strings. 2020-06-19 16:00:16 -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 e34952a2a2 Fixed HPGL YAML example
Used an option that doesn't really apply to HPGL.
2020-06-19 15:51:08 -03:00
Salvador E. Tropea 9dccf7113f Generic config example update and cleanup 2020-06-19 15:48:16 -03:00
Salvador E. Tropea c2c221151b Bumped version to 0.4.0. 2020-06-17 15:38:49 -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 7136662cb3
Merge pull request #2 from INTI-CMNB/step_output
3D STEP output added
2020-06-15 16:36:39 -03:00
Salvador E. Tropea 7df1e9fe87 Added documentatio for the new output 2020-06-15 16:18:40 -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 48fcb39f8d Added more variety to STEP options.
To cover more core during the tests.
2020-06-15 15:18:23 -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 c2a735e9a6 For some reason Python sys.path vector has a limit and I was abusing it.
Each test module setups the path to find the needed modules, but didn't check
if it was necesary. Creating a long path that finally started to fail.
2020-06-15 15:14:53 -03:00
Salvador E. Tropea fc19d2c6c0 Added tests for errors parsing STEP files generation. 2020-06-15 13:40:30 -03:00
Salvador E. Tropea 685fef2ef6 Added test for STEP files generation 2020-06-15 13:39:59 -03:00
Salvador E. Tropea 8374238b6d Added STEP configuration examples. 2020-06-15 13:23:41 -03:00
Salvador E. Tropea ceb25aa1e1 Added an auxiliar axis to bom.kicad_pcb example
To test the 3D STEP file generation.
2020-06-15 13:21:58 -03:00
Salvador E. Tropea 2766b5afcb Added STEP file output 2020-06-15 13:21:24 -03:00
Salvador E. Tropea 8fbcffba0f Bumped version to 0.3.0 2020-06-14 15:28:25 -03:00