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

618-add copyright owner to licenses #629

Merged
merged 11 commits into from
Sep 2, 2024
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,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

## [0.6.0]
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 }}