Skip to content

Commit 595f52a

Browse files
euronionlkstrp
andauthored
Add CITATION.cff file with citation information (#266)
* Add CITATION.cff file with citation information * Update CITATION.cff with current version Add a step to update the CITATION.cff file with the current version. * Update version comment in CITATION.cff --------- Co-authored-by: Lukas Trippe <lkstrp@pm.me>
1 parent f904bf6 commit 595f52a

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

.github/workflows/release.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,23 @@ jobs:
8989
fig.savefig('doc/powerplants.png')
9090
shell: python
9191

92+
- name: Update CITATION.cff
93+
run: |
94+
import re
95+
from setuptools_scm import get_version
96+
97+
version = get_version()
98+
99+
with open('CITATION.cff', 'r') as file:
100+
cff_content = file.read()
101+
cff_content = open('CITATION.cff', 'r').read()
102+
103+
updated_cff_content = re.sub(r"(?<=version: ).+(?= #)",version,cff_content,flags=re.MULTILINE)
104+
105+
with open('CITATION.cff', 'w') as file:
106+
file.write(updated_cff_content)
107+
shell: python
108+
92109
# End of preparation script
93110

94111
- name: Remove previous tag

CITATION.cff

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# SPDX-FileCopyrightText: Contributors to powerplantmatching <https://github.com/pypsa/powerplantmatching>
2+
#
3+
# SPDX-License-Identifier: MIT
4+
5+
cff-version: 1.2.0
6+
message: "If you use this package, please cite the corresponding manuscript in Journal of Open Research Software."
7+
title: "Performing energy modelling exercises in a transparent way - The issue of data quality in power plant databases"
8+
journal: Energy Strategy Reviews
9+
doi: 10.1016/j.esr.2018.11.004
10+
repository: https://github.com/pypsa/powerplantmatching
11+
version: 0.7.1 # Don't touch, will be updated by the release script
12+
license: MIT
13+
authors:
14+
- family-names: Gotzens
15+
given-names: Fabian
16+
orcid: https://orcid.org/0000-0001-8546-2033
17+
- family-names: Heinrichs
18+
given-names: Heidi
19+
orcid: https://orcid.org/0000-0001-9536-9465
20+
- family-names: Hörsch
21+
given-names: Jonas
22+
orcid: https://orcid.org/0000-0001-9438-767X
23+
- family-names: Hofmann
24+
given-names: Fabian
25+
orcid: https://orcid.org/0000-0002-6604-5450

0 commit comments

Comments
 (0)