From 994996a2079b93527c59fa3a1020d1ea6b110bea Mon Sep 17 00:00:00 2001 From: Leah Wasser Date: Mon, 21 Oct 2024 17:51:57 -0600 Subject: [PATCH] feat(lessons): start at zenodo and gh --- clean-modular-code/intro-clean-code.md | 2 +- conf.py | 2 +- index.md | 8 ++++ publish-share-code/intro.md | 27 ++++++++++++ publish-share-code/share-code-github.md | 57 +++++++++++++++++++++++++ publish-share-code/zenodo.md | 50 ++++++++++++++++++++++ 6 files changed, 144 insertions(+), 2 deletions(-) create mode 100644 publish-share-code/intro.md create mode 100644 publish-share-code/share-code-github.md create mode 100644 publish-share-code/zenodo.md diff --git a/clean-modular-code/intro-clean-code.md b/clean-modular-code/intro-clean-code.md index de621ec..b52c177 100644 --- a/clean-modular-code/intro-clean-code.md +++ b/clean-modular-code/intro-clean-code.md @@ -221,4 +221,4 @@ Code formatters like: * black * ruff - \ No newline at end of file + diff --git a/conf.py b/conf.py index 56175c5..2400b9d 100644 --- a/conf.py +++ b/conf.py @@ -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, diff --git a/index.md b/index.md index 8950f71..0a0239e 100644 --- a/index.md +++ b/index.md @@ -37,3 +37,11 @@ This living guide is updated tools and best practices evolve in the Python packa Clean Code ::: + +:::{toctree} +:hidden: +:caption: Lessons +:maxdepth: 2 + +Publish Code +::: diff --git a/publish-share-code/intro.md b/publish-share-code/intro.md new file mode 100644 index 0000000..2f6769c --- /dev/null +++ b/publish-share-code/intro.md @@ -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 +Zenodo +GitHub +::: diff --git a/publish-share-code/share-code-github.md b/publish-share-code/share-code-github.md new file mode 100644 index 0000000..7901a0d --- /dev/null +++ b/publish-share-code/share-code-github.md @@ -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. + + + diff --git a/publish-share-code/zenodo.md b/publish-share-code/zenodo.md new file mode 100644 index 0000000..d70a173 --- /dev/null +++ b/publish-share-code/zenodo.md @@ -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. +::: + + +