You are not Logged In!

Public:GitHub/isc-hw-libs

From Illini Solar Car Wiki
< Public:GitHub
Revision as of 23:27, 10 September 2021 by Adityaj5 (talk | contribs) (Adityaj5 moved page GitHub/isc-hw-libs to Public:GitHub/isc-hw-libs)
Jump to navigation Jump to search
Github Logo.png IlliniSolarCar/isc-hw-libs

Active

ReadMe
Content: ISC KiCad Libraries
Access: Public
License: Creative Commons CC-BY-SA 4.0 License
Branching Strategy: Topic / Project Branches
Maintained By: Electrical Group
Actions & Checks:
  • Master Reviews Required
  • Auto Labelling

Just like the KiCad boards themselves the KiCad libraries for parts are versionable files. Our Libraries are located at Github Logo.png IlliniSolarCar/isc-hw-libs on GitHub. This is not a fork of the KiCad official Libraries, as we structure our repo differently and have custom things that would not be merged back upstream. Additionally, in late 2020 KiCad switched their official Libraries from GitHub to GitLab. Instead, we keep our custom parts and parts in KiCad official libraries and occasionally download the KiCad official ones to update on our repo.

Workflow

The workflow in this repo is relatively simple. Create your part(s) on a branch and open a PR!

Branch Structure

A simple chart of branches in the PCB and Hardware Libraries Repos

Just like PCBs, making a footprint is not really a collaborative project like code. Multiple people can't work on something at the same time - it can't be merged. Therefore this repo is also just for versioning. When you need a new part create a branch and create that part (or multiple parts if you have multiple at the same time) and then open a PR to get it on master. Branches on the hardware libraries are often short lived. There are no longstanding development branches.

Pull Requests

Most PCBs will only have a couple new parts needed and you will typically identify these early on in the process. As soon as the parts are done you should open your Libraries Pull Request! There is no reason to wait until the PCB pull request is opened. In fact, if you do wait and there are problems you may have to redo parts of your schematic or board.

Once your PR is open it will be reviewed by a Libraries reviewer. With one approving review and checks passing you will be allowed to merge to master. Make sure to update your PCB branch to master once you do this!

Folder Structure

This repo is quite simple, aside from git overhead it is divided into just 5 folders:

  • footprint_kicad - our copy of the KiCad Footprint Libraries
  • schematic_kicad - our copy of the KiCad Symbol Libraries
  • layout.pretty - ISC specific Footprint Libraries
  • schematic - ISC specific Symbol Libraries
  • packages3d - 3D models for ISC Specific Parts

Making Changes

Red Label = Bad! (Unless you are updating the KiCad Libs)

Unless you are updating the KiCad Libraries you should only ever touch the schematic, layout.pretty, and packages3d folders. If you touch the other KiCad libraries folder the auto-labeler will give your Pull Request the Red "KiCad Libraries" label. You don't want this! Make sure your parts are in the right place!

Github Checks / Actions

Labeler

This is an action set-up with the Github Provided labeler action. It just labels the PR and does not fail. It will label repos by what is changed either symbol, 3d model, footprint, KiCad Libraries, or git related files. It does this based on what files are edited. The KiCad Libraries should not be edited for the vast majority of PRs, so you don't want this label!

Initial Setup

For the vast majority of cases you will you be working with this repo as a submodule of the GitHub/PCB repo. Follow the setup instructions for that repo to initialize the Libraries submodule repo. Learn more about submodules at GitHub.

Library Files on Github

See more info on the GitHub/PCB page.

TL;DR: KiCad has a lot of files. Many of them do not need to be on GitHub. Listed here are the common ones that must or should not be on git.

Symbol Library Files

File Name / Extensions Type Include on Git Description
LibraryName.dcm KiCad Symbol Library Descriptions REQUIRED This includes all the meta-data about the parts in the library - their data-sheet, name, descriptions, etc.
LibraryName.lib KiCad Symbol Library File REQUIRED This includes the actual symbol drawing and all of it's electrical characteristics including the outline, pins, pin type, etc.
LibraryName.bak KiCad Symbol Library Description Backup NEVER .dcm file back-up

Footprint Library Files

File Name / Extensions Type Include on Git Description
LibraryName.pretty KiCad Footprint Library Folder REQUIRED This is the folder extension for a KiCad Footprint Library. Within this folder is the footprint files that make up the Library. KiCad footprint files are much to large for many parts to be in one file (like Symbol Libraries) while maintaining the ability for a human to work with it
FootprintName.kicad_mod KiCad Footprint File REQUIRED This is a KiCad footprint. It contains all of the information about a specific footprint

3D Model Library Files

File Name / Extensions Type Include on Git Description
PartName.wrl VRML 3D Model REQUIRED This is a visual 3D model used by the 3D viewer to represent parts. We don't make models for all of our parts just major mechanical ones, KiCad provides a lot of the common stuff. This needs to be associated with a footprint (and aligned) before it is added.
PartName.stp

PartName.setp

STEP 3D Model REQUIRED This is a STEP model of a part which is used for integration with Mechanical CAD as it provides a 3D model of the part. KiCad can export 3d model of a PCB that includes all the step models for parts used on the PCB (if they exist). This needs to be associated with a footprint (and aligned) before it is added.