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

MAINT: Add copyright to the top of each file #12221

Closed
wants to merge 2 commits into from

Conversation

larsoner
Copy link
Member

This script tools/dev/ensure_headers.py reads all .py files in our source tree and ensures that our standard license line shows up followed by a new copyright line suggested by bestpractices.dev. Only takes a few hundred milliseconds to run, and running it more than once is a no-op. Eventually we could maybe turn it into a pre-commit hook but for now we can probably just add it to our release instructions as yet another step. It provides a framework for eventually (in another PR) tackling #11605.

@larsoner
Copy link
Member Author

Leaving this as draft mode just to avoid pinging pretty much the entire steering council :) @drammock feel free to take a look and see if it makes sense to you



def _ensure_license(lines, path):
# 1. Keep existing
Copy link
Member Author

Choose a reason for hiding this comment

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

@drammock this is the one new file. Might be easiest to check out my branch and look at tools/dev/ensure_headers.py locally. GitHub is really slow with a diff across so many files

@drammock
Copy link
Member

should we add gitpython as a new dev dependency in pyproject.toml? I'm OK with that but also OK omitting it since it's only the release manager du jour that needs it. I looked at the script on your fork as suggested, LGTM.

@cbrnr
Copy link
Contributor

cbrnr commented Nov 17, 2023

Shouldn't it be "Copyright by the MNE-Python contributors."?

@sappelhoff
Copy link
Member

Shouldn't it be "Copyright by the MNE-Python contributors."?

the wording here is the one suggested here: https://www.bestpractices.dev/en/projects/7783?criteria_level=2

I'd be +1 to keep in line with their "template"

@larsoner
Copy link
Member Author

Pushed to main as 5897b81

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.

5 participants