Welcome to kicad-helpers
Scripts, templates, and examples for managing KiCad projects
Project goals
- provide a sensible default structure and scripts for managing KiCad projects
- automate everything that can be automated with continuous integrations scripts (e.g., update BOMs, produce manufacturing files, run tests, generate documentation, etc.)
- configure git and KiCad to play nicely together
- support customization via command line arguments, environment variables, etc.
- make everything easy to install/setup/use
- make awesome documentation
Install
> pip install kicad_helpers
Setup a new project
Open a command line shell and navigate to the directory containing your KiCad project. Then run kh_update to apply various project templates to the project directory:
> cd kicad/project/path
> kh_update
By default, this will install the following templates:
- .github/workflows/build.yml: a github workflow for updating the BOM, producing manufacturing files, running tests, generating documentation, etc.
- kitspace.yaml: metadata file for the kitspace service
- .kicad_helpers_config/config.kibot.yaml: configuration file for KiBot which allow automation of various KiCad actions
- .kicad_helpers_config/manufacturers/PCBWay.kibot.yaml: KiBot configuration to generate manufacturing files for PCBWay
To overwrite existing templates, run kh_update with the --overwrite flag:
> kh_update --v --overwrite
Render kitspace.yaml template.
Render settings.ini template.
Render .github/workflows/build.yml template.
Render .kicad_helpers_config/drc.yaml template.
Render .kicad_helpers_config/erc.yaml template.
Render .kicad_helpers_config/pcb_pdf.yaml template.
Render .kicad_helpers_config/pcb_svg.yaml template.
Render .kicad_helpers_config/sch_pdf.yaml template.
Render .kicad_helpers_config/sch_svg.yaml template.
Render .kicad_helpers_config/manufacturers/default.yaml template.
Render .kicad_helpers_config/manufacturers/PCBWay.yaml template.
Render tests/Tests.ipynb template.
"*.pro filter=kicad_project" already exists in /home/ryan/dev/python/kicad-helpers/_temp/.gitattributes
"*.sch filter=kicad_sch" already exists in /home/ryan/dev/python/kicad-helpers/_temp/.gitattributes
Add filters to git config.
"_autosave*" already exists in /home/ryan/dev/python/kicad-helpers/_temp/.gitignore
"*bak" already exists in /home/ryan/dev/python/kicad-helpers/_temp/.gitignore
"*.xml" already exists in /home/ryan/dev/python/kicad-helpers/_temp/.gitignore
".ipynb_checkpoints" already exists in /home/ryan/dev/python/kicad-helpers/_temp/.gitignore
"*-erc.txt" already exists in /home/ryan/dev/python/kicad-helpers/_temp/.gitignore
"*-drc.txt" already exists in /home/ryan/dev/python/kicad-helpers/_temp/.gitignore
"kibot_errors.filter" already exists in /home/ryan/dev/python/kicad-helpers/_temp/.gitignore
To see the options that are available, run the command:
> kh_update --help
usage: kh_update [-h] [--v] [--overwrite] [--root ROOT]
Setup a new project (or update an existing project) with templates from the `kicad_helpers/templates` directory. Also
installs git filters to prevent insignificant changes to the kicad `*.pro` and `*.sch` files from being tracked by git
(see https://jnavila.github.io/plotkicadsch/ for more details).
optional arguments:
-h, --help show this help message and exit
--v verbose (default: False)
--overwrite overwrite existing templates (default: False)
--root ROOT project root directory (default: .)
Export a BOM from the KiCad schematic
> kh_sch_to_bom --v
/home/ryan/miniconda3/envs/kh/bin/python3.9 -m kifield -r --nobackup --overwrite --group -aq -x /home/ryan/dev/python/kicad-helpers/_temp/40-channel-hv-switching-board.sch -i /home/ryan/dev/python/kicad-helpers/_temp/manufacturing/default/40-channel-hv-switching-board-BOM.csv
Import data from the BOM into the KiCad schematic
> kh_sch_to_bom --v
/home/ryan/miniconda3/envs/kh/bin/python3.9 -m kifield -r --nobackup --overwrite --fields ~quantity -x /home/ryan/dev/python/kicad-helpers/_temp/manufacturing/default/40-channel-hv-switching-board-BOM.csv -i /home/ryan/dev/python/kicad-helpers/_temp/40-channel-hv-switching-board.sch
Run all tests in the tests directory
> kh_test
testing /home/ryan/dev/python/kicad-helpers/_temp/tests/Tests.ipynb
All tests are passing!
Contributors
- Ryan Fobel (@ryanfobel)
Metadata
Release files for kicad-helpers 0.14
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kicad_helpers-0.14.tar.gz | 26.6 kB | Without provenance | Details for kicad_helpers-0.14.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kicad_helpers-0.14-py3-none-any.whl | Python 3 | none | any | Details for kicad_helpers-0.14-py3-none-any.whl |
Total release size: 53.8 kB
Release files / kicad_helpers-0.14.tar.gz
| Download URL | kicad_helpers-0.14.tar.gz |
|---|---|
| Size | 26.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
53f50590338e01c2eafbce0ff250cdcf3596eda54c3314c00886080e175e65a8
|
|
BLAKE2b-256 checksum How to use checksums |
4b892d99511cba11238e6ea238daf8c92df94ef56e8aae7a2ad9194bb03e2c1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
|
Release files / kicad_helpers-0.14-py3-none-any.whl
| Download URL | kicad_helpers-0.14-py3-none-any.whl |
|---|---|
| Size | 27.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ab71dadd3e763fc721f60bea5c41ae79af26d66ab9fc1c0517cbfd554582efd2
|
|
BLAKE2b-256 checksum How to use checksums |
563a68db0561d3d952ca62ca458f06e6e3e4ba65e0a25aee04e9a2ca5581053c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
|
Security for kicad-helpers 0.14
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.