Skip to content

Add License/Copyright to all files #90

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

Closed
wnienhaus opened this issue Jul 12, 2023 · 7 comments · Fixed by #95
Closed

Add License/Copyright to all files #90

wnienhaus opened this issue Jul 12, 2023 · 7 comments · Fixed by #95

Comments

@wnienhaus
Copy link
Collaborator

Currently we have only a general LICENSE file in the repo root.

Having license/copyright information in each file makes it very clear for anyone who copies the file what the license/copyright is.

We can either add a short header using the SPDX-License-Identifier format. Or a long one like in the micropython repo.

@wnienhaus
Copy link
Collaborator Author

@ThomasWaldmann commented in the PR (#89):

I'ld rather dislike having the same (long) license text as a header in each file.
If there is a header in a file, I'ld rather expect it to roughly tell what's inside that file and after that there could be also a short notice identifying the license.

So perhaps we'll go the SPDX-License-Identifier route. Final decision is still open.

@dpgeorge
Copy link
Member

Here's an example of a short header with description, copyright and license: https://github.com/micropython/micropython/blob/master/lib/littlefs/lfs2.c#L1-L7

@wnienhaus
Copy link
Collaborator Author

That looks pretty neat. One liner description (or longer if needed), followed by (in our case) 1 copyright line, followed by SPDX-License-Identifier: MIT. What do you think @ThomasWaldmann ?

e.g.

# ESP32 ULP Co-Processor Assembler
#
# Copyright 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

or maybe:

"""
ESP32 ULP Co-Processor Assembler

Copyright 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
SPDX-License-Identifier: MIT
"""

even though I wonder whether the 2nd example would be interpreted as a string and use thus more memory?

@ThomasWaldmann
Copy link
Collaborator

If one puts the "current year" there, one has to run around once a year and update the years everywhere.

@dpgeorge
Copy link
Member

You only need to update the year if you change the code (in that year). It's OK for a copyright to be "old" if the code is also "old".

@wnienhaus
Copy link
Collaborator Author

Btw, saw in some other code today, there's also a SPDX-FileCopyrightText identifier, so we could make it:

# ESP32 ULP Co-Processor Assembler
#
# SPDX-FileCopyrightText: 2018-2023, the micropython-esp32-ulp authors, see AUTHORS file.
# SPDX-License-Identifier: MIT

@wnienhaus
Copy link
Collaborator Author

I have now created PR #95, adding licence headers everywhere.
@ThomasWaldmann @dpgeorge feel free to review and give feedback.

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 a pull request may close this issue.

3 participants