librariesio / license-compatibility

:copyright: Check compatibility between different SPDX licenses
https://libraries.io/github/librariesio/license-compatibility
MIT License
34 stars 5 forks source link

Add executable entry in bin #42

Closed pawamoy closed 7 years ago

pawamoy commented 7 years ago

This PR adresses issue https://github.com/librariesio/license-compatibility/issues/41. It adds an executable in bin directory called license-compatibility.

The executable usage is as follow:

Usage: license-compatibility -h | -v | -s LICENSE_LIST | -a PKG_LICENCE_LIST
   -h, --help       Show this help.
   -v, --version    Show the version number (1.4.0).

   -s, --simple LICENSE_LIST
                    Check the compatibility between each possible combination of given licenses.
                    LICENSE_LIST is a list of arguments.
   -a, --advanced PKG_LICENSE_LIST
                    Check the overall licenses compatibility for a project's dependencies.
                    PKG_LICENSE_LIST is a list of arguments formatted like PACKAGE:LICENSE.

Note that the -a option is not implemented yet.

What do you think of this WIP?

andrew commented 7 years ago

@Pawamoy that's looking great, are you planning to implement --advanced in a separate pull request or update this one?

Would also be good to have some basic test coverage of the CLI

👍

pawamoy commented 7 years ago

I will update this PR with advanced option, I just wanted a quick feedback from you before going further. I'm goind to add some tests also :)

pawamoy commented 7 years ago

Usage is now:

Usage: license-compatibility [-h] [-v] [-r file] [args]

Arguments:
    List of licenses or list of package:license couples (separated by ':').
    Example: 'MIT' 'GPL-3.0' or 'my_package:ISC' 'other_pkg:BSD-2-Clause'.
    Mixing the two formats is not allowed.
    Additional args after a --read option are accepted.

Options:
    -l, --list                       Print the list of supported licenses.
    -r, --read FILE                  Read arguments from file.
    -v, --version                    Show the program version (1.4.0).
    -h, --help                       Print this help.
andrew commented 7 years ago

Awesome, is this ready for merging? Would be good to add the usage section to the readme too

pawamoy commented 7 years ago

Cool :) No its not ready, we just need some more tests, and as you said the README section! Also the --list option needs to be better formatted.

pawamoy commented 7 years ago

Kay I think its good now

andrew commented 7 years ago

🎉 I've just published this to rubygems as v2.0.0: https://libraries.io/rubygems/license-compatibility/2.0.0