ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Whats the proper way to use a proprietary software license according to ament_copyright?

asked 2020-02-05 06:42:25 -0600

I'm exploring ROS2, and I'm currently looking into unit testing.

I'm running the following commands,

colcon test
colcon test-result --verbose

I'm always getting a warning for a missing license:

test/test_something.py: copyright=My Company (2020), license=<unknown>

This is the header for my test_something.py file:

# Copyright 2020 My Company
# Proprietary License

Whats the proper text to include in the header for the warning to go away, for a Proprietary Software License? I've taken a look at the ament_copyright documentation but I didn't find an answer to my question.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2020-02-05 07:31:04 -0600

gvdhoorn gravatar image

updated 2020-02-05 12:47:14 -0600

According to ament_copyright/doc/index.rst:

The package uses Python entry points to get all list of known licenses and copyright holder. You can implement a custom package and contribute more implementations to these entry points or extend this package with more licenses.

It's rather terse, but that would seem to be the way to add custom licenses.

Using a separate package to host them and extend ament_copyright seems like a nice clean approach. Not sure what the runtime overhead of that would be though.

edit flag offensive delete link more

Comments

Python entrypoints are very low overhead. All the existing licenses are already entrypoints even for the "default" ones. As an example of what it takes to add a license see: https://github.com/ament/ament_lint/p... including registering the entrypoint. That registration can be done from any python package in the workspace.

tfoote gravatar image tfoote  ( 2020-02-05 13:16:00 -0600 )edit

Extending the package seems like a very good option for this use case, I'll give it a try and report on my findings.

Gonçalo Cabrita gravatar image Gonçalo Cabrita  ( 2020-02-05 13:22:52 -0600 )edit

So I just experimented cloning the ament_copyright package to my workspace, added my proprietary license to ament_copyright (on my workspace) as suggested by Tully and it works beautifully. In my opinion this is a great solution for proprietary software.

Gonçalo Cabrita gravatar image Gonçalo Cabrita  ( 2020-02-10 09:46:30 -0600 )edit
1

I believe the idea is to create a new package, host your files in there and then extend ament_copyright by registering an entrypoint with ament_copyright.

That would avoid you having to maintain a fork of the package while still being able to add the custom license check.

gvdhoorn gravatar image gvdhoorn  ( 2020-02-10 09:50:39 -0600 )edit

Exactly what @gvdhoorn said. You should create your own package and export the entry point for ament_copyright to find. What you did to extend ament_copyright to support your package can be done in any python package you include in your workspace. I'd suggest a dedicated package mycompany_ament_copyright.

tfoote gravatar image tfoote  ( 2020-02-10 19:22:59 -0600 )edit
1

answered 2020-02-05 11:19:33 -0600

Dirk Thomas gravatar image

updated 2020-02-05 11:21:02 -0600

The other choice is to simply not use ament_copyrightif you are using a not supported license and don't want to provide an entry point for it (see https://github.com/ament/ament_lint/b... how to do that when using ament_lint_auto.

edit flag offensive delete link more

Comments

That's definitely an option, thinking about it licensing is extremely relevant for open source software, maybe not so much on an enterprise environment. Still I'd rather have proprietary disclaimers on all files.

Gonçalo Cabrita gravatar image Gonçalo Cabrita  ( 2020-02-05 13:21:40 -0600 )edit

I wasn't suggesting to drop the information from the files. I am suggesting not to use the linter.

Dirk Thomas gravatar image Dirk Thomas  ( 2020-02-05 13:45:16 -0600 )edit

Yes I understood that, let me rephrase, I like having the information on the files thus I like the idea of having the tests looking for it.

Gonçalo Cabrita gravatar image Gonçalo Cabrita  ( 2020-02-05 13:49:48 -0600 )edit

@Dirk Thomas Can you give an example on how to exclude copyright linting in a python package. I was able to do it in a cpp package using the CMakeLists file but python packages don't have CMakeLists so I don't have an idea on how to do it.

frpunzalan gravatar image frpunzalan  ( 2020-03-10 22:39:51 -0600 )edit

You must have a custom test which runs the linter since there is no "magic" provided by ROS to do so for you.

Dirk Thomas gravatar image Dirk Thomas  ( 2020-03-10 23:05:54 -0600 )edit

@Dirk Thomas You are absolutely right. Thanks. I didn't notice it earlier but the default package created by ROS2 create package contains a test directory with the test_copyright.py file. This must be the file that run the copyright lint.

frpunzalan gravatar image frpunzalan  ( 2020-03-10 23:32:40 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2020-02-05 06:42:25 -0600

Seen: 1,679 times

Last updated: Feb 05 '20