You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: conf.py
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -58,8 +58,9 @@
58
58
"sphinxext.opengraph",
59
59
"sphinx_favicon",
60
60
"sphinx.ext.todo",
61
-
#"sphinx_codeautolink",
61
+
#"sphinx_codeautolink",
62
62
"sphinx.ext.todo",
63
+
"sphinxcontrib.youtube",
63
64
]
64
65
65
66
# colon fence for card support in md
@@ -107,7 +108,7 @@
107
108
"image_light": "logo-light-mode.png",
108
109
"alt_text": "pyOpenSci Open Source Lessons. The pyOpenSci logo is a purple flower with pyOpenSci under it. The o in open sci is the center of the flower",
109
110
},
110
-
# Increase this as lessons are added -
111
+
# Increase this as lessons are added -
111
112
# set low to hide links to other pyos sites and allow nav between lessons
[Sharing](share-your-code) and making your code **citable** supports others **acknowledge your work, build upon it, and give you credit**. Citation further supports making workflows open and documenting all parts of the scientific process.
18
+
# How to Add a Citation to Your Code
20
19
20
+
[Sharing](share-your-code) and making your code **citable** supports others **acknowledge your work, build upon it, and give you credit**. Citation further supports making workflows open and documenting all parts of the scientific process.
21
21
22
22
:::{admonition} What you will learn
23
23
:class: note
@@ -27,34 +27,38 @@ kernelspec:
27
27
* What a DOI is
28
28
:::
29
29
30
-
31
-
<iclass="fa-solid fa-rocket"></i> This lesson assumes that your code is already **hosted on [GitHub or GitLab](share-your-code) with an [open license](open-license).**
30
+
<iclass="fa-solid fa-rocket"></i> This lesson assumes that your code is already **hosted on [GitHub or GitLab](share-your-code) with an [open license](open-license).**
32
31
33
32
(zenodo)=
33
+
34
34
## What is Zenodo?
35
-
[Zenodo](https://zenodo.org/) is a free, open platform for sharing and archiving research outputs, including datasets and software. It assigns a unique **DOI** to each item, making your work **citable and easily discoverable**.
36
35
37
-
Zenodo integrates with GitHub, allowing you to generate DOIs for your repositories in just a few clicks. It also supports versioning, so each code release gets an updated DOI. These features make Zenodo a go-to choice for researchers looking to share their work and receive proper credit.
36
+
[Zenodo](https://zenodo.org/) is a free, open platform for sharing and archiving research outputs, including datasets and software. It assigns a unique **DOI** to each item, making your work **citable and easily discoverable**.
37
+
38
+
Zenodo integrates with GitHub, allowing you to generate DOIs for your repositories in just a few clicks. It also supports versioning, so each code release gets an updated DOI. These features make Zenodo a go-to choice for researchers looking to share their work and receive proper credit.
39
+
40
+
:::{youtube} 1pI4QU-7c98
41
+
:::
38
42
39
43
:::{admonition} pyOpensci on Zenodo
40
44
:class: tip
41
45
42
46
pyOpenSci has a [Zenodo community](https://zenodo.org/communities/pyopensci/records?q=&l=list&p=1&s=10&sort=newest) where we "publish" talks that the community gives about the organization.
43
47
:::
44
48
45
-
### How does Zenodo work?
49
+
### How does Zenodo work?
46
50
47
-
[Zenodo](https://zenodo.org/) makes creating a **DOI** for your GitHub repository easy, ensuring your code is **citable and discoverable**. To create a DOI for your repo, you need to:
51
+
[Zenodo](https://zenodo.org/) makes creating a **DOI** for your GitHub repository easy, ensuring your code is **citable and discoverable**. To create a DOI for your repo, you need to:
48
52
49
-
1. <iclass="fas fa-link"style="color:#81c0aa;"></i> **Link your GitHub account** to Zenodo.
50
-
2. <iclass="fas fa-cogs"style="color:#81c0aa;"></i> **Enable your repository** in Zenodo’s settings.
51
-
3. <iclass="fas fa-box-open"style="color:#81c0aa;"></i> **Create a release on GitHub**—Zenodo will automatically generate a **DOI** and archive it.
53
+
1. <iclass="fas fa-link"style="color:#81c0aa;"></i> **Link your GitHub account** to Zenodo.
54
+
2. <iclass="fas fa-cogs"style="color:#81c0aa;"></i> **Enable your repository** in Zenodo’s settings.
55
+
3. <iclass="fas fa-box-open"style="color:#81c0aa;"></i> **Create a release on GitHub**—Zenodo will automatically generate a **DOI** and archive it.
52
56
53
-
Each release gets a unique DOI, while the repository keeps a persistent record, making it easy to track versions and credit your work.
57
+
Each release gets a unique DOI, while the repository keeps a persistent record, making it easy to track versions and credit your work.
54
58
55
59
## How to create a DOI for a Python package on GitHub
56
60
57
-
### Step 1: Login to Zenodo
61
+
### Step 1: Login to Zenodo
58
62
59
63
1. Go to [zenodo.org](https://zenodo.org/) and sign in using your GitHub account
60
64
2. Go to your profile drop-down and select “GitHub
@@ -66,7 +70,6 @@ You should see a screen like the one below. If you‘ve never used Zenodo before
66
70
67
71
:::
68
72
69
-
70
73
When you go to the Zenodo GitHub page, you will see a list of repositories if you've used Zenodo before and synced your repos. If you haven't yet synced them, read on to learn how.
71
74
72
75
:::{figure} /images/zenodo/zenodo-sync-repos.gif
@@ -77,24 +80,21 @@ Go to your account drop down and click on GitHub. You will see a list of reposit
77
80
78
81
### Step 2. <iclass="fa-solid fa-arrows-rotate"></i> Sync your GitHub repos
79
82
80
-
Click the <kbd><iclass="fa-solid fa-arrows-rotate"></i> Sync Now</kbd> button in the **<iclass="fa-brands fa-github"></i> Get started** section of the page to update the displayed list of GitHub repos. The repos that Zenodo fetches are the ones that you have ownership of or write access to.
81
-
82
-
The more repositories that you have access to, the longer the sync process will take. It’s normal for it to take a few minutes and maybe 5 minutes or more.
83
+
Click the <kbd><iclass="fa-solid fa-arrows-rotate"></i> Sync Now</kbd> button in the **<iclass="fa-brands fa-github"></i> Get started** section of the page to update the displayed list of GitHub repos. The repos that Zenodo fetches are the ones that you have ownership of or write access to.
83
84
85
+
The sync process will take longer if you have many access to many repositories. This might mean waiting a few minutes or more.
84
86
85
87
:::{tip}
86
-
If you have access to many GitHub repositories through both your own account and other organization accounts that you may have access too, the sync button may take a long time to run. It could take 5 minutes or more for someone with hundreds to thousands of repos). Be patient.
88
+
If you have access to many GitHub repositories through both your own account and other organization accounts that you may have access to, the sync button may take a long time to run. It could take 5 minutes or more for someone with hundreds to thousands of repos). Be patient.
87
89
:::
88
90
89
91
### Step 3. <iclass="fa-solid fa-toggle-off"></i> Flip the switch <iclass="fa-solid fa-toggle-on"></i>
90
92
91
-
92
-
Once your repos are synced, you can "<iclass="fa-solid fa-toggle-off"></i> flip the switch <iclass="fa-solid fa-toggle-on"></i>" or turn on a connection between GitHub and Zenodo for your Python package.
93
+
Once your repos are synced, you can "<iclass="fa-solid fa-toggle-off"></i> flip the switch <iclass="fa-solid fa-toggle-on"></i>" or turn on a connection between GitHub and Zenodo for your Python package.
* Click the <kbdstyle="background-color: #238636; color:#fff; padding:.5em;">Create new release</kbd> button
122
121
* Create a new tagged release
123
122
124
-
You can generate automatic release notes or type in notes yourself.
123
+
You can generate automatic release notes or type in notes yourself.
125
124
126
125
* When you are ready to publish your release, scroll to the bottom of the page and click <kbdstyle="background-color: #238636; color:#fff; padding:.5em;">Publish Release</kbd>. When you publish your release, Zendo will begin to do its job—generating a DOI for the repository and the release and processing the metadata for the release.
127
126
@@ -133,7 +132,7 @@ Once you are ready, you can create a release. Once you have created the release,
133
132
134
133
### Step 5: Add your Zenodo badge in markdown to your project README file
135
134
136
-
After you create a release, you will see a badge on the Zenodo website. If you click on it, it will provide you with a copyable badge format for markdown and other formats. Copy the badge in markdown format. You will add this to your readme file.
135
+
After you create a release, you will see a badge on the Zenodo website. If you click on it, it will provide you with a copyable badge format for markdown and other formats. Copy the badge in markdown format. You will add this to your readme file.
137
136
138
137
:::{important}
139
138
Be sure to use the cite-all versions badge, which will always resolve to the most current DOI rather than a specific point in time.
@@ -142,7 +141,7 @@ Be sure to use the cite-all versions badge, which will always resolve to the mos
142
141
:::{figure} /images/zenodo/zenodo-badge.png
143
142
:alt: text
144
143
145
-
Once you have created a GitHub release, you will see a badge next to the repository with a DOI. You can click on that badge to get a copy-able markdown version of the rendered badge that you can add to your README file.
144
+
Once you have created a GitHub release, you will see a badge next to the repository with a DOI. You can click on that badge to get a copy-able markdown version of the rendered badge that you can add to your README file.
146
145
:::
147
146
148
147
### Step 6: Optional--Add your DOI to the GitHub repo: the citation.cff file
@@ -160,8 +159,8 @@ By using a DOI, you can make your work more discoverable and citable, enabling o
160
159
161
160
There are multiple ways to get a DOI for your work and to make your code citable. Each way has its own benefits:
162
161
163
-
1.**Write and publish a paper about your code in a journal like JOSS (Journal of Open Source Software) via pyOpenSci** if you have written a Python package or another methods-focused scientific Journal. If you go the publication route, you will receive a cross-ref DOI that can be easily connected to your ORCID.
164
-
1.**Use a platform like [Zenodo](zenodo)**. If you use Zenodo to create a DOI for your work, you will receive a DOI that is not CrossRef compatible. However, you can still add entries for that DOI in your ORCID profile page.
162
+
1.**Write and publish a paper about your code in a journal like JOSS (Journal of Open Source Software) via pyOpenSci** if you have written a Python package or another methods-focused scientific Journal. If you go the publication route, you will receive a cross-ref DOI that can be easily connected to your ORCID.
163
+
1.**Use a platform like [Zenodo](zenodo)**. If you use Zenodo to create a DOI for your work, you will receive a DOI that is not CrossRef compatible. However, you can still add entries for that DOI in your ORCID profile page.
165
164
166
165
### CrossRef vs. Zenodo DOIs - What's the difference?
0 commit comments