Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(lessons): start at zenodo and gh #42

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clean-modular-code/intro-clean-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,4 +221,4 @@ Code formatters like:
* black
* ruff

<!-- #endregion -->
<!-- #endregion -->
2 changes: 1 addition & 1 deletion conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
},
# Increase this as lessons are added -
# set low to hide links to other pyos sites and allow nav between lessons
"header_links_before_dropdown": 1,
"header_links_before_dropdown": 2,
"use_edit_page_button": True,
"show_nav_level": 2,
"navigation_depth": 3,
Expand Down
8 changes: 8 additions & 0 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,11 @@ This living guide is updated tools and best practices evolve in the Python packa

Clean Code <clean-modular-code/intro-clean-code>
:::

:::{toctree}
:hidden:
:caption: Lessons
:maxdepth: 2

Publish Code <publish-share-code/intro>
:::
27 changes: 27 additions & 0 deletions publish-share-code/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
jupytext:
text_representation:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.16.4
kernelspec:
display_name: Python 3 (ipykernel)
language: python
name: python3
---

+++ {"editable": true, "slideshow": {"slide_type": ""}}

# Publish & share your code


:::{toctree}
:hidden:
:caption: Share code
:maxdepth: 2

Intro <self>
Zenodo <zenodo>
GitHub <share-code-github>
:::
57 changes: 57 additions & 0 deletions publish-share-code/share-code-github.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
jupytext:
text_representation:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.16.4
kernelspec:
display_name: Python 3 (ipykernel)
language: python
name: python3
---

+++ {"editable": true, "slideshow": {"slide_type": ""}}

(share-github)=
# Share your code on GitHub

Sharing your code on GitHub or another online version control platform, such as GitLab, is a great way to make your work available for others to see, use, and collaborate on.

Making your code openly available online promotes collaboration and transparency in support of open science.

GitHub and GitLab are also powerful collaboration tools. These platforms allow you to make your code open, and have tools that enable others to see your code, review changes, suggest changes, and open issues around broken or desired features.

Hosting code on GitHub helps you manage your projects, track changes, and keep your work organized over time.

## Cite your code

Even if you haven't published your code in an academic Journal, you can create a DOI that allows you to cite it using [Zenodo](zendo). While you can upload code and other types of documents to Zenodo at any time, if you are using GitHub, you can create a direct connection, which will not only provide a DOI for the GitHub repository but also allow you to create new sub-DOIs for every new version of your code that you make.


<!--
This is now commented out because it requires more git skills than I want to teach in our workshop.
## How to get started
There are several ways to place your code on GitHub. Here, we will show you a quick and dirty way to move your code to GitHub! The steps are
1. Make sure that you have a GitHub account
1. Create a repository on GitHub.com
2. Clone that repository
3. Once you have a clone, locally, create a new branch in the clone.
4. Copy your code over to the branch
5. Add & commit your code to the branch.
6. Push the code to GitHub!
And you're done!
TODO: add 5-7 min video on how this works
:::{note}
Another way is to create a repository locally
[Software Carpentry teaches you how to do this locally](https://swcarpentry.github.io/git-novice/03-create.html) but initializing a local. Directory and then pushing it to GitHub
:::
-->
50 changes: 50 additions & 0 deletions publish-share-code/zenodo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
jupytext:
text_representation:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.16.4
kernelspec:
display_name: Python 3 (ipykernel)
language: python
name: python3
---

+++ {"editable": true, "slideshow": {"slide_type": ""}}

# Publish your code with Zenodo


## What is a DOI?

A DOI, or Digital Object Identifier, is a unique, permanent identifier assigned to digital content such as academic papers, datasets, software, and other research outputs. It acts like a stable web link that always directs users to the specific content it refers to, even if the location of the content changes over time. DOIs are commonly used in academic publishing to ensure that citations remain valid and that the referenced materials are easily accessible. By using a DOI, creators can make their work more discoverable and citable, enabling others to locate and reference the material in future research reliably.


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

In research, making your work citable and easy to find is essential. That’s where DOIs (Digital Object Identifiers) come in. But not all DOIs are the same! Let’s look at two common types: CrossRef DOIs and Zenodo DOIs.

* **CrossRef DOI**: A CrossRef DOI is typically used for formal, peer-reviewed publications like journal articles, books, or conference papers. CrossRef DOIs help ensure that these published works are easy to cite and locate in academic literature. CrossRef DOI's can also be easily connected to your ORCID.

The Journal of Open Source Software (JOSS), a pyOpenSci partner, offers CrossRef DOI's for scientific software with research applications.

* **Zenodo DOI**: Zenodo allows you to create DOIs for a wider range of digital content, including datasets, software (like your GitHub repositories), preprints, and event presentations. Zenodo is perfect for making your code or data citable, even if it’s not part of a formal publication.

Both types of DOIs ensure your work is easily found and cited, but CrossRef is more focused on formal publications, while Zenodo is more flexible, covering a broader range of research outputs.

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


## How does Zenodo work?

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 release of your project. 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.

The video below will walk you through how to set this all up.

:::{important} 21 October 2024
This video is a DRAFT and will be updated over the next two months. A more polished version of it will be available soon.
:::


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