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.4.tar.gz (22.7 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ros_license_toolkit-1.1.4.tar.gz
Algorithm Hash digest
SHA256 f2fed5eb81edcf0aa5ec8aa47da83b4e202356754a580de4d8232aa1785494e5
MD5 824a3c642c7d1f085362704afef0ce4a
BLAKE2b-256 2454e2da3ee78f78e5bc7bb79a2dafc363d11333b7716e46bbb36f25c5af9687

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ros_license_toolkit-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 13bc1faa5f15ad942779a114470852dcccd830680f70db28de4eadc19ae196ad
MD5 8cf670bb7860c94df2714d34c50a47d6
BLAKE2b-256 8721edf8882caa96cb6afc847be9841e1ff9ae5c5a72f5d5ebe02c77d8b83d22

See more details on using hashes here.

Supported by

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