adafruit / cookiecutter-adafruit-circuitpython

Cookiecutter template for Adafruit's CircuitPython libraries.
MIT License
22 stars 37 forks source link

How should Copyright be applied to files AND Should anything be default no in Community? #103

Closed askpatrickw closed 3 years ago

askpatrickw commented 3 years ago

This conversation is only about the files within the template folder which in the master branch is called {{ cookiecutter.library_name }} today.

These are the ways copyright is added today:

Template Author & Library Author

Some files have a copyright line crediting Scott and then an added line for the author is appended.

# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
# SPDX-FileCopyrightText: Copyright (c) {% now 'utc', '%Y' %} {{ cookiecutter.author }}{% if cookiecutter.company %} for {{ cookiecutter.company }}{% endif %}
#
# SPDX-License-Identifier: MIT

Author Only

The author is added when the template is processed

Coraline and Kattni

Diego only

Scott only

I thought this was messier than it actually is, but here's my proposal and question:

  1. Add the Author the examples file, and Readme file.
  2. Add a sphinx_docs to the cookiecutter which defaults to Yes for Adafruit and No for Community and if NO, excludes the Docs folder and readthedocs.yml

I could be talked out of 2. Just my opinion. I don't see everyone wanting the docs, they will just update the readme I'm sure and that's it.

askpatrickw commented 3 years ago

@kattni Let me know your thoughts on this. If you're OK with the changes. I have them queued up in my local edits and ready to add to the PR.

tannewt commented 3 years ago

We should add the library author to any file we expect them to edit. I know a number of the docs have todos that will break the build for example. Thanks!

askpatrickw commented 3 years ago

Thanks @tannewt !

@kattni Here's my updated proposal:

  1. Add the Author the examples file, Readme and Everything in docs except the favicon which is Phillip.
  2. Add a sphinx_docs to the cookiecutter which defaults to Yes for Adafruit and No for Community and if NO, excludes the Docs folder and readthedocs.yml

I have #2 working locally using a post_gen hook to remove the docs folder and it works. The empty folder name method would require applying that if logic to every file in the docs folder and that looks horrible. But it could also be done that way too.

kattni commented 3 years ago

@askpatrickw I suppose if someone really wants to host their own docs on RTD, they can figure out creating the appropriate files. Seems like most folks are likely to use the README as documentation. I think excluding those files is fine. And I agree the author should be added to any files we expect them to edit.