ros-infrastructure / rosdoc2

Command-line tool for generating documentation for ROS 2 packages.
Apache License 2.0
29 stars 9 forks source link

Resolve what to print, if anything, for a copyright notice. #77

Closed rkent closed 2 months ago

rkent commented 3 months ago

The copyright notice for packages is still at 2021, and flagged with a todo here.

# TODO(tfoote) The docs say year and author but we have this and it seems more relevant.
copyright = '2021, {package_licenses}'

IANAL but the subject of copyright notices has different opinions, but clearly this one (a fixed date) is not right. I would argue for:

Anyway this needs fixing.

clalancette commented 3 months ago

Anyway this needs fixing.

We should be able to do a dynamic date by doing something similar to https://github.com/ros2/ros2_documentation/blob/84dd416a3a284758626414e183bcaada43c93c95/conf.py#L46

rkent commented 3 months ago

That's what I did in my demo version.

But I did some quick googling of the topic, and there seems to be an argument that 'copyright date' is supposed to represent when a documented is created (or at least released to the public). Small changes later might not be enough to update the copyright date. We also don't really know who the copyright owner is. We can't really rely on author from package.xml for that.

So I would argue that we add some statement to the effect that the document is copyrighted under such-and-such a license, without trying to give a date or author. If this is important to a package owner, they can add that themselves. Our uses are mostly going to care about which license it is under.

rkent commented 2 months ago

The US government has a publication on copyright notices. Quoting from that:

Copyright notice is optional for works published on or after March 1, 1989

A notice consists of three elements that generally appear as a single continuous statement: • The copyright symbol © (or for phonorecords, the symbol ℗ ); the word “copyright”; or the abbreviation “copr.”; • The year of first publication of the work; and • The name of the copyright owner. Example: © 2017 John Doe

The issue we face in rosdoc2 is 1) we don't know the year of first publication, and 2) we don't know the name(s) of the copyright owner.

The Linux Foundation has a blog post "Copyright Notices in Open Source Software Projects". Some quotes from that:

Instead, many LF project communities recommend using a more general statement in a form similar to the following (where XYZ is the project’s name):

Copyright The XYZ Authors.
Copyright The XYZ Contributors.
Copyright Contributors to the XYZ project.

By using a common format, the project avoids having to maintain lists of names of the authors or copyright holders, years or ranges of years, and variations on the (c) symbol.

I recommend that we don't include a date, and instead roughly follow the recommendation of this Linux Foundation blog, and use:

Copyright The {package_name} Contributors Licensed under the {package_license} license.

Perhaps we could add a rosdoc2.yaml option where the package could optionally specify the form they would like of the copyright statement line.