← Back to team overview

kicad-developers team mailing list archive

GitHub Plugin (my nemesis)

 

Hi all,

Ok, now that the website integration with the libraries is (pretty much)
done, and the licensing issue seems to be sorted, there is one final puzzle
piece to solve before I'm happy with the state of the libraries for a v5
release.

*Goal: *Merge all footprint library repositories into a single repo to
solve the ongoing dramas of maintaining 100+ repos.

*Problem*: The *only* thing standing in the way of just doing this is that
some users like the GitHub plugin and previous instruction is that this
functionality cannot be removed.

The GitHub plugin functions by downloading a .zip file of a .pretty repo.
If we merge all footprint libs into a single repo with multiple
subdirectories, this will not work anymore (as GitHub dosen't allow you to
download a .zip of a single subdirectory).

Merging the repos is the *right thing to do*. But how to proceed?

*Options:*

*a) Drop github plugin feature, replace with library-download tool*

I don't think it is a good idea to live-load library data from GitHub (a
lot of other users agree too). It's slow, and a waste of bandwidth to
re-download the libs all the time.

We drop support for loading libraries direct from GitHub. However, we add a
tool for downloading libraries from GitHub and storing to disk. Users can
update as they like. This can be integrated in KiCad and new users can run
this tool when they first install KICad. This means that no libs need to
distributed with the installer and users can update to latest libs whenever
they want.

*b) Improve github plugin to allow subdirectory traversal*

This is difficult and will only result in the plugin being slower. There
are two ways I can see to do this:

i. Use Git API - tools exist that use this functionality -
https://github.com/KinoLien/gitzip
ii. Use subversion - GitHub actually provides subversion API -
https://www.seanw.org/blog/download-git-repo-subdirectory/


*Subversion*

In either case, I think that using the subversion tool to partially
download the libraries would be a good approach (I assume quicker than
using wget and the GitHub API).

1. Does anyone have any experience using the C API for SVN?
2. The Python bindings are pretty good - https://pypi.python.org/pypi/svn -
and much easier to use. However, can we make the library download tools
dependent on enabling the python plugin?
3. Is there a way to checkout a subversion remote to memory (to replicate
the functionality of the current GitHub plugin)? If not, I'm not sure how
to approach option b) above.


Feedback appreciated. I think that it is very important especially for new
users that this is improved. The GitHub plugin is constantly causing
headaches!

Cheers,
Oliver

Follow ups