You are not Logged In!

Difference between revisions of "Public:GitHub/isc-hw-libs"

From Illini Solar Car Wiki
Jump to navigation Jump to search
(image)
(Complete filled out info)
Line 24: Line 24:
 
[[File:KiCad Libraries Label.png|thumb|Red Label = Bad! (Unless you are updating the KiCad Libs)]]
 
[[File:KiCad Libraries Label.png|thumb|Red Label = Bad! (Unless you are updating the KiCad Libs)]]
 
Unless you are updating the KiCad Libraries you should only ever touch the <code>schematic</code>, <code>layout.pretty</code>, and <code>packages3d</code> folders. If you touch the other KiCad libraries folder the auto-labeler will give your Pull Request the '''[https://github.com/IlliniSolarCar/isc-hw-libs/pulls?q=is%3Apr+is%3Aopen+label%3A%22kicad+libraries%22 Red "KiCad Libraries" label]'''. You don't want this! Make sure your parts are in the right place!
 
Unless you are updating the KiCad Libraries you should only ever touch the <code>schematic</code>, <code>layout.pretty</code>, and <code>packages3d</code> folders. If you touch the other KiCad libraries folder the auto-labeler will give your Pull Request the '''[https://github.com/IlliniSolarCar/isc-hw-libs/pulls?q=is%3Apr+is%3Aopen+label%3A%22kicad+libraries%22 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 [https://github.com/actions/labeler Github Provided labeler] action. It just labels the PR and does not fail. It will label repos by what is changed either <code>symbol</code>, <code>3d model</code>, <code>footprint</code>, <code>KiCad Libraries</code>, or <code>git</code> 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]].
 +
 +
{{PCB Design Navbox|collapsed=true}}

Revision as of 22:17, 22 September 2020

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.