qurator-spk / dinglehopper

An OCR evaluation tool
Apache License 2.0
59 stars 13 forks source link

Check licenses of used libraries #54

Closed mikegerber closed 1 month ago

mikegerber commented 3 years ago

dinglehopper is Apache-licensed. All libraries used as libraries need to have a compatible license, e.g. BSD, MIT, Apache or public domain. GPL-licensed programs used seem to be fine. See also #48 for a relevant discussion.

Checklist from requirements*.txt:

mikegerber commented 3 years ago

click: BSD License (BSD-3-Clause)

mikegerber commented 3 years ago

jinja2: BSD License (BSD-3-Clause)

mikegerber commented 3 years ago

lxml: BSD License (BSD)

mikegerber commented 3 years ago

uniseg: MIT License (MIT)

mikegerber commented 3 years ago

numpy: BSD License (BSD)

mikegerber commented 3 years ago

colorama: BSD License (BSD)

mikegerber commented 3 years ago

MarkupSafe: BSD License (BSD-3-Clause)

mikegerber commented 3 years ago

ocrd: Apache License 2.0

mikegerber commented 3 years ago

attrs: MIT License (MIT)

mikegerber commented 3 years ago

multimethod: Apache Software License

mikegerber commented 3 years ago

tqdm: MIT License, Mozilla Public License 2.0

mikegerber commented 3 years ago

pytest: MIT License (MIT)

mikegerber commented 3 years ago

pytest-flake8: BSD License (BSD License)

(We are also not linking to it.)

mikegerber commented 3 years ago

pytest-cov: BSD License (MIT)

(We are also not linking to it.)

mikegerber commented 3 years ago

pytest-mypy: MIT License (MIT)

(We are also not linking to it)

mikegerber commented 3 years ago

black: MIT License (MIT)

(We are also not linking to it)

mikegerber commented 3 years ago

All libraries used use - to the best of my knowledge - compatible licenses. 👍

mikegerber commented 3 years ago

@b2m expressed interest in creating a CI job to regularly check for licensing problems (#48), so I am reopening.

My notes:

(Keeping it short as I am on my free day actually 😜 )

b2m commented 3 years ago

(Keeping it short as I am on my free day actually 😜 )

Free day? Same as yesterday and the day before yesterday... 😉

I have three proposals, let me know which one(s) you'd like to try:

licensed

LicenseFinder

pip-licenses

My thoughts:

mikegerber commented 3 years ago

I have three proposals, let me know which one(s) you'd like to try:

While having support for JavaScript is certainly interesting, the tools seem to require Bower/Yarn/or npm(?) for that, and switching to that is maybe a bit overkill for the three JS dependencies :) (Might do it anyway because of #2 someday.)

pip-licenses seems to be a simple solution for Python dependencies, so maybe try that first :+1: If it can do the license checking offline from a previously set up venv, that would be the best case.

pip-licenses

  • Supports only whitelisting

I thought --fail-on supports blacklisting, but I'd prefer whitelisting anyway.

My thoughts:

  • If it is ok to only check Python dependencies I would give pip-licenses a try as the setup is quite simple.
  • If you want to check the licenses of other technologies as well (like the JavaScript dependencies in dinglehopper =) I would try licensed, as the integration in GitHub already is provided.

👍 Note that we're currently using CircleCI and while I'm not super passionate about it I am super passionate about not switiching CI systems every few months ;-)

mikegerber commented 3 years ago

pip-licenses seems to be a simple solution for Python dependencies, so maybe try that first +1 If it can do the license checking offline from a previously set up venv, that would be the best case.

It seems to work offline!

mikegerber commented 3 years ago

pip-licenses seems to be a simple solution for Python dependencies, so maybe try that first +1 If it can do the license checking offline from a previously set up venv, that would be the best case. It seems to work offline!

In other words: From my point of view, this makes it suitable for the normal test suite

b2m commented 3 years ago

While having support for JavaScript is certainly interesting, the tools seem to require Bower/Yarn/or npm(?) for that, and switching > to that is maybe a bit overkill for the three JS dependencies :) (Might do it anyway because of #2 someday.)

Yes (packacking tool), Yes (overkill) and Yes (switching someday) =)

I thought --fail-on supports blacklisting, but I'd prefer whitelisting anyway.

No idea why I had this in my notes... striked it out in my original comment.

👍 Note that we're currently using CircleCI and while I'm not super passionate about it I am super passionate about not switiching CI systems every few months ;-)

Why switching? Just use all in parallel 😆


Regarding the integration of pip-licenses:

  1. The "cleanest" way would be to introduce version pinning (maybe with the help of pip-tools) and only run license-checks when requirements.txt changes.
  2. The "fastest" way (regarding integration) would be to run a license-check as extra step after each test run on each python-version.
  3. A compromise would be to have a license-check workflow restricted e.g. to the master branch.
mikegerber commented 1 month ago

I've added a pre-commit hook for this in 3233dbc.