Skip to content

Commit

Permalink
Merge pull request #629 from NLeSC/618_copyright_owner
Browse files Browse the repository at this point in the history
618-add copyright owner to licenses
  • Loading branch information
fdiblen authored Sep 2, 2024
2 parents 2053c73 + e5ad010 commit bfb33bd
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 12 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

### Changed

* copyright owner is asked in all profiles [#629](https://github.com/NLeSC/python-template/pull/629)
* license files includes year and copyright owner information [#629](https://github.com/NLeSC/python-template/pull/629)

### Removed

* Remove pyproject.toml and CITATION.cff from the list of files that are not updated if they exist [#655](https://github.com/NLeSC/python-template/pull/655)
Expand Down
8 changes: 8 additions & 0 deletions copier/questions/essential.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,11 @@ license:
value: GNULesserv3
Other (add your own license):
value: Other
copyright_holder:
type: str
default: "{{ full_name }}"
help: "Who is the copyright holder (default: full name)?"
validator: >-
{% if not copyright_holder %}
This field cannot be empty as it will be used in content of the generated files.
{% endif %}
8 changes: 0 additions & 8 deletions copier/questions/package_details.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@ email:
{% if not (email | regex_search('([A-Za-z0-9]+[.-_])*[A-Za-z0-9]+@[A-Za-z0-9-]+(\.[A-Z|a-z]{2,})+')) %}
Please enter a valid email address
{% endif %}
copyright_holder:
type: str
default: "{{ full_name }}"
help: "Who is the copyright holder (default: full name)?"
validator: >-
{% if not copyright_holder %}
This field cannot be empty as it will be used in content of the generated files.
{% endif %}
# computed fields
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyy] [name of copyright owner]
Copyright {{ '%Y' | strftime }} {{ copyright_holder }}

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions template/{% if license == 'GNUv3' %}LICENSE{% endif %}.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
Copyright (C) {{ '%Y' | strftime }} {{ copyright_holder }}
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
<program> Copyright (C) {{ '%Y' | strftime }} {{ copyright_holder }}
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Add your own license
Copyright (C) {{ '%Y' | strftime }} {{ copyright_holder }}

0 comments on commit bfb33bd

Please sign in to comment.