Skip to content

Commit dcf7c33

Browse files
committed
add: start at instructions for using zenodo
1 parent da72ea5 commit dcf7c33

File tree

9 files changed

+144
-26
lines changed

9 files changed

+144
-26
lines changed
5 MB
Loading

images/zenodo/zenodo-account.png

411 KB
Loading

images/zenodo/zenodo-badge.png

37.9 KB
Loading
306 KB
Loading
463 KB
Loading
47.2 KB
Loading

images/zenodo/zenodo-switch-on.png

81 KB
Loading
512 KB
Loading

publish-share-code/cite-code.md

Lines changed: 144 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,155 @@ kernelspec:
1414
+++ {"editable": true, "slideshow": {"slide_type": ""}}
1515

1616
(cite-your-code)=
17-
# Cite your code
17+
# Ways to Add a Citation to Your Code
1818

19-
[Sharing your code](share-your-code) is a great way to contribute to make your science more open. Making your code citable allows others to acknowledge your effort and build upon your work. Citations aren’t just for papers—they’re crucial for software and datasets too! Citing your code means others can easily give you credit and trace the source of key research outputs.
19+
[Sharing](share-your-code) and making your code **citable** helps others **acknowledge your work, build upon it, and give you proper credit**.
20+
21+
Citations ensure that code, software, and data receive proper recognition as part of the open scientific process. Others can easily credit your work and trace research outputs by citing your code.
22+
23+
:::{tip}
24+
<i class="fa-solid fa-rocket"></i> Want to maximize your code’s impact? **Host it on [GitHub or GitLab](share-your-code) with an [open license](open-license) and make it citable.**
25+
:::
26+
27+
28+
In this lesson, you will learn:
29+
30+
1. How to create a DOI using Zenodo and GitHub
31+
2. How to create a citation file to use on GitHub
32+
1. What a a DOI is
33+
34+
(zenodo)=
35+
## What is Zenodo?
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+
:::{admonition} pyOpensci on Zenodo
41+
:class: tip
42+
43+
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.
44+
:::
45+
46+
### How does Zenodo work?
47+
48+
Zenodo makes it easy to create a **DOI** for your GitHub repository, ensuring your code is **citable and discoverable**. To create a DOI for your repo you need to:
49+
50+
1. <i class="fas fa-link" style="color:#81c0aa;"></i> **Link your GitHub account** to Zenodo.
51+
2. <i class="fas fa-cogs" style="color:#81c0aa;"></i> **Enable your repository** in Zenodo’s settings.
52+
3. <i class="fas fa-box-open" style="color:#81c0aa;"></i> **Create a release on GitHub**—Zenodo will automatically generate a **DOI** and archive it.
53+
54+
Each release gets a unique DOI, while the repository keeps a persistent record, making it easy to track versions and credit your work.
55+
56+
## How to create a DOI for a Python package on GitHub
57+
58+
### Step 1: Setup Zenodo
59+
60+
1. Go to zenodo.org and sign in using your GitHub account
61+
2. Go to your profile drop-down and select “GitHub
62+
63+
64+
:::{figure} /images/zenodo/zenodo-account.png
65+
:alt: Text here
66+
67+
You should see a screen like the one below. If you‘ve never used Zenodo before it’s ok if you have no repos listed here!
68+
69+
:::
70+
71+
72+
When you select GitHub you might see a list of repositories if you've used Zenodo before or if it finds your repos automagically. Don't worry if you don't see that list yet, you may have to sync your account with GitHub.
73+
74+
75+
:::{figure} /images/zenodo/zenodo-github-repos.png
76+
:alt: text
77+
78+
79+
:::
80+
81+
Click the sync now button in the get started page to update your list of GitHub repos. The more repositories that you have access to, the longer this will take. It’s normal for it to take a few minutes and maybe 5 minutes or more.
82+
83+
:::{figure} /images/zenodo/zenodo-sync-repos.png
84+
:alt: text
85+
86+
87+
:::
2088

2189
:::{tip}
22-
[Placing your code on an online platform like GitHub or GitLab](share-your-code) using an [open license](open-license) is an effective way to share your code. Once it's online, it's important to think about making it citable.
90+
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.
91+
:::
92+
93+
Once your repos are synced, it's time to "flip the switch" or turn on a connection between GitHub and Zenodo for your Python package.
94+
95+
:::{figure} /images/zenodo/zenodo-flip-the-switch.png
96+
:alt: text
97+
98+
99+
:::
100+
101+
102+
:::{figure} /images/zenodo/zenodo-switch-on.png
103+
:alt: text
104+
105+
106+
:::
107+
108+
:::{figure} /images/zenodo/zenodo-switch-off.png
109+
:alt: text
110+
111+
112+
:::
113+
114+
### Step 2: Create a release of your package on GitHub
115+
116+
Head over to your repository on GitHub. The url should look something like this:
117+
118+
https://github.com/your-user-name/ff-2024-create-python-package
119+
Here is my fork: https://github.com/lwasser/ff-2024-create-python-package
120+
121+
Go to the releases tab in github. The url will look something like this (Replace my username with your github user name!):
122+
123+
https://github.com/lwasser/ff-2024-create-python-package/releases
124+
125+
Click the green Create a new release button
126+
127+
:::{figure} /images/zenodo/zenodo-switch-off.png
128+
:alt: text
129+
130+
131+
:::
132+
133+
Create a new tagged release!
134+
135+
You can either generate automatic release notes or type in notes yourself. Either is acceptable but for convenience today you could opt to generate release notes for this release!
136+
137+
When you are ready, scroll to the bottom of the page and click "publish release" 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.
138+
139+
:::{figure} /images/github/github-create-release.gif
140+
:alt: text
141+
142+
Once you are ready, you can create a release. Once you have created the release, zenodo will process it and create a badge for your repository. Notice that this screen cast is for a repo where a release already exists. The process is the same whether you have a release already or not!
143+
:::
144+
145+
### Step 3: Get your zenodo badge and add it to your project README file
146+
147+
Add your zenodo badge to your readme file in your repo!
148+
Important: be sure to use the cite all versions badge.
149+
150+
151+
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.
152+
153+
:::{figure} /images/zenodo/zenodo-badge.png
154+
:alt: text
155+
156+
23157
:::
24158

25159

26-
In this lesson you will learn about how to make your code citable once you've placed it online on a platform like GitHub. You will also learn the basics of
160+
## About citation.cff files
161+
162+
Now that you have a DOI, add a CITATION.cff file to make it easy for others to cite your package.
163+
Once you have a DOI, you can add a [citation.cff file](https://citation-file-format.github.io/) to your GitHub or GitLab repository. A `CITATION.cff` file standardizes citation information, making it easy for others to cite your work correctly.
164+
27165

28-
1. What a citable element (a DOI) is
29-
2. How you can use zenodo to create a DOI and connect that DOI to your GitHub repository.
30166

31167
To understand citations, it's important to understand what a DOI is.
32168

@@ -58,28 +194,9 @@ Both types of DOIs ensure your work is easily found and cited. CrossRef is more
58194

59195
By using the right DOI for your work, you help others find and cite it easily, no matter where or how it’s shared!
60196

61-
## About citation.cff files
62197

63-
Once you have a DOI, you can add a [citation.cff file](https://citation-file-format.github.io/) to your GitHub or GitLab repository. A `CITATION.cff` file standardizes citation information, making it easy for others to correctly cite your work.
64198

65-
(zenodo)=
66-
## What is Zenodo?
67-
68-
[Zenodo](https://zenodo.org/) is a free and open platform that allows researchers and scientists to share and archive their work. Zenodo enables you to publish datasets, software, and other research outputs while assigning a unique **DOI** to each, ensuring that your work is citable and easily discoverable.
69-
70-
Zenodo also integrates seamlessly with GitHub, allowing you to create DOIs for your code repositories with just a few clicks. And you can also create new versions of the DOI as you create code releases in your GitHub repo. These features make Zenodo a popular choice for researchers looking to share code and other digital content in a way that encourages proper citation and credit.
71199

72-
:::{admonition} pyOpensci onZenodo
73-
:class: tip
74-
75-
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!
76-
:::
77-
78-
### How does Zenodo work?
79-
80-
Creating a DOI for your GitHub repository using Zenodo is a straightforward way to ensure your code is citable and easily discoverable. Zenodo integrates seamlessly with GitHub, allowing you to generate a persistent DOI for any project release.
81-
82-
To start, link your GitHub account to Zenodo by authorizing access through the Zenodo website. Once connected, navigate to the Zenodo settings and enable the repository you want to archive. After pushing a new release on GitHub, Zenodo will automatically archive it and generate a unique DOI. This DOI can be included in your publications or shared with others, ensuring proper credit for your work. Zenodo also supports versioning, so each release will have its own DOI while maintaining a link to the overall repository.
83200

84201
The video below walks you through how to set this all up.
85202

@@ -89,5 +206,6 @@ This video is a draft. It will be updated over the next two months, and a more p
89206
:::
90207

91208

209+
:::{todo}
92210
<div style="padding:75% 0 0 0;position:relative;"><iframe src="https://player.vimeo.com/video/1021839955?badge=0&amp;autopause=0&amp;player_id=0&amp;app_id=58479" frameborder="0" allow="autoplay; fullscreen; picture-in-picture; clipboard-write" style="position:absolute;top:0;left:0;width:100%;height:100%;" title="zenodo-rough-cut"></iframe></div><script src="https://player.vimeo.com/api/player.js"></script>
93-
211+
:::

0 commit comments

Comments
 (0)