-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
DOC: Fix headers #12781
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
DOC: Fix headers #12781
Conversation
8783b44 to
20c6da5
Compare
|
Note that this did change some examples and tutorials, namely adding the boilerplate "Authors" line to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for this file (similar for conf.py, and probably others) I feel like one of two things should happen:
- the authors/license/copyright should come before the other line-comments, and be separated by a blank line.
- the other line-comments should be converted to a triple-quoted string, like what we see in
tools/dev/ensure_headers.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay this revealed a lot more issues / inconsistencies actually, should be much better now!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unrelated comment: why is this a .py file? It looks like plain text, one entity per line. Also it's first-line comment "testing stuff" is not very helpful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this comment:
"""Vulture allowlist.
Python names that we want Vulture to ignore need to be added to this file, see:
https://github.com/jendrikseipp/vulture/blob/main/README.md#whitelists
"""
| """ | ||
|
|
||
| # Authors: The MNE-Python contributors. | ||
| # License: BSD-3-Clause | ||
| # Copyright the MNE-Python contributors. | ||
| import glob |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI @drammock it would be easy enough now I think to make sure there is a newline here before code if we want it, too.
|
@drammock okay for you now or did you want me to make that change above about having a newline after the comments before any code? |
|
Nice, I like this better than the SPDX thingy. |
personally I like having the newline there. But if you make that change, please do it as |
|
Okay pushed but I'll merge |
|
... and pushed a tiny fix for https://github.com/mne-tools/mne-python/actions/runs/10379695427/job/28738303267 as I realized it hadn't run. Will hopefully work tonight, though! 🤞 |
|
Thanks @larsoner! |
Authors:lines will be preserved, otherwise lines will be as above.ensure_headers.pytoautofixso the next time we add a file it will get this info automatically. I expect it to almost immediately push a (large!) commit to this PR. So after we merge this, we can add the squashed commit to.git-blame-ignore-revs. This will lose the history onensure_headers.pybut I don't think that really matters -- I think I'm the only author at the moment and it's just a few lines changed anyway.NB sklearn went with:
I chose "contributors" instead of "developers" to follow our existing convention. I also chose not to modify the
License:line. Happy to change those here or elsewhere if there is a standard we should follow @drammock !Closes #11605