Skip to content

Commit b27fbb1

Browse files
authored
Module 5 exercise E (#50)
1 parent 4a52f62 commit b27fbb1

File tree

6 files changed

+284
-2
lines changed

6 files changed

+284
-2
lines changed
140 KB
Loading

modules/05-sharing-and-publishing/index.md

Lines changed: 249 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -816,13 +816,260 @@ Click the link to immediately open your website.
816816

817817
## Getting a DOI
818818

819-
TODO
819+
A {term}`DOI` can uniquely identify and track your research products, enabling easy
820+
citing and tracking of citations.
821+
DOIs can even be versioned, enabling citations to reference a research product at a
822+
specific point in time.
823+
824+
DOIs can be associated with your unique academic identity through the use of
825+
an {term}`ORCID`.
826+
827+
:::{important}
828+
A DOI and ORCID can help defend your work against {term}`scooping` by providing
829+
verifiable {term}`provenance` for your work, making it clear that your work came first.
830+
831+
They can also enable credit for the work to be more equitably distributed by crediting
832+
all forms of contributions.
833+
:::
834+
835+
We can automate the production of DOIs with GitHub and [Zenodo](https://zenodo.org/) (a
836+
**free** DOI registrar developed and operated by [CERN](https://home.cern/)).
820837

821838

822839
### 💪 Exercise E: Get a DOI for your published content on GitHub
823840

824-
TODO
841+
#### Create an ORCID
842+
843+
Visit the [ORCID registration page](https://orcid.org/register) and create an account.
844+
845+
Enter your **personal email** as your primary email.
846+
Be sure to also enter your institutional email as an additional email.
847+
You can more emails after you register.
848+
849+
850+
#### Sign up for Zenodo
851+
852+
Visit the [Zenodo signup page](https://zenodo.org/signup/) and sign up with either your
853+
GitHub account or ORCID.
854+
We recommend using GitHub, as you'll need to link your GitHub account either way.
855+
856+
857+
##### Link your GitHub account
858+
859+
If you didn't signup with GitHub, you'll need to link your GitHub account.
860+
861+
After you've signed in, click the username dropdown at the top-right of the Zenodo
862+
interface.
863+
864+
On the left panel, select "Linked accounts".
865+
866+
On the GitHub row, click "Connect".
867+
You may be prompted to log in, then you'll be prompted to accept some dialogs.
868+
869+
:::{important} 👀 You should notice...
870+
:class: simple
871+
:icon: false
872+
873+
Back in the Zenodo "Linked accounts" screen, a green checkmark will be
874+
displayed next to GitHub.
875+
:::
876+
877+
878+
879+
#### Enable auto-DOI for your repository on Zenodo
880+
881+
After you've signed in to Zenodo, click the username dropdown at the top-right of the
882+
Zenodo interface.
883+
884+
On the left panel, select "GitHub".
885+
886+
:::{important} 👀 You should notice...
887+
:class: simple
888+
:icon: false
889+
890+
...there is a large "Get started" display with a 3-step process you can follow to enable auto-DOI for a
891+
repository.
892+
893+
At the top right of this "Get started" box, there is a "Sync now" button.
894+
:::
895+
896+
Click "Sync now".
897+
It may take a moment to complete the sync.
898+
899+
:::{hint} Help, I received a `504` error!
900+
:class: dropdown
901+
902+
If you receive a `504` error,
903+
[this is common for users with large numbers of public repositories](https://github.com/zenodo/zenodo-rdm/issues/1118).
904+
Wait a few minutes and refresh the page; eventually your repository list will be updated
905+
:::
906+
907+
Find your repository in the list and flip the switch for that repository
908+
to "ON".
909+
910+
![](./zenodo-repository-enable.jpg)
911+
912+
913+
#### Create `CITATION.cff`
914+
915+
A `CITATION.cff` file is the project metadata that enables Zenodo to populate a DOI.
916+
917+
MyST can generate a `CITATION.cff` for you!
918+
But it needs to be told which documents to use to populate this metadata.
919+
920+
Edit `index.md` to add another export format of `"cff"`:
921+
922+
```{code} markdown
923+
:filename: index.md
924+
:linenos:
925+
:emphasize-lines: 14
926+
927+
---
928+
authors:
929+
- name: "Matt Fisher"
930+
affiliations:
931+
- "Schmidt Center for Data Science & Environment"
932+
- "University of California, Berkeley"
933+
934+
github: "mfisher87"
935+
orcid: "0000-0003-3260-5445"
936+
export:
937+
- format: "typst"
938+
template: "plain_typst_book"
939+
output: "paper.pdf"
940+
- format: "cff"
941+
---
942+
943+
# My document title
944+
```
945+
946+
Now we can build our `CITATION.cff` file with the command:
947+
948+
```bash
949+
myst build --cff
950+
```
951+
952+
:::{important} 👀 You should notice...
953+
:class: simple
954+
:icon: false
955+
956+
...the following output:
957+
958+
```
959+
📑 Exported CFF in 37 ms, copying to CITATION.cff
960+
```
961+
:::
962+
963+
As your project grows and changes, you can regenerate this file by repeating
964+
that command.
965+
966+
You can also edit your citation file by hand -- it's in the YAML format, which may be
967+
familiar to you now!
968+
Check out the
969+
[full CFF specification](https://citation-file-format.github.io/assets/pdf/cff-specifications-1.0.0.pdf)
970+
to see what kind of information you can populate!
971+
972+
973+
#### Create a GitHub release
974+
975+
Zenodo creates DOIs **only** when you create releases in GitHub.
976+
977+
Visit the URL for your GitHub repository's homepage.
978+
979+
Click the "Create a new release" button on the right sidebar.
980+
981+
![](./github-create-a-release.jpg)
982+
983+
Click the "Tag" dropdown and click "Create new tag".
984+
We'll use tags to create an ascending numerical sequence for our releases.
985+
For simplicity, let's enter the date in `YYYY.MM.DD` format, e.g. `2025.12.18`.
986+
987+
:::{hint} Versioning schemes
988+
:class: dropdown
989+
990+
There are many
991+
[versioning schemes](https://nesbitt.io/2024/06/24/from-zerover-to-semver-a-comprehensive-list-of-versioning-schemes-in-open-source.html)
992+
to choose from.
993+
The one we suggested above is called ["CalVer"](https://calver.org/) or "calendar versioning".
994+
995+
You may want to try an extremely common versioning scheme called
996+
["SemVer"](https://semver.org/) or "semantic versioning" enables embedding
997+
information about the implications of upgrading to any given version in the
998+
version number itself.
999+
:::
1000+
1001+
Give your release the title "Initial release".
1002+
1003+
You don't need to enter anything in the "Release notes" field, but we recommend
1004+
using the "Generate release notes" button as a starting place.
1005+
1006+
:::{hint} "Generate release notes" only generates one line of text!
1007+
:class: dropdown
1008+
1009+
This feature uses
1010+
[GitHub Pull Requests (PRs)](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests)
1011+
to generate a list of changes.
1012+
If you don't use PRs, you will only see a "Changelog" link, this is normal.
1013+
:::
1014+
1015+
Finally, **click "Publish release"**.
1016+
1017+
Zenodo will automatically generate your DOI now.
1018+
1019+
1020+
#### Add a badge to your README
1021+
1022+
Zenodo also automatically generates a beautiful DOI "badge" you can display on
1023+
your repository's README or anywhere else on the web.
1024+
1025+
To use the badge, click the username dropdown at the top-right of the Zenodo
1026+
interface, and select "GitHub".
1027+
1028+
Locate your repository on the list of enabled repositories and click on the
1029+
blue DOI badge:
1030+
1031+
![](./zenodo-doi-badge.jpg)
1032+
1033+
Copy the "Markdown" code and paste it into a new `README.md` file in your repository:
1034+
1035+
```{code} markdown
1036+
:filename: README.md
1037+
:linenos:
1038+
:emphasize-lines: 1
1039+
1040+
[![DOI](https://zenodo.org/badge/1100194185.svg)](https://doi.org/10.5281/zenodo.17716242)
1041+
1042+
# My exercise from the AGU workshop "Open Source Geospatial Workflows in the Cloud"
1043+
```
1044+
1045+
:::{important} 👀 You should notice...
1046+
:class: simple
1047+
:icon: false
1048+
1049+
...your repository homepage renders your `README.md` file with a pretty blue badge at the top 🤩
1050+
1051+
Clicking the badge takes you to the Zenodo homepage for your DOI.
1052+
From here, you can generate citations in a variety of formats or download your archived repository as a Zip file.
1053+
:::
1054+
1055+
:::{hint} Writing a useful README
1056+
:class: dropdown
1057+
1058+
The README is the first thing that a user sees when they interact with your repository.
1059+
1060+
Check out
1061+
[The Turing Way's README guide](https://book.the-turing-way.org/project-design/pd-overview/project-repo/project-repo-readme/)
1062+
for some thoughts that may help you make your README more useful.
1063+
:::
8251064

8261065
#### 🧠 What do we know now?
8271066

8281067
TODO
1068+
1069+
1070+
## 🎉 Congratulations, you're done!
1071+
1072+
Great job finishing this module.
1073+
If you'd like continued support in applying these skills to your work, please join the
1074+
[MyST community on Discord](https://discord.mystmd.org/) and/or ask questions in the
1075+
[CryoCloud Slack](https://book.cryointhecloud.com/index-3#slack-account)!
24.2 KB
Loading
13 KB
Loading

myst.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ project:
77
# authors: []
88
license: "MIT"
99
github: "https://github.com/geojupyter/workshop-open-source-geospatial"
10+
error_rules:
11+
- rule: "doi-link-valid"
12+
severity: "warn"
1013
exclude:
1114
- "_*"
1215
- "README.md"

reference/00-vocabulary.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,42 @@
11
# 🔍 Vocabulary
22

33
:::{glossary}
4+
DOI
5+
: A "Digital Object Identifier" is a string of characters (e.g.
6+
<https://doi.org/10.48550/arXiv.2310.00865>) that uniquely identifies an object (_any_
7+
object: physical, digital, or conceptual).
8+
[Read more on the official DOI website](https://www.doi.org/the-identifier/what-is-a-doi/).
9+
10+
411
Frontmatter
512
: A way of embedding metadata with [YAML](https://yaml.org/) at the front (top) of a
613
document.
714
Frontmatter can be embedded at the top of a Markdown document or in the first Markdown
815
cell of a Jupyter Notebook.
916
[Read more in the official MyST frontmatter docs](https://mystmd.org/guide/frontmatter).
17+
18+
Open science
19+
: A movement to make research products (papers, data, software) and processes accessible
20+
to everyone.
21+
A more stringent interpretation of open science involves enabling not just access, but
22+
collaboration, throughout the scientific process, not just at the end.
23+
[Read more on Wikipedia](https://en.wikipedia.org/wiki/Open_science).
24+
25+
ORCID
26+
: An "Open Researcher and Contributor ID" that uniquely identifies an academic
27+
contributor and enables tracking and associating their identity with {term}`DOIs <DOI>`.
28+
[Read more on the official ORCID website](https://info.orcid.org/what-is-orcid/).
29+
30+
Provenance
31+
: The history or chronology of a thing.
32+
The provenance of your research products can be established and verified by publishing
33+
the source code and creating {term}`DOIs <DOI>`.
34+
35+
Scooping
36+
: Being "beaten to the punch" or left in second place in the attempt to publish research
37+
or a discovery.
38+
This term is often used as a counter-argument for {term}`open science` by implying that
39+
sharing your work openly will result in plagiarism.
40+
For more, please read
41+
[Afraid of Scooping – Case Study on Researcher Strategies against Fear of Scooping in the Context of Open Science](https://doi.org/10.5334/dsj-2017-029).
1042
:::

0 commit comments

Comments
 (0)