When should I add a copyright at the top of a source file? [closed]
Most files in ROS2 have a copyright at the top. (seemingly all c
, cpp
, h
,hpp
files and most py
files, though not most xml
, rst
, md
, or yml
files)
- What files should have a copyright? What files don't? All the above formats theoretically could have a copyright.
- If I submit a pull request, when should I add my name to the copyright on top? If I edit a single character? If I add a function? If I rewrite 50% of the file?
This is a generic copyright question and not ROS specific. There are many articles covering this topic online from lawyers and other experts.
Isn't closing this a bit harsh?
I agree it may not be entirely on-topic, but I guess @DanRose is asking (perhaps only implicitly) whether there are any differences between how this is done "in ROS2" compared to the practices in the wider OSS community.
Especially the second question (about when adding copyright) seems valid. Even if the answer would be "we follow this-and-this approach/style" that could be answered here.
Seeing as most ROS 2 repositories are still under direct control of OR, asking how these kind of things are handled there seems like an OK question for ROS Answers to me.
This question does not have a single answer. There are differences based on what license you're using, what jurisdiction you reside in, what jursdiction the project is administered under to mention a few.
This is a well documented topic with 2.2 billion other results.
ROS 1 or 2 is just like any other open source project and should follow all the same best practices for copyright. That's why this is not the right forum, as it's not ROS specific. It's something that ROS users may find useful. , but we shouldn't try to reproduce our own non-expert version of those best practices that will go stale as the state of copyright law and associated best practices evolve over time. We should leverage the other resources available through the greater open source community.
But we enforce copyrights on top of all source files as per the developer guide;
“Each source file must have a license and copyright statement, checked with an automated linter.“
Sure there’s a legal question but what is the established norm in the ROS community?
As stated in the developer guide that's our recommended policy for copyrights headers to be in all source files. If you're not doing that you're leaving the code potentially legally ambiguous to it's state.
There's a difference between source code and data. And documentation may follow a different pattern and or license as well. Your question is to define what a source file is and I'll again go back to saying that there's a lot of material out there that you should read up on with content from lawyers to help you understand the difference. Any summary or reduction that I or anyone else gives here will be incomplete and out of date moderately quickly.
In the second question there are also definitions of "significant" contributions that you should read up on what the best legal advise is. But again it's not ...(more)
setup.py
is unambiguously source code.