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

Update coding standards #1267

Merged
merged 1 commit into from
Feb 1, 2019
Merged

Conversation

pelson
Copy link
Member

@pelson pelson commented Jan 16, 2019

Rationale

The test_coding_standards test now reflects SciTools/scitools.org.uk#209 without needing a wholesale change to all files in the cartopy codebase.

Specifically the year does not need to be part of the header, and the full license details can be referenced rather than explicit.

Implications

  • We don't have to jump through hoops to set the year when we change a file (because the year isn't part of the license header preamble anymore). Users who really want this information can reference the repository at GitHub.
  • We don't have to include all of the terms of the license in the preamble, it is sufficient to reference a file in the repository.
  • Completely empty files (e.g. __init__.py) no longer need a license header nor the special future imports tested for in test_coding_standards.

TODO:

@pelson pelson force-pushed the new_license_header branch from b5779a4 to 3aa9ea1 Compare January 30, 2019 11:42
@pelson pelson changed the title WIP: Update coding standards Update coding standards Feb 1, 2019
@pelson
Copy link
Member Author

pelson commented Feb 1, 2019

No more pre-amble year updates 🎉. Rather than add a commit that changes every single file I suggest we update these as we go, which means we will see failures as we update files, but we won't be obliged to to this annually.

@dopplershift dopplershift merged commit eff8ba5 into SciTools:master Feb 1, 2019
@dopplershift
Copy link
Contributor

🎉

@QuLogic QuLogic added this to the 0.18 milestone Feb 1, 2019
@greglucas
Copy link
Contributor

I was just going through some people's PRs and noticed that a lot of CI failures were because of the copyright header year not being updated. It looks like from the discussion above,

Specifically the year does not need to be part of the header, and the full license details can be referenced rather than explicit.

does this imply that the year in each source file isn't needed, but rather just a reference to the main LICENSE file in the base of the repo?

I also noticed that the updates here removed the Crown Copyright and changed it to Cartopy Contributors, but all of the source files still contain the Crown Copyright. I'm wondering if this should all be updated in the main LICENSE file to something along the lines of Crown Copyright 2011 - 2018, Cartopy Contributors 2019 - 2020 indicating when you made the switch?

This is all to say that I have no experience with legal-speak, and am just looking to avoid only finding the copyright failure on CI when all other checks have passed locally.
Another option that I haven't looked at is to see if there is a way to put test_coding_standards.py copyright year checks into pytest somehow so that people could see the failures when they run the test suite locally.

@QuLogic
Copy link
Member

QuLogic commented Feb 23, 2020

I believe both headers are allowed (see the license header test) to allow for piecemeal conversion. It just hasn't really been done on most files.

test_coding_standards is already triggered by pytest, but you need to be in the git directory.

@greglucas
Copy link
Contributor

Thanks, @QuLogic! I must have been doing something funky in my directory to not be running it. I see it is getting called in pytest for me locally now.

@pelson pelson deleted the new_license_header branch March 1, 2020 05:42
@pelson
Copy link
Member Author

pelson commented Mar 1, 2020

I believe both headers are allowed (see the license header test) to allow for piecemeal conversion. It just hasn't really been done on most files.

I was going to wait until Jan 2020 to get rid of the years altogether, but turned out things got a bit busy 😄

From a LICENSE file perspective, technically we can say that all of the contributions to cartopy are copyright "Cartopy contributors". To be explicit, I recommend all future updates to the headers remove years as supported by this PR so that we never have this silly situation where we are making unnecessary commits because of some arbitrary date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants