Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transition to Apache License 2.0: License Update, Author Attribution, and Documentation Compliance #617

Merged
merged 8 commits into from
Nov 19, 2024

Conversation

vschaffn
Copy link
Contributor

@vschaffn vschaffn commented Oct 24, 2024

Description

This PR implements the transition of the xDEM project license from MIT to Apache License 2.0.
Resolves #555

Changes implemented

  • The LICENSE file has been updated with the full text of the Apache v2.0 license.
  • A NOTICE file has been added to comply with Apache licensing requirements. The file includes necessary copyright notices and details about dependencies used by xdem, including Python, NumPy, Matplotlib, SciPy, Geoutils, Rasterio, GeoPandas, Numba, pyproj, tqdm, scikit-image, scikit-gstat, pyogrio, pandas, scikit-learn, OpenCV, affine, Shapely, pytransform3d, yaml and noisyopt.
  • An AUTHORS.md file has been created listing the main contributors of the project along with their contact information, while mentioning their affiliation with the xDEM developers' copyright.
  • All source code files have been updated with the new Apache v2.0 license header, which is the following:
# Copyright (c) 2024 xDEM developers.
#
# This file is part of the xdem project:
#   https://github.com/glaciohack/xdem
#
# 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 header is set up automatically via pre-commit for every source files.

  • The setup.cfg has been updated with the new license and copyright as well as conf.py.

  • The documentation has been updated with the license and the authors.

Notes

AUTHORS.md Show resolved Hide resolved
LICENSE Show resolved Hide resolved
NOTICE Show resolved Hide resolved
setup.cfg Show resolved Hide resolved
setup.cfg Outdated Show resolved Hide resolved
xdem/__init__.py Outdated Show resolved Hide resolved
@adebardo
Copy link

I'm looking into setting up a changelog file.

@rhugonnet
Copy link
Contributor

Really great to have this done rigorously! 🙂
On the next step you list for adding more contributors: I would start obviously by adding yourselves @vschaffn @adebardo 😉. Then, should we consider listing those that do not have commits but contributed to important amount of code through other packages that have been or are being adapted in xDEM? (@duboise-cnes, but also for instance @iamdonovan & potentially others; if they feel it is warranted).

Other than that, I have three remarks:

  1. Should we also modify the "author" name of PyPI with the same "xdem contributors" name?
    author = The GlacioHack Team
  2. Should we also update the documentation copyright here:
    copyright = "2021, Erik Mannerfelt, Romain Hugonnet, Amaury Dehecq and others"

    I think I remember @sdinot mentioning the copyright for the documentation being separate? What would be the best practice here? (it seems easier to have a single one)
  3. Should we also update the Zenodo repository of the package accordingly? https://zenodo.org/records/4809698.

Final note: if we address these points consistently, this PR would also resolve #431!

AUTHORS.md Outdated Show resolved Hide resolved
AUTHORS.md Outdated Show resolved Hide resolved
@sdinot
Copy link

sdinot commented Oct 24, 2024

2. I think I remember @sdinot mentioning the copyright for the documentation being separate? What would be the best practice here? (it seems easier to have a single one)

To be precise, I wasn't talking about the copyright notice, but about the license, which must be adapted to the nature of the protected work. The Apache v2.0 license is a permissive open source license adapted to software. Its vocabulary and clauses make it less suitable for documentation. For the latter, a permissive open source license dedicated to literary and artistic works, such as the Creative Commons Attribution 4.0 International (CC BY 4.0) license, would be more appropriate.

Those of you who read French (or have a good automatic translator) can read the blog post I wrote on this subject:
Projet libre : à chaque ressource sa licence.

@rhugonnet
Copy link
Contributor

Thanks @sdinot, your blog post is a great resource! (I'll also peak at the /e/OS/ post for my Fairphone later 😄)
Adding a CC BY 4.0 for the documentation sounds perfect, and potentially a 0BSD for code snippets/examples.

You give an example of what the package's README would look like. Would it also be good to add a short version of this notice at the bottom of the documentation pages? If yes, what would this look like (something like: "Copyright xDEM developers: text and figures CC BY 4.0, code snippets 0BSD")?

@duboise-cnes
Copy link
Member

Really great to have this done rigorously! 🙂 On the next step you list for adding more contributors: I would start obviously by adding yourselves @vschaffn @adebardo 😉. Then, should we consider listing those that do not have commits but contributed to important amount of code through other packages that have been or are being adapted in xDEM? (@duboise-cnes, but also for instance @iamdonovan & potentially others; if they feel it is warranted).

Other than that, I have three remarks:

1. Should we also modify the "author" name of PyPI with the same "xdem contributors" name? https://github.com/GlacioHack/xdem/blob/3287594522d91542a6b747a77c931597f4db28ad/setup.cfg#L2

2. Should we also update the documentation copyright here: https://github.com/GlacioHack/xdem/blob/3287594522d91542a6b747a77c931597f4db28ad/doc/source/conf.py#L28
   
   I think I remember @sdinot mentioning the copyright for the documentation being separate? What would be the best practice here? (it seems easier to have a single one)

3. Should we also update the Zenodo repository of the package accordingly? https://zenodo.org/records/4809698.

Final note: if we address these points consistently, this PR would also resolve #431!

I am ok to be added in contributors list (with [email protected]) even no commits yet (I will try at some point when less crowded in CNES) : that allows to identify CNES in contributions simply.
Don't forget to add CNES copyright on "real" further contributions on future code from demcompare (CLI, ....). Not needed on this PR, which is only a copyright clean, an important but not complex contribution. So ok for this one, but to be careful on following ones to choose wisely where to go on copyright. If it is not clear, ask me PR after PR on CNES funded ones.

Pypi author and documentation should be also changed, i agree.
For the documentation, see sebastien answer but not needed on each file but globally with any adapted documentation licence. Great if it is clean but doesn't have the best choice, simply an understable and classical ones for readers and doc contributors.

Hope it helps to finish this PR

@vschaffn vschaffn force-pushed the 555-licence_apachev2 branch 2 times, most recently from 841ec61 to f533aa4 Compare October 25, 2024 13:09
@vschaffn
Copy link
Contributor Author

Many thanks for your feedback !
@adebardo Every packages used in source are now listed in NOTICE. Then I will modify setup.cfg but this would be for #582.
@rhugonnet I have changed xdem to xDEM wherever applicable, and added the contributors you mentionned.
@duboise-cnes I have noted your comment about the CNES copyright, and I will keep that in mind for future contributions.


- **Romain Hugonnet** [@rhugonnet](https://github.com/rhugonnet) <[email protected]>
- **Amaury Dehecq** [@adehecq](https://github/adehecq) <[email protected]>
- **Erik Schytt Mannerfelt** [@erikmannerfelt](https://github/erikmannerfelt)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@erikmannerfelt Do you want an email to be added for you here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@erikmannerfelt Reminder on this

AUTHORS.md Outdated Show resolved Hide resolved
AUTHORS.md Show resolved Hide resolved
@rhugonnet
Copy link
Contributor

All good for me, just the couple comments above!
We can add the contributors I asked later (in a separate PR), so no problem to merge this directly next week 🙂.

AUTHORS.md Outdated Show resolved Hide resolved
@sdinot
Copy link

sdinot commented Oct 26, 2024

You give an example of what the package's README would look like. Would it also be good to add a short version of this notice at the bottom of the documentation pages? If yes, what would this look like (something like: "Copyright xDEM developers: text and figures CC BY 4.0, code snippets 0BSD")?

We could indeed consider placing a copyright notice on all pages of the documentation, as we do in the source code. But the practice is different for documentation. In general, authors simply indicate the license of the code, documentation and other project resources on a dedicated page of the documentation.

This difference in practice between source code and documentation is probably due to the fact that a source code file can more easily be extracted from its context and reused in another than a page of documentation. We therefore ensure that each source code file is legally “self-supporting”. It contains not only the source code, but also the name of the copyright holder, the license and the origin of the file.

@vschaffn vschaffn changed the title [POC] 555 licence apachev2 Transition to Apache License 2.0: License Update, Author Attribution, and Documentation Compliance Oct 28, 2024
@vschaffn vschaffn changed the base branch from branch-poc to main October 28, 2024 09:16
@vschaffn vschaffn force-pushed the 555-licence_apachev2 branch 2 times, most recently from d583331 to 54e50a5 Compare October 31, 2024 09:03
AUTHORS.md Outdated Show resolved Hide resolved
@rhugonnet
Copy link
Contributor

@vschaffn I re-tagged @erikmannerfelt and @fmaussion regarding the author listing + email.
If they don't answer in the next days, feel free to merge the PR anyways, we can adjust those things later on 😉.

Copy link

@adebardo adebardo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@duboise-cnes Could you please indicate how we can change the information on PyPI?

@vschaffn Could you add a file of the license and authors in the documentation ? as an example : https://www.orekit.org/site-orekit-development/licenses.html

@sdinot said "In general, authors simply indicate the license of the code, documentation and other project resources on a dedicated page of the documentation"

xdem/coreg/base.py Outdated Show resolved Hide resolved
AUTHORS.md Outdated Show resolved Hide resolved
AUTHORS.md Show resolved Hide resolved
@vschaffn
Copy link
Contributor Author

@adebardo @rhugonnet I updated the PR following your feadbacks, the license and the authors are now in the documentation.
Moreover, I have set up header automation for the source code, and fixed a minor issue with make clean.

adebardo
adebardo previously approved these changes Nov 15, 2024
@adebardo
Copy link

@rhugonnet all good for you ?

@rhugonnet
Copy link
Contributor

Just a small comment above, then yes all good! 😄

rhugonnet
rhugonnet previously approved these changes Nov 15, 2024
@adebardo adebardo merged commit b6c00af into GlacioHack:main Nov 19, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[POC] license ApacheV2
6 participants