Skip to content

Commit ff518ef

Browse files
authored
feat(vid): add youtube video to zenodo lesson (#126)
* feat(vid): add youtube video to zenodo lesson * fix: typo
1 parent c53b458 commit ff518ef

File tree

4 files changed

+37
-36
lines changed

4 files changed

+37
-36
lines changed

conf.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@
5858
"sphinxext.opengraph",
5959
"sphinx_favicon",
6060
"sphinx.ext.todo",
61-
#"sphinx_codeautolink",
61+
# "sphinx_codeautolink",
6262
"sphinx.ext.todo",
63+
"sphinxcontrib.youtube",
6364
]
6465

6566
# colon fence for card support in md
@@ -107,7 +108,7 @@
107108
"image_light": "logo-light-mode.png",
108109
"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",
109110
},
110-
# Increase this as lessons are added -
111+
# Increase this as lessons are added -
111112
# set low to hide links to other pyos sites and allow nav between lessons
112113
"header_links_before_dropdown": 3,
113114
"use_edit_page_button": True,
@@ -207,4 +208,4 @@
207208
# "codeautolink.match_block",
208209
# "codeautolink.match_name",
209210
# "codeautolink.failed_resolve",
210-
# ]
211+
# ]

noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
@nox.session
5151
def docs(session):
52-
"""Build the packaging guide."""
52+
"""Build the lessons repo."""
5353
session.install("-e", ".")
5454
session.run(
5555
SPHINX_BUILD,

package-share-code/publish-share-code/cite-code.md

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ kernelspec:
1414
+++ {"editable": true, "slideshow": {"slide_type": ""}}
1515

1616
(cite-your-code)=
17-
# How to Add a Citation to Your Code
1817

19-
[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
2019

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.
2121

2222
:::{admonition} What you will learn
2323
:class: note
@@ -27,34 +27,38 @@ kernelspec:
2727
* What a DOI is
2828
:::
2929

30-
31-
<i class="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+
<i class="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).**
3231

3332
(zenodo)=
33+
3434
## 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**.
3635

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+
:::
3842

3943
:::{admonition} pyOpensci on Zenodo
4044
:class: tip
4145

4246
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.
4347
:::
4448

45-
### How does Zenodo work?
49+
### How does Zenodo work?
4650

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:
4852

49-
1. <i class="fas fa-link" style="color:#81c0aa;"></i> **Link your GitHub account** to Zenodo.
50-
2. <i class="fas fa-cogs" style="color:#81c0aa;"></i> **Enable your repository** in Zenodo’s settings.
51-
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+
1. <i class="fas fa-link" style="color:#81c0aa;"></i> **Link your GitHub account** to Zenodo.
54+
2. <i class="fas fa-cogs" style="color:#81c0aa;"></i> **Enable your repository** in Zenodo’s settings.
55+
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.
5256

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.
5458

5559
## How to create a DOI for a Python package on GitHub
5660

57-
### Step 1: Login to Zenodo
61+
### Step 1: Login to Zenodo
5862

5963
1. Go to [zenodo.org](https://zenodo.org/) and sign in using your GitHub account
6064
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
6670

6771
:::
6872

69-
7073
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.
7174

7275
:::{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
7780

7881
### Step 2. <i class="fa-solid fa-arrows-rotate"></i> Sync your GitHub repos
7982

80-
Click the <kbd><i class="fa-solid fa-arrows-rotate"></i> Sync Now</kbd> button in the **<i class="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><i class="fa-solid fa-arrows-rotate"></i> Sync Now</kbd> button in the **<i class="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.
8384

85+
The sync process will take longer if you have many access to many repositories. This might mean waiting a few minutes or more.
8486

8587
:::{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.
8789
:::
8890

8991
### Step 3. <i class="fa-solid fa-toggle-off"></i> Flip the switch <i class="fa-solid fa-toggle-on"></i>
9092

91-
92-
Once your repos are synced, you can "<i class="fa-solid fa-toggle-off"></i> flip the switch <i class="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 "<i class="fa-solid fa-toggle-off"></i> flip the switch <i class="fa-solid fa-toggle-on"></i>" or turn on a connection between GitHub and Zenodo for your Python package.
9394

9495
:::{figure} /images/zenodo/zenodo-flip-the-switch.png
9596
:alt: text
9697

97-
9898
:::
9999

100100
:::{figure} /images/zenodo/zenodo-switch-off.png
@@ -106,22 +106,21 @@ Once your repos are synced, you can turn "on" the connection between GitHub and
106106
:::{figure} /images/zenodo/zenodo-switch-on.png
107107
:alt: text
108108

109-
Once Zenoodo is connected to GitHub, the toggle will say <kbd>On <i class="fa-solid fa-toggle-on"></i></kbd>
109+
Once Zenodo is connected to GitHub, the toggle will say <kbd>On <i class="fa-solid fa-toggle-on"></i></kbd>
110110
:::
111111

112+
### Step 4: Create a release of your package on GitHub
112113

113-
### Step 4: Create a release of your package on GitHub
114-
115-
Head over to your repository on GitHub.
114+
Head over to your repository on GitHub.
116115

117116
* Go to the releases tab in GitHub. The URL will look something like this:
118-
* `https://github.com/your-gh-username/ff-2024-create-python-package/releases
117+
* `https://github.com/your-gh-username/ff-2024-create-python-package/releases
119118
238636`
120119

121120
* Click the <kbd style="background-color: #238636; color:#fff; padding:.5em;">Create new release</kbd> button
122121
* Create a new tagged release
123122

124-
You can generate automatic release notes or type in notes yourself.
123+
You can generate automatic release notes or type in notes yourself.
125124

126125
* When you are ready to publish your release, scroll to the bottom of the page and click <kbd style="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.
127126

@@ -133,7 +132,7 @@ Once you are ready, you can create a release. Once you have created the release,
133132

134133
### Step 5: Add your Zenodo badge in markdown to your project README file
135134

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.
137136

138137
:::{important}
139138
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
142141
:::{figure} /images/zenodo/zenodo-badge.png
143142
:alt: text
144143

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.
146145
:::
147146

148147
### 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
160159

161160
There are multiple ways to get a DOI for your work and to make your code citable. Each way has its own benefits:
162161

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.
165164

166165
### CrossRef vs. Zenodo DOIs - What's the difference?
167166

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ dependencies = [
2626
"pandas",
2727
"sphinx-codeautolink",
2828
"rich",
29+
"sphinxcontrib-youtube",
2930
]
3031

3132
[project.optional-dependencies]
@@ -54,4 +55,4 @@ skip = "./.git,./.nox,./_static,./_build,codespell-ignore.txt,*.svg"
5455

5556
[tool.jupytext]
5657
# Pair ipynb notebooks to py:percent text notebooks
57-
formats = "ipynb,myst"
58+
formats = "ipynb,myst"

0 commit comments

Comments
 (0)