Skip to main content

Checks ROS packages for correct license declaration.

Project description

ros_license_toolkit

Pytest Lint GitHub issues GitHub prs python License

Warning For any legal questions, please consult a lawyer. This tool is not a substitute for legal advice.

Motivation

ROS packages must have licenses. This tool checks if the license declarations in the package.xml matches the license(s) of the code. We do this by using scancode-toolkit to scan the code and compare the results to the declaration in the package.xml

Functionality

graph TD
    classDef stroke stroke:#333,stroke-width:2px;
    s([scan code for licenses and copyrights]) 
    class s stroke
    p[compare to\n package.xml\nfor linting]
    class p stroke
    c[create\ncopyright file\nfor release]
    class c stroke
    s --> p
    s --> c

Features

This checks:

Usage

Installation

Install the package from source:

pip install .

Basic Usage

You should then have the executable in your $PATH and can run it on any ROS package or a directory containing multiple ROS packages:

ros_license_toolkit my_ros_package

All Options

$ ros_license_toolkit -h
usage: ros_license_toolkit [-h] [-c] [-v] [-q] path

Checks ROS packages for correct license declaration.

positional arguments:
  path                  path to ROS2 package or repo containing packages

optional arguments:
  -h, --help            show this help message and exit
  -c, --generate_copyright_file
                        generate a copyright file
  -v, --verbose         enable verbose output
  -q, --quiet           disable most output

State of Development

WORK IN PROGRESS This is currently working and feature complete to the point it was originally intended. But there are still open points concerning testing and it is also very important to make sure how this behaves with existing ROS packages. In particular, the following things will have to be done:

To Do

  • Coverage analysis
  • Linter(s) per CI
  • Field trials (check existing ROS packages and see what to do with the results). see field-trials/
  • Evaluate runtime. If scancode-toolkit takes too long on too many cases, we will have to look for an alternative.
  • Allow license name in tag to be also full name of SPDX key.
  • Each LicenseTag should have SPDX id.
  • Single license tag without file attribute and single license text should match automatically.
  • Turn into github action.

License

ros_license_toolkit is open-sourced under the Apache-2.0 license. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ros_license_toolkit-1.1.0.tar.gz (22.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ros_license_toolkit-1.1.0-py3-none-any.whl (26.7 kB view details)

Uploaded Python 3

File details

Details for the file ros_license_toolkit-1.1.0.tar.gz.

File metadata

  • Download URL: ros_license_toolkit-1.1.0.tar.gz
  • Upload date:
  • Size: 22.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for ros_license_toolkit-1.1.0.tar.gz
Algorithm Hash digest
SHA256 f8c66198bb86ed6b9b0ca0152da3c23c0ca4901003dd94a2de1c50eaa598b2e1
MD5 f61553d3c8e6607b7c89fdbdd6409100
BLAKE2b-256 70e3329bd0447735f8e7a31e089494fa860d31ef73860f0ad01341aae8693342

See more details on using hashes here.

File details

Details for the file ros_license_toolkit-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ros_license_toolkit-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b68811fe415b84883bb74066af2b926cd62770e7d41ad82c3070acd80e06d4fd
MD5 efce40a1ebf026df96885a53f68b33ff
BLAKE2b-256 7181bee8eecdae6395fc8fd75789ad9540be6e823edd23109468397e6894b339

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page