Skip to content

Commit

Permalink
fix: bad links and refs
Browse files Browse the repository at this point in the history
  • Loading branch information
lwasser committed Oct 23, 2024
1 parent c956c99 commit 959204b
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 88 deletions.
12 changes: 0 additions & 12 deletions code-workflow-logic/about-python-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,6 @@ jupyter:
name: python3
---

:::{toctree}
:hidden:
:maxdepth: 2

About Python Functions <self>
write-python-functions
python-function-checks
python-functions-multi-parameters
python-conditionals
python-conditionals2
python-common-exceptions
:::


<!-- #region editable=true slideshow={"slide_type": ""} -->
Expand Down
36 changes: 36 additions & 0 deletions code-workflow-logic/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
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
---

# Optimize your code


:::{toctree}
:caption: functions & checks
:maxdepth: 2

about-python-functions
write-python-functions
python-functions-multi-parameters
python-function-checks
python-common-exceptions

:::

:::{toctree}
:caption: conditionals
:maxdepth: 2

python-conditionals
python-conditionals2

:::
7 changes: 3 additions & 4 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ TODO: let's merge this with the conditional lesson
:::{card} [✿ Share Code ✿](publish-share-code/intro)
:class-card: left-aligned

* [Share code on GitHub](share-code)
* [Get DOI with Zenodo](cite-code)
* [Share code on GitHub](share-your-code)
* [Get DOI with Zenodo](cite-your-code)

:::
::::
Expand All @@ -57,7 +57,6 @@ TODO: let's merge this with the conditional lesson
These lessons help scientists understand best practices and tools used in the Python ecosystem. We will be adding new lessons over the next year.

:::{toctree}
:hidden:
:caption: Clean Code
:maxdepth: 2

Expand All @@ -69,7 +68,7 @@ Clean Code <clean-modular-code/intro-clean-code>
:caption: Optimize Code
:maxdepth: 2

Optimize Code <code-workflow-logic/about-functions>
Optimize Code <code-workflow-logic/intro>
:::

:::{toctree}
Expand Down
37 changes: 24 additions & 13 deletions publish-share-code/cite-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,39 @@ kernelspec:

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

(cite-code)=
(cite-your-code)=
# Cite your code

[Share your code on an online platform like GitHub or GitLab](share-code) using an [open license](open-license) is a great way to share your code. It's also important to consider making your code citable. To understand citations, it's important to understand what a DOI is.
[Share your code on an online platform like GitHub or GitLab](share-your-code) using an [open license](open-license) is a great way to share your code. It's also important to consider making your code citable. To understand citations, it's important to understand what a DOI is.

## 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 reference content, even if the location of the content changes. DOIs are commonly used in academic publishing to ensure that citations remain valid and 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 reliably now or in future research.

## TODO Add a section on citation.cff files

## Ways to make your code citable

Add overview on using a platform like Zenodo - what is zenodo -- or publishing


(zenodo)=
## What is Zenodo?
TODO: Add more here

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


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

Expand All @@ -39,15 +61,4 @@ Both types of DOIs ensure your work is easily found and cited. CrossRef is more

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>
1 change: 1 addition & 0 deletions publish-share-code/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ kernelspec:
Intro <self>
Share your Code <share-code>
Cite your Code <cite-code>
Publish your Code <publish-code>
:::

:::{toctree}
Expand Down
57 changes: 0 additions & 57 deletions publish-share-code/share-code-github.md

This file was deleted.

4 changes: 2 additions & 2 deletions publish-share-code/share-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ kernelspec:

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

(share-code)=
(share-your-code)=
# Share Your Code

Sharing your code online using [open licenses](https://www.pyopensci.org/python-package-guide/documentation/repository-files/license-files.html) is a powerful way to make your work more open and collaborative, supporting the principles of open science. By openly sharing your code, you can set clear guidelines on how others can use, modify, and distribute it through licensing, ensuring that your contributions are respected.

When your code is hosted on a shared platform, others can easily download, install, and use it, making it more accessible and useful to the broader community. Additionally, you can set up proper citations for your code, giving contributors and yourself credit for the work and promoting transparency. [Learn more about setting up citation in our lesson on citing code.](cite-code)
When your code is hosted on a shared platform, others can easily download, install, and use it, making it more accessible and useful to the broader community. Additionally, you can set up proper citations for your code, giving contributors and yourself credit for the work and promoting transparency. [Learn more about setting up citation in our lesson on citing code.](cite-your-code)

There are several ways to share code.
1. You can post your code to an online repository like GitHub or GitLab.
Expand Down

0 comments on commit 959204b

Please sign in to comment.