Skip to content

Commit

Permalink
Merge pull request #2879 from galaxyproject/update-r-notebooks
Browse files Browse the repository at this point in the history
Easier link to notebook, better tagging
  • Loading branch information
shiltemann committed Oct 19, 2021
2 parents 738506e + 2419020 commit ba184c3
Show file tree
Hide file tree
Showing 14 changed files with 53 additions and 28 deletions.
6 changes: 6 additions & 0 deletions _layouts/tutorial_hands_on.html
Expand Up @@ -181,6 +181,12 @@ <h3>{% icon comment aria=false %} {{locale['best-in-jupyter'] | default: "Best v
<li>Select the notebook that appears in the list of files on the left.</li>
</ol>
</p>
<p><b>Downloading the notebook</b>
<ol>
<li>Right click this link: <a href="{{ site.url }}{{ site.baseurl }}/{{ page.path }}.ipynb">tutorial.ipynb</a></li>
<li>Save Link As..</li>
</ol>
</p>
</blockquote>
{% endif %}

Expand Down
4 changes: 3 additions & 1 deletion _plugins/notebook-page.rb
Expand Up @@ -239,7 +239,7 @@ def renderMarkdownCells(site, notebook, metadata, page)

def generate(site)
if find_executable('notedown').nil?
puts "We could not find the notedown executable, so, notebooks will not be rendered."
puts "[GTN/Notebooks] We could not find the notedown executable, so, notebooks will not be rendered."
return
end

Expand Down Expand Up @@ -267,6 +267,8 @@ def generate(site)
notebook = fixRNotebook(notebook)
end

puts "[GTN/Notebooks] Rendering #{notebook_language} #{fn}"

# Here we loop over the markdown cells and render them to HTML. This
# allows us to get rid of classes like {: .tip} that would be left in
# the output by Jupyter's markdown renderer, and additionally do any
Expand Down
2 changes: 1 addition & 1 deletion _plugins/sitemap.rb
Expand Up @@ -5,7 +5,7 @@ class SitemapGenerator < Generator
safe true

def generate(site)
puts "Generating Sitemap"
puts "[GTN/Sitemap] Generating"
result = '<?xml version="1.0" encoding="UTF-8"?>'
result += '<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'

Expand Down
10 changes: 10 additions & 0 deletions _plugins_dev/notebook-fake.rb
@@ -0,0 +1,10 @@
module Jekyll
class JupyterNotebookGenerator < Generator
safe true

def generate(site)
puts "[GTN/Notebooks] Disabled"
end
end
end

3 changes: 3 additions & 0 deletions topics/data-science/tutorials/cli-advanced/tutorial.md
Expand Up @@ -67,6 +67,9 @@ contributors:
- carpentries
- hexylena
- bazante1
tags:
- jupyter-notebook
- bash
---

This tutorial will walk you through the basics of how to use the Unix command line.
Expand Down
2 changes: 2 additions & 0 deletions topics/data-science/tutorials/cli-bashcrawl/tutorial.md
Expand Up @@ -31,6 +31,8 @@ contributors:
- hexylena
tags:
- game
- jupyter-notebook
- bash
---

This is not a tutorial like most GTN content but a fun exercise for you to play around and learn a bit about the command line, and hopefully re-inforce the skills you covered in Basic and Advanced CLI skills.
Expand Down
3 changes: 3 additions & 0 deletions topics/data-science/tutorials/cli-basics/tutorial.md
Expand Up @@ -67,6 +67,9 @@ contributors:
- carpentries
- hexylena
- bazante1
tags:
- jupyter-notebook
- bash
---

This tutorial will walk you through the basics of how to use the Unix command line.
Expand Down
3 changes: 3 additions & 0 deletions topics/data-science/tutorials/r-advanced/tutorial.md
Expand Up @@ -39,11 +39,14 @@ key_points:
- Use the `dplyr` package to manipulate data frames.
- Pipes can be used to combine simple operations into complex procedures.
subtopic: r
priority: 2
contributors:
- carpentries
- bebatut
- fpsom
- tobyhodges
tags:
- R
---

# Introduction
Expand Down
2 changes: 2 additions & 0 deletions topics/data-science/tutorials/r-basics/tutorial.md
Expand Up @@ -30,7 +30,9 @@ key_points:
- It is important to understand how data are organised by R in a given object type (e.g. numeric, character, logical, etc.) and how the mode of that type determines how R will operate on that data.
tags:
- interactive-tools
- R
subtopic: r
priority: 1
contributors:
- carpentries
- bebatut
Expand Down
16 changes: 4 additions & 12 deletions topics/data-science/tutorials/sql-advanced/tutorial.md
Expand Up @@ -83,6 +83,10 @@ notebook:

abbreviations:
SQL: "Structured Query Language"

tags:
- SQL
- jupyter-notebook
---

> ### {% icon comment %} Comment
Expand Down Expand Up @@ -334,7 +338,6 @@ this query:
{: .question}

```sql
%%sql
-- Try solutions here!
```

Expand Down Expand Up @@ -362,7 +365,6 @@ this query:
{: .question}

```sql
%%sql
-- Try solutions here!
```

Expand Down Expand Up @@ -410,7 +412,6 @@ this query:
{: .question}

```sql
%%sql
-- Try solutions here!
```

Expand All @@ -431,7 +432,6 @@ this query:
{: .question}

```sql
%%sql
-- Try solutions here!
```

Expand Down Expand Up @@ -591,7 +591,6 @@ SELECT rowid, * FROM Person;
{: .question}

```sql
%%sql
-- Try solutions here!
```

Expand All @@ -616,7 +615,6 @@ SELECT rowid, * FROM Person;
{: .question}

```sql
%%sql
-- Try solutions here!
```

Expand All @@ -631,7 +629,6 @@ SELECT rowid, * FROM Person;
{: .question}

```sql
%%sql
-- Try solutions here!
```

Expand Down Expand Up @@ -675,7 +672,6 @@ SELECT rowid, * FROM Person;
{: .question}

```sql
%%sql
-- Try solutions here!
```

Expand Down Expand Up @@ -769,7 +765,6 @@ the tool shapes the hand that shapes the tool.
{: .question}

```sql
%%sql
-- Try solutions here!
```

Expand All @@ -788,7 +783,6 @@ the tool shapes the hand that shapes the tool.
{: .question}

```sql
%%sql
-- Try solutions here!
```

Expand Down Expand Up @@ -975,7 +969,6 @@ this technique is outside the scope of this chapter.
{: .question}

```sql
%%sql
-- Try solutions here!
```

Expand Down Expand Up @@ -1005,7 +998,6 @@ this technique is outside the scope of this chapter.
{: .question}

```sql
%%sql
-- Try solutions here!
```

Expand Down
18 changes: 4 additions & 14 deletions topics/data-science/tutorials/sql-basic/tutorial.md
Expand Up @@ -64,6 +64,10 @@ notebook:

abbreviations:
SQL: "Structured Query Language"

tags:
- SQL
- jupyter-notebook
---

> ### {% icon comment %} Comment
Expand Down Expand Up @@ -260,7 +264,6 @@ the convention that we will use for this lesson.
{: .question}

```sql
%%sql
-- Try solutions here!
```

Expand Down Expand Up @@ -324,7 +327,6 @@ SELECT * FROM Person;


```sql
%%sql
-- Try solutions here!
```

Expand All @@ -346,7 +348,6 @@ SELECT * FROM Person;
{: .question}

```sql
%%sql
-- Try solutions here!
```

Expand Down Expand Up @@ -484,7 +485,6 @@ SELECT DISTINCT quant, person FROM Survey ORDER BY quant ASC;
{: .question}

```sql
%%sql
-- Try solutions here!
```

Expand All @@ -510,7 +510,6 @@ SELECT DISTINCT quant, person FROM Survey ORDER BY quant ASC;
{: .question}

```sql
%%sql
-- Try solutions here!
```

Expand Down Expand Up @@ -740,7 +739,6 @@ not to the entire rows as they are being processed.
{: .question}

```sql
%%sql
-- Try solutions here!
```

Expand All @@ -764,7 +762,6 @@ not to the entire rows as they are being processed.
{: .question}

```sql
%%sql
-- Try solutions here!
```

Expand All @@ -789,7 +786,6 @@ not to the entire rows as they are being processed.
{: .question}

```sql
%%sql
-- Try solutions here!
```

Expand Down Expand Up @@ -877,7 +873,6 @@ issues.
{: .question}

```sql
%%sql
-- Try solutions here!
```

Expand Down Expand Up @@ -929,7 +924,6 @@ issues.
{: .question}

```sql
%%sql
-- Try solutions here!
```

Expand Down Expand Up @@ -966,7 +960,6 @@ issues.
{: .question}

```sql
%%sql
-- Try solutions here!
```

Expand Down Expand Up @@ -1114,7 +1107,6 @@ detail in [the next section](#).
{: .question}

```sql
%%sql
-- Try solutions here!
```

Expand Down Expand Up @@ -1149,7 +1141,6 @@ detail in [the next section](#).
{: .question}

```sql
%%sql
-- Try solutions here!
```

Expand All @@ -1167,6 +1158,5 @@ detail in [the next section](#).
{: .question}

```sql
%%sql
-- Try solutions here!
```
2 changes: 2 additions & 0 deletions topics/data-science/tutorials/sql-game/tutorial.md
Expand Up @@ -28,6 +28,8 @@ contributors:
- NUKnightLab
tags:
- game
- SQL
- jupyter-notebook
---

This is not a tutorial like most GTN content but a fun exercise for you to play around and learn a bit about SQL in a more 'practical', and hopefully re-inforce the skills you covered in Basic and Advanced SQL skills. It makes use of the [NUKnightLab/sql-mysteries](https://github.com/NUKnightLab/sql-mysteries) SQL murder mystery project and released under open licenses:
Expand Down
5 changes: 5 additions & 0 deletions topics/data-science/tutorials/sql-python/tutorial.md
Expand Up @@ -33,6 +33,11 @@ subtopic: sql

notebook:
language: python

tags:
- SQL
- Python
- jupyter-notebook
---

> ### {% icon comment %} Comment
Expand Down
5 changes: 5 additions & 0 deletions topics/data-science/tutorials/sql-r/tutorial.md
Expand Up @@ -38,6 +38,11 @@ subtopic: sql

notebook:
language: r

tags:
- SQL
- R
- jupyter-notebook
---

> ### {% icon comment %} Comment
Expand Down

0 comments on commit ba184c3

Please sign in to comment.