forked from PyPSA/pypsa-eur
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a reproducible workflow strategy compatible with soft-fork (#19)
* Add OET flavor to repository to enable reproducible projects * Remove cookiecutter references to clean the code * Remove plots directory as graphics should be in results * Remove raw environment * Add the report in the all rule * Improve licensing scheme * Add AGPL-3.0-or-latex license * Remove reference to submodule * Add reference to micromamba and conda * Update README.md Co-authored-by: Siddharth Krishna <siddharth-krishna@users.noreply.github.com> * Update README.md Co-authored-by: Siddharth Krishna <siddharth-krishna@users.noreply.github.com> * Update README.md * Add reference to soft-fork strategy * Switch default license from AGPL to MIT --------- Co-authored-by: Siddharth Krishna <siddharth-krishna@users.noreply.github.com>
- Loading branch information
1 parent
21a97ba
commit 89a9d07
Showing
16 changed files
with
338 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ __pycache__ | |
*dconf | ||
gurobi.log | ||
.vscode | ||
.idea | ||
*.orig | ||
|
||
/bak | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
% SPDX-FileCopyrightText: Open Energy Transition gGmbH | ||
% | ||
% SPDX-License-Identifier: MIT | ||
@misc{ Nobody06, | ||
author = "Nobody Jr", | ||
title = "My Article", | ||
year = "2006" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,205 @@ | ||
% SPDX-FileCopyrightText: Open Energy Transition gGmbH | ||
% | ||
% SPDX-License-Identifier: MIT | ||
|
||
\documentclass[5p]{elsarticle} | ||
|
||
\journal{TBA} | ||
|
||
\bibliographystyle{elsarticle-num} | ||
\biboptions{numbers,sort&compress} | ||
|
||
% format hacks | ||
\usepackage{libertine} | ||
\usepackage{libertinust1math} | ||
% \usepackage{geometry} | ||
% \geometry{ | ||
% top=30mm, | ||
% bottom=35mm, | ||
% } | ||
|
||
\usepackage{amsmath} | ||
\usepackage{bbold} | ||
\usepackage{graphicx} | ||
\usepackage{eurosym} | ||
\usepackage{mathtools} | ||
\usepackage{url} | ||
\usepackage{booktabs} | ||
\usepackage{epstopdf} | ||
\usepackage{xfrac} | ||
\usepackage{tabularx} | ||
\usepackage{bm} | ||
\usepackage{subcaption} | ||
\usepackage{blindtext} | ||
\usepackage{longtable} | ||
\usepackage{multirow} | ||
\usepackage{threeparttable} | ||
\usepackage{pdflscape} | ||
\usepackage[export]{adjustbox} | ||
\usepackage[version=4]{mhchem} | ||
\usepackage[colorlinks]{hyperref} | ||
\usepackage[parfill]{parskip} | ||
\usepackage[nameinlink,sort&compress,capitalise,noabbrev]{cleveref} | ||
\usepackage[leftcaption,raggedright]{sidecap} | ||
\usepackage[prependcaption,textsize=footnotesize]{todonotes} | ||
|
||
\usepackage{siunitx} | ||
\sisetup{ | ||
range-units = single, | ||
per-mode = symbol | ||
} | ||
\DeclareSIUnit\year{a} | ||
\DeclareSIUnit{\tco}{t_{\ce{CO2}}} | ||
\DeclareSIUnit{\sieuro}{\mbox{\euro}} | ||
|
||
\usepackage{lipsum} | ||
|
||
\usepackage[resetlabels,labeled]{multibib} | ||
\newcites{S}{Supplementary References} | ||
\bibliographystyleS{elsarticle-num} | ||
|
||
\graphicspath{ | ||
{../results/graphics/}, | ||
} | ||
|
||
% \usepackage[ | ||
% type={CC}, | ||
% modifier={by}, | ||
% version={4.0}, | ||
% ]{doclicense} | ||
|
||
\newcommand{\abs}[1]{\left|#1\right|} | ||
\newcommand{\norm}[1]{\left\lVert#1\right\rVert} | ||
\newcommand{\set}[1]{\left\{#1\right\} } | ||
\DeclareMathOperator*{\argmin}{\arg\!\min} | ||
\newcommand{\R}{\mathbb{R} } | ||
\newcommand{\B}{\mathbb{B} } | ||
\newcommand{\N}{\mathbb{N} } | ||
\newcommand{\co}{\ce{CO2}~} | ||
\def\el{${}_{\textrm{el}}$} | ||
\def\th{${}_{\textrm{th}}$} | ||
\def\deg{${}^\circ$} | ||
|
||
\begin{document} | ||
|
||
\begin{frontmatter} | ||
|
||
\title{ project name } | ||
|
||
\author[affil]{ name surname } % \corref{correspondingauthor} | ||
\ead{ name.surname@openenergytransition.org } | ||
|
||
\address[affil]{ affiliation } | ||
|
||
\begin{abstract} | ||
\input{sections/abstract.tex} | ||
\end{abstract} | ||
|
||
\begin{keyword} | ||
TODO | ||
\end{keyword} | ||
|
||
% \begin{graphicalabstract} | ||
% \end{graphicalabstract} | ||
|
||
\begin{highlights} | ||
\item A | ||
\item B | ||
\item C | ||
\end{highlights} | ||
|
||
\end{frontmatter} | ||
|
||
% \listoftodos[TODOs] | ||
|
||
% \tableofcontents | ||
|
||
\section{Introduction} | ||
\label{sec:intro} | ||
|
||
\input{sections/introduction.tex} | ||
|
||
\section{Methods} | ||
\label{sec:methods} | ||
|
||
\input{sections/methods.tex} | ||
|
||
\section{Results} | ||
\label{sec:results} | ||
|
||
\input{sections/results.tex} | ||
|
||
\section{Discussion} | ||
\label{sec:discussion} | ||
|
||
\input{sections/discussion.tex} | ||
|
||
\section{Conclusion} | ||
\label{sec:conclusion} | ||
|
||
\input{sections/conclusion.tex} | ||
|
||
\section*{Acknowledgements} | ||
|
||
% XY gratefully acknowledge funding from XY under grant no. 00000. | ||
|
||
\section*{License} | ||
% \doclicenseLongText | ||
% \doclicenseIcon | ||
|
||
\section*{Author Contributions} | ||
|
||
% following https://casrai.org/credit/ | ||
|
||
\textbf{Author XY}: | ||
Conceptualization -- | ||
Data curation -- | ||
Formal Analysis -- | ||
Funding acquisition -- | ||
Investigation -- | ||
Methodology -- | ||
Project administration -- | ||
Resources -- | ||
Software -- | ||
Supervision -- | ||
Validation -- | ||
Visualization -- | ||
Writing - original draft -- | ||
Writing - review \& editing | ||
|
||
\section*{Data and Code Availability} | ||
|
||
A dataset of the model results is available at \href{zenodoTBA}{doi:zenodoTBA}. | ||
The code to reproduce the experiments is available at \href{https://github.com/repository}{github.com/repository}. | ||
|
||
% tidy with https://flamingtempura.github.io/bibtex-tidy/ | ||
\addcontentsline{toc}{section}{References} | ||
\renewcommand{\ttdefault}{\sfdefault} | ||
\bibliography{references} | ||
|
||
% supplementary information | ||
|
||
\newpage | ||
|
||
\makeatletter | ||
\renewcommand \thesection{S\@arabic\c@section} | ||
\renewcommand\thetable{S\@arabic\c@table} | ||
\renewcommand \thefigure{S\@arabic\c@figure} | ||
\makeatother | ||
\renewcommand{\citenumfont}[1]{S#1} | ||
\setcounter{equation}{0} | ||
\setcounter{figure}{0} | ||
\setcounter{table}{0} | ||
\setcounter{section}{0} | ||
|
||
|
||
\section{Supplementary Information} | ||
\label{sec:si} | ||
|
||
\input{sections/supplementary.tex} | ||
|
||
\addcontentsline{toc}{section}{Supplementary References} | ||
\renewcommand{\ttdefault}{\sfdefault} | ||
\bibliographyS{references} | ||
|
||
\end{document} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# SPDX-FileCopyrightText: Open Energy Transition gGmbH | ||
# | ||
# SPDX-License-Identifier: CC0-1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
% SPDX-FileCopyrightText: Open Energy Transition gGmbH | ||
% | ||
% SPDX-License-Identifier: MIT | ||
|
||
\lipsum[1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
% SPDX-FileCopyrightText: Open Energy Transition gGmbH | ||
% | ||
% SPDX-License-Identifier: MIT | ||
|
||
\lipsum[1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
% SPDX-FileCopyrightText: Open Energy Transition gGmbH | ||
% | ||
% SPDX-License-Identifier: MIT | ||
|
||
\lipsum[1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
% SPDX-FileCopyrightText: Open Energy Transition gGmbH | ||
% | ||
% SPDX-License-Identifier: MIT | ||
|
||
\lipsum[1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
% SPDX-FileCopyrightText: Open Energy Transition gGmbH | ||
% | ||
% SPDX-License-Identifier: MIT | ||
|
||
\lipsum[1] | ||
Blablabla said Nobody ~\cite{Nobody06}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
% SPDX-FileCopyrightText: Open Energy Transition gGmbH | ||
% | ||
% SPDX-License-Identifier: MIT | ||
|
||
\lipsum[1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
% SPDX-FileCopyrightText: Open Energy Transition gGmbH | ||
% | ||
% SPDX-License-Identifier: MIT | ||
|
||
\lipsum[1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# SPDX-FileCopyrightText: Open Energy Transition gGmbH | ||
# | ||
# SPDX-License-Identifier: CC0-1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# SPDX-FileCopyrightText: Open Energy Transition gGmbH | ||
# | ||
# SPDX-License-Identifier: MIT | ||
|
||
rule report: | ||
message: "Compile report." | ||
params: | ||
fn="report" | ||
input: | ||
tex="report/report.tex", | ||
bib="report/references.bib" | ||
output: "report/report.pdf" | ||
shell: | ||
""" | ||
pdflatex -output-directory report {input.tex} | ||
cd report; bibtex {params.fn}; cd .. | ||
pdflatex -output-directory report {input.tex} | ||
pdflatex -output-directory report {input.tex} | ||
""" |