opensim-org / opensim-core

SimTK OpenSim C++ libraries and command-line applications, and Java/Python wrapping.
https://opensim.stanford.edu
Apache License 2.0
792 stars 317 forks source link

Add new NCSRR grant number to copyright/license headers #672

Closed tkuchida closed 7 years ago

tkuchida commented 9 years ago

P2C HD065690 should be added to the existing list (U54 GM072970, R24 HD065690). Automate?

chrisdembia commented 9 years ago

Nice catch! Are you volunteering?

Also, some files have a different (old?) license, presumably by mistake: https://github.com/opensim-org/opensim-core/blob/master/OpenSim/Utilities/convertFiles/convertFiles.cpp

I think Kevin wrote the original script to add copyright info to files. And I think I saw it in the repo at some point...I can't find it now though. I'll keep looking.

chrisdembia commented 9 years ago

I kept looking and I found an addComments.cpp in the opensim32 repo but that wasn't it. @aymanhab @aseth1 do you remember where the script is?

aseth1 commented 9 years ago

I don't think it is correct to retrospectively attribute a new funding source to existing code. Moving forward we do need to include. A template for generating new classes and implementations with the latest funding (in addition to everything else) would be helpful.

sherm1 commented 9 years ago

Mobilize Center/DARPA Warrior Web grants also? I'm currently funded out of both of those.

chrisdembia commented 9 years ago

I don't think it is correct to retrospectively attribute a new funding source to existing code.

Oh that makes sense. Should we associate new code with old grants that had nothing to do with the new code?

It'd be nice if the funding sources were listed as a bulleted list to make it easier to add/remove them.

A template for generating new classes and implementations with the latest funding (in addition to everything else) would be helpful

I vote putting a text file with such content in LICENSE.txt, OpenSim/Auxiliary, or doc/OpenSimDoxygenMain.h

jenhicks commented 9 years ago

Good point! DARPA is currently listed, but the new NCSRR grant number and Mobilize are not. I'd prefer that we have a consistent license block throughout the code. It seems messy to update the license block with the current funding sources every time we touch a piece of code. Are there downsides to retrospective attribution that I'm missing? It seems good, in general, to be liberal in acknowledgement of the funding that keeps the project going.

tkuchida commented 9 years ago

Here are all the numbers: :moneybag: DARPA Warrior Web (W911QX-12-C-0018) :moneybag: NIH National Center for Physics-Based Simulation of Biological Structures (U54 GM072970) :moneybag: NIH National Center for Simulation in Rehabilitation Research (R24 HD065690 and P2C HD065690) :moneybag: Mobilize Center NIH Big Data to Knowledge Center of Excellence (U54 EB020405)

klshrinidhi commented 9 years ago

Is it necessary (part of the contract/agreement) with the funding agencies that we put the grant information in every file ?

Can we change the header in every file to just say:

For information on funding sources, please see https://<OpenSim website>.
chrisdembia commented 9 years ago

While we're at it, could we remove the asterisks from the right edge of the comment block? Any time we edit the notice, we have to remove spaces to get the asterisks to line up again.

sherm1 commented 9 years ago

While we're at it, could we remove the asterisks from the right edge of the comment block?

I like seeing the block. It doesn't seem that hard to line up the asterisks since we don't change these very often!

sherm1 commented 9 years ago

Is it necessary (part of the contract/agreement) with the funding agencies that we put the grant information in every file?

Maybe we could add a top-level FUNDING.md that would have a table of funding sources and maybe the date ranges for them? Maybe just put the agency names in the headers and reference out the grant numbers? We of course want to make sure our financial supporters get credit and feel appreciated.

One technical glitch is that people are free to grab any chunk of our source code as long as they keep the copyright/license block intact; they don't have to pull along any other files.

chrisdembia commented 9 years ago

I think we could add the funding sources to README.md; I don't like the idea of too many files in the root of the project.

chrisdembia commented 9 years ago

One technical glitch is that people are free to grab any chunk of our source code as long as they keep the copyright/license block intact; they don't have to pull along any other files.

To clarify, this means if they copy lines 500-563 into JoesAlgorithm.h, then they have to copy our copyright block to the top of JoesAlgorithm.h?

sherm1 commented 9 years ago

To clarify, this means if they copy lines 500-563 into JoesAlgorithm.h, then they have to copy our copyright block to the top of JoesAlgorithm.h?

Yes, that's the license requirement. Whether anyone actually obeys is hard to say!

sherm1 commented 9 years ago

To be specific, this is from section 4 of the Apache 2.0 License:

You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: ... You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; ...

chrisdembia commented 9 years ago

all copyright, patent, trademark, and attribution notices from the Source form of the Work

Couldn't this be interpreted to mean the LICENSE.txt file in the root of the repo? Does Work mean the entire project, or each single source file, or each individual ascii character in the source files?

sherm1 commented 9 years ago

I think we could add the funding sources to README.md; I don't like the idea of too many files in the root of the project.

Agreed; that's better.

sherm1 commented 9 years ago

"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).

Generally one needs lawsuits, lawyers, and judges to figure out what these things really mean. But you could try wading through the Apache 2.0 verbiage to see if it is totally clear from the text. They do have more text about "NOTICE" files but from that I would assume they mean you don't have to include files that are not specifically designated in the license.

chrisdembia commented 9 years ago

I have some suggestions.

Here is the current notice:

/* -------------------------------------------------------------------------- *
 *                               OpenSim License                              *
 * -------------------------------------------------------------------------- *
 * The OpenSim API is a toolkit for musculoskeletal modeling and simulation.  *
 * See http://opensim.stanford.edu and the NOTICE file for more information.  *
 * OpenSim is developed at Stanford University and supported by the US        *
 * National Institutes of Health (U54 GM072970, R24 HD065690) and by DARPA    *
 * through the Warrior Web program.                                           *
 *                                                                            *
 * Copyright (c) 2005-2014 Stanford University and the Authors                *
 *                                                                            *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may    *
 * not use this file except in compliance with the License. You may obtain a  *
 * copy of the License at http://www.apache.org/licenses/LICENSE-2.0.         *
 *                                                                            *
 * Unless required by applicable law or agreed to in writing, software        *
 * distributed under the License is distributed on an "AS IS" BASIS,          *
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
 * See the License for the specific language governing permissions and        *
 * limitations under the License.                                             *
 * -------------------------------------------------------------------------- */

Here's the suggestion:

/* -------------------------------------------------------------------------- *
 *                            OpenSim License                                 *
 * -------------------------------------------------------------------------- *
 * The OpenSim API is a toolkit for musculoskeletal modeling and simulation.  *
 * See http://opensim.stanford.edu and the NOTICE file for more information.  *
 * OpenSim is supported by:                                                   *
 *   - US National Institutes of Health                                       *
 *   - DARPA, through the Warrior Web program                                 *
 *                                                                            *
 * Copyright (c) 2005-2015 Stanford University and the Authors                *
 * Author(s): Bio Mechanist                                                   *
 * Contributor(s): Bio Mechanist                                              *
 *                                                                            *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may    *
 * not use this file except in compliance with the License. You may obtain a  *
 * copy of the License at http://www.apache.org/licenses/LICENSE-2.0.         *
 *                                                                            *
 * Unless required by applicable law or agreed to in writing, software        *
 * distributed under the License is distributed on an "AS IS" BASIS,          *
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
 * See the License for the specific language governing permissions and        *
 * limitations under the License.                                             *
 * -------------------------------------------------------------------------- */

The Apache 2.0 license provides the following guidelines:

To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.

They imply that the copyright notice above appears in every file, so I think we should leave in the full blurb, even though I'd prefer a simple reference to another file like Shrinidhi suggests.

By the way, our repo no longer has a NOTICE file; I deleted it and there's now only the LICENSE.txt file. Should I rename that to NOTICE?

chrisdembia commented 9 years ago

It sounds like we can avoid putting that whole blurb in every file (http://programmers.stackexchange.com/questions/270091/is-a-license-header-in-source-files-required), but it's recommended to put in the blurb just as we have done.

By the way, our repo no longer has a NOTICE file; I deleted it and there's now only the LICENSE.txt file. Should I rename that to NOTICE?

I found that there is supposed to be both a NOTICE and LICENSE file in our repo. I'll fix this ...oops.

sherm1 commented 9 years ago

I found that there is supposed to be both a NOTICE and LICENSE file in our repo.

Wait ... I think NOTICE is optional.

chrisdembia commented 9 years ago

Wait ... I think NOTICE is optional.

I think you're right, but so are the blurbs in each file. I also think the LICENSE file should maybe hold the actual license, not just a reference to it.

sherm1 commented 9 years ago

Since their own example at the bottom of the license ("How to apply the Apache license to your work") contains this text:

You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

and doesn't mention a separate copy, I infer that they consider the link adequate. This is certainly a reasonable inference and less work so we should keep doing it that way unless Apache asks us to do it differently.

sherm1 commented 9 years ago

I reread the section about the NOTICE file. That provides a mechanism by which we can force users of our software to propagate some additional text. So for example we could put grant numbers in there and then everyone would have to propagate those forever even if they grabbed only one line of code. To me that seems somewhat unfriendly and I don't think we should do it without good reason. It is also not clear to me that we would get good compliance -- as a programmer it is much easier to copy around the copyright block in the code than to notice the NOTICE file and drag it around separately. Here is the relevant section:

If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.

sherm1 commented 9 years ago

To summarize my 2 cents on this:

@jenhicks what do you think? Joy and Scott would be good to consult also to see whether this would be impolitic.

/cc @joyku is this your GitHub user?

sherm1 commented 9 years ago

Here is the current notice:

 * The OpenSim API is a toolkit for musculoskeletal modeling and simulation.  *
 * See http://opensim.stanford.edu and the NOTICE file for more information.  *

We should change NOTICE here to README.md next time we do a mega-update of this header.

chrisdembia commented 9 years ago

Good point.

By the way

* OpenSim is developed at Stanford University and supported by the US        *
* National Institutes of Health (U54 GM072970, R24 HD065690) and by DARPA    *
* through the Warrior Web program.

I think we should get rid of the "developed at Stanford University" bit, in the spirit of community ownership.

jenhicks commented 9 years ago

I think we should add funding info to the README.md in any case. Below is a draft update to the text excerpt in Chris's comment above. Let me know what you guys think. When we're happy with a new block we can send around to Scott and others before we make the big switch:

OpenSim is developed at Stanford University, with additional contributions from the worldwide community. Support for OpenSim includes funding from the National Institutes of Health and DARPA. For a full list of contributors and supporters see CONTRIBUTING.md and README.md.

chrisdembia commented 9 years ago

@jenhicks I like that but I want to connect it to the sentences above a little more, since the sentence before mentioned NOTICE, and Sherm suggested changing NOTICE to README.md.

The OpenSim library is a toolkit for musculoskeletal modeling and 
simulation (https://opensim.stanford.edu). OpenSim is developed at
Stanford University, with additional contributions from the worldwide 
community. Support for OpenSim includes funding from the National
Institutes of Health and DARPA; see CONTRIBUTING.md and README.md
for more information.

I replaced "OpenSim API" with "OpenSim library" because I don't think we are copyrighting the OpenSim API (even though it seems the courts determined that APIs are in some sense copyrightable). I think we are copyrighting our implementation as well (that is, our source code). So I changed "OpenSim API" to "OpenSim library".

By the way, the LICENSE.txt file already has a section on "How to acknowledge us" that mentions the grant numbers:

We would also be grateful if you mention that OpenSim is funded by NIH Roadmap grant U54 GM072970, the NIH research infrastructure grant R24 HD065690, and the DARPA Warrior Web Program. We greatly appreciate this support, and the NIH and DARPA appreciate knowing that their funds are having an impact, particularly on medical research and human health.

Should we move this to the README? I also think we should rewrite that blurb, because it is vague about how we expect people to acknowledge our funding sources; should people put those grants in the Acknowledgements section of papers they write for projects using OpenSim?

Also, if we expect people to copy and paste that block into their own code, then the references to CONTRIBUTING.md and README.md aren't so meaningful in that context.

jenhicks commented 9 years ago

@chrisdembia Ooops ... I didn't see your suggestion before I made my comment. Yes, I agree we should change from NOTICE to README. How about:

The OpenSim API is a toolkit for musculoskeletal modeling and simulation. OpenSim is developed at Stanford University, with additional contributions from the worldwide community. Support for OpenSim includes funding from the National Institutes of Health and DARPA. See http://opensim.stanford.edu and the README file for more information.

chrisdembia commented 9 years ago

I like that, though I think we should keep the extension on README (README.md).

sherm1 commented 9 years ago

I think we should keep the extension on README (README.md).

It might be better just to say README in case we choose to format it differently some day (it was a .txt not long ago). It's not ambiguous as long as we never have more than one README file. Adobe did something similar with NOTICE in the license -- they don't specify any suffix leaving open the formatting possibilities.

sherm1 commented 9 years ago

How about this for a more inclusive flavor:

OpenSim is a toolkit for musculoskeletal modeling and simulation, developed as an open source project by a worldwide community. Development and support is coordinated from Stanford University, with funding from the U.S. NIH and DARPA. See http://opensim.stanford.edu and the README file for more information including specific grant numbers.

Not sure if the "including specific grant numbers" is necessary and whether it is OK to just say "NIH" and "DARPA" without being more specific about the programs; hopefully Joy will know. Leaving out the numbers makes me nervous ever since I found out that the NIH won't count papers as having resulted from a grant if the number is not explicitly acknowledged in the paper.

sherm1 commented 9 years ago

Joy Ku @frabjous5, please see preceding discussion.

chrisdembia commented 9 years ago

It's not ambiguous as long as we never have more than one README file.

There are multiple README files in the repo, but only one in the root directory.

sherm1 commented 9 years ago

There are multiple README files in the repo, but only one in the root directory.

Could say

See http://opensim.stanford.edu and the top-level README file for more information

but I suppose that would be the obvious default so maybe it wouldn't be necessary to say so?

tkuchida commented 8 years ago

NOTICE was updated in #1169 but we should also update source file headers.

jenhicks commented 8 years ago

Thanks @tkuchida