fritzing / fritzing-parts

Electronic components for use in the Fritzing app (aka the parts library)
http://fritzing.org/parts
Other
513 stars 359 forks source link

Add scour to pipeline #397

Open KjellMorgenstern opened 2 months ago

KjellMorgenstern commented 2 months ago

For nearly all recents parts I added or modified, I applied scour (https://github.com/scour-project/scour) to minimize, clean und unify the SVG files.

It would make sense to add this to our pipeline.

KjellMorgenstern commented 2 months ago

Suggestion:

Typically, we can't modify the files during the CI this would require an new commit. We could run scour on each SVG with some sane settings. If the file changes, then the check fails with an error message, with a link to some place that explains how to use scour in fritzing SVG files.

I don't think scour is intended to be used as a check. There could be changes when running on the same file a second time, or between different environments or versions of scour.

mMerlin commented 2 months ago

Perhaps it can be added to 'pre-commit' instead. I think that allows content changes. CircuitPython has that on their libraries, to enforce some linting.

I don't know about additional runs with the same parameters making additional changes. That could be a problem.