diff --git a/local_extensions.py b/local_extensions.py index d7235d4..b9d1c31 100644 --- a/local_extensions.py +++ b/local_extensions.py @@ -10,8 +10,10 @@ class CurrentDateExtension(Extension): def __init__(self, environment): super().__init__(environment) + now = datetime.datetime.now(datetime.timezone.utc) environment.globals.update({ - "current_year": datetime.datetime.utcnow().year + "current_year": now.year, + "current_date": now.date().isoformat() }) # diff --git a/{{cookiecutter.project_slug}}/CITATION.cff b/{{cookiecutter.project_slug}}/CITATION.cff new file mode 100644 index 0000000..23c40f9 --- /dev/null +++ b/{{cookiecutter.project_slug}}/CITATION.cff @@ -0,0 +1,25 @@ +cff-version: 1.2.0 +message: "If you use this software, please cite it as below." +title: "{{cookiecutter.project_name}}" +abstract: "This is an awesome project. It does many things." +keywords: + - keyword1 + - keyword2 + - keyword3 +authors: + - name: "{{cookiecutter.full_name}}" + orcid: "https://orcid.org/0000-0000-0000-0000" +{%- if cookiecutter.version_management == "manually" %} +version: 0.0.1 +{%- endif %} +date-released: "{{ current_date }}" +identifiers: + - description: This is a collection of archived snapshots of this project. + type: doi + value: "10.5281/zenodo.123456" +{%- if cookiecutter.license != "None" %} +license: {{cookiecutter.license}} +{%- endif %} +{%- if cookiecutter.remote_url != 'None' %} +repository-code: {{cookiecutter.remote_url}} +{%- endif %} diff --git a/{{cookiecutter.project_slug}}/FILESTRUCTURE.md b/{{cookiecutter.project_slug}}/FILESTRUCTURE.md index 9fb3f70..2f90b74 100644 --- a/{{cookiecutter.project_slug}}/FILESTRUCTURE.md +++ b/{{cookiecutter.project_slug}}/FILESTRUCTURE.md @@ -20,6 +20,7 @@ This is an explanation of the file structure that the cookiecutter generated for hosting provider. * `README.md` is the file that users will typically see first when discovering your project. * `COPYING.md` provides a list of copyright holders. + * `CITATION.cff` provides citation metadata so others know how to reference your project in publications. {%- if cookiecutter.license != "None" %} * `LICENSE.md` contains the license you selected. {%- endif %} diff --git a/{{cookiecutter.project_slug}}/TODO.md b/{{cookiecutter.project_slug}}/TODO.md index c4ded06..65ad1c2 100644 --- a/{{cookiecutter.project_slug}}/TODO.md +++ b/{{cookiecutter.project_slug}}/TODO.md @@ -25,3 +25,5 @@ The following tasks need to be done to get a fully working project: so, you need to select it from the list of repositories (potentially re-syncing with GitHub). Then, head to the "Settings" Tab and select "Global Upload Token". Here, you should select the "not required" option. {%- endif %} +* Adjust pyproject.toml to your needs, e.g., add description, e-mail{%- if cookiecutter.version_management != "setuptools_scm" %}, version number{%- endif %}. +* Adjust CITATION.cff to your needs. See [Citation File Format (CFF) Website](https://citation-file-format.github.io/) for more information.