Skip to content

Commit 3b819b3

Browse files
Merge pull request #45 from ssciwr/add-citation-file
Add CITATION.cff
2 parents 0458031 + 72735e0 commit 3b819b3

4 files changed

Lines changed: 31 additions & 1 deletion

File tree

local_extensions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ class CurrentDateExtension(Extension):
1010
def __init__(self, environment):
1111
super().__init__(environment)
1212

13+
now = datetime.datetime.now(datetime.timezone.utc)
1314
environment.globals.update({
14-
"current_year": datetime.datetime.utcnow().year
15+
"current_year": now.year,
16+
"current_date": now.date().isoformat()
1517
})
1618

1719
#
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
cff-version: 1.2.0
2+
message: "If you use this software, please cite it as below."
3+
title: "{{cookiecutter.project_name}}"
4+
abstract: "This is an awesome project. It does many things."
5+
keywords:
6+
- keyword1
7+
- keyword2
8+
- keyword3
9+
authors:
10+
- name: "{{cookiecutter.full_name}}"
11+
orcid: "https://orcid.org/0000-0000-0000-0000"
12+
{%- if cookiecutter.version_management == "manually" %}
13+
version: 0.0.1
14+
{%- endif %}
15+
date-released: "{{ current_date }}"
16+
identifiers:
17+
- description: This is a collection of archived snapshots of this project.
18+
type: doi
19+
value: "10.5281/zenodo.123456"
20+
{%- if cookiecutter.license != "None" %}
21+
license: {{cookiecutter.license}}
22+
{%- endif %}
23+
{%- if cookiecutter.remote_url != 'None' %}
24+
repository-code: {{cookiecutter.remote_url}}
25+
{%- endif %}

{{cookiecutter.project_slug}}/FILESTRUCTURE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ This is an explanation of the file structure that the cookiecutter generated for
2020
hosting provider.
2121
* `README.md` is the file that users will typically see first when discovering your project.
2222
* `COPYING.md` provides a list of copyright holders.
23+
* `CITATION.cff` provides citation metadata so others know how to reference your project in publications.
2324
{%- if cookiecutter.license != "None" %}
2425
* `LICENSE.md` contains the license you selected.
2526
{%- endif %}

{{cookiecutter.project_slug}}/TODO.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,5 @@ The following tasks need to be done to get a fully working project:
2525
so, you need to select it from the list of repositories (potentially re-syncing with GitHub). Then, head
2626
to the "Settings" Tab and select "Global Upload Token". Here, you should select the "not required" option.
2727
{%- endif %}
28+
* Adjust pyproject.toml to your needs, e.g., add description, e-mail{%- if cookiecutter.version_management != "setuptools_scm" %}, version number{%- endif %}.
29+
* Adjust CITATION.cff to your needs. See [Citation File Format (CFF) Website](https://citation-file-format.github.io/) for more information.

0 commit comments

Comments
 (0)