A Question About Ethical Considerations when Contributing

I have a question about the ethical considerations of contributing. I have never contributed to open source software before.

I have written a prototype function that implements the Phillips-Peron unit root test for time series. It works extremely well with respect to matching Phillips-Peron test results from R on an extensive number of test cases, but it uses a lot of code from Benjamin Born’s ADFTest, mostly his efficient implementation of MacKinnon’s method for computing the critical values and the p-values. Should I just include an acknowledgement and his copyright for that portion of the code, or should I contact him directly about how to proceed?

I’d contact him and at least let him know what your plans are. Does this go beyond using someone’s package?

If you are copying significant amounts of code, that seems close to copying someone’s words. I’d offer coauthor status in that csse.

I’m guessing you’re talking about the implementation in HypothesisTests.jl?

https://github.com/JuliaStats/HypothesisTests.jl/blob/master/src/augmented_dickey_fuller.jl

You can see that @BenjaminBorn holds the copyright on the implementation, but has granted you (and everyone) a license to not only use the code but also modify it and distribute such modifications. There’s really only two conditions: acknowledge that copyright (and the license itself) in any copies or derived works and don’t sue him.

This is the crux of how open source works: you’ve already been granted permission to work with it, modify it, and redistribute it! The exact terms of this permission are called the license, and there are many such permutations that govern exactly what you can and can’t do. The particular license here is called the “MIT License” and is what many Julia packages use.

18 Likes

Contacting the author is a good practice – people want to know where their code appears.
As an ethical matter, the License that Benjamin Born grants explicitly permits you to incorporate that source code as long as you always distribute that same license with your work (the license then applies to his work as a constituent of yours, it does not apply to your work outside of that).

# augmented_dickey_fuller.jl
# (Augmented) Dickey-Fuller unit root test
#
# Copyright (C) 2017   Benjamin Born
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2 Likes

Is the implication here that I need to keep a copy of the license for every package dependency I use in my package and then create a new license file for the package as a whole (which may or may not be different from the copied licenses)? How would I distinguish what license applies to what code, especially if the main package is going to have a copyright and no license?

1 Like

It would be nice if the Project.toml format included a license field so this information could be handled by tools.

3 Likes

No, the license on your package covers the code of that package, not of its dependencies. So your package can depend on other packages irrespective of their license. It’s up to the user to check they are happy with the licenses of all installed packages.

OTOH if you copy code into your package, you might be bound by that code’s license to license your own package in a certain way.

3 Likes

I have a related query - what is the rule/licencing/custom for code that someone responds as an answer to a question on the forum that you want to use in a package?

It depends on the forum’s terms. Here it’s:

User contributions up until and including the 6th of March 2020 are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. User contributions after the 6th of March 2020 (UTC-05:00) are licensed under a Creative Commons Attribution-ShareAlike 4.0 License. Source-code user contributions after the 6th of March 2020 (UTC-05:00) are additionally licensed under an MIT License .

6 Likes

Very helpful @mbauman - thanks! So in a practical sense, does this mean one should link to the discourse post with that volunteered code in your package documentation ?

I’ve decided to email Dr. Born and see what he has to say. Despite the very open nature of the license, it seems like the polite thing to do in this case.

My thanks to everyone who responded, including the people who expanded the original topic - this is all good info to know.

2 Likes

My personal view

  1. If I don’t want ppl to use my code, I wouldn’t post it publicly on the internet
    (Ofcourse respect open source licenses …)
  2. it’s always good practice to acknowledge sources …
  3. If I’m working on a new package & post a question about it on discourse, I’d be annoyed if someone used it to build a competing package wo trying to cooperate w me
    I asked for help optimizing my Julia code, now it's someone's package?
1 Like

Of course you can use it. I’m happy that it’s useful.

Best, Benjamin

18 Likes

Much appreciated, thank you Benjamin!

Best regards,
Ralph