Skip to content

Commit

Permalink
Merge pull request #6 from agahkarakuzu/main
Browse files Browse the repository at this point in the history
Resolve compatibility issues and improve the template
  • Loading branch information
agahkarakuzu authored Jul 19, 2023
2 parents 79b563e + 6eb231c commit 2ead4e4
Show file tree
Hide file tree
Showing 11 changed files with 63 additions and 22 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/draft-paper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
on: [push]

jobs:
paper:
runs-on: ubuntu-latest
name: Paper Draft
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build draft PDF
uses: neurolibre/neurolibre-draft-action@master
with:
journal: neurolibre
# This should be the path to the paper within your repo.
paper-path: paper.md
- name: Upload
uses: actions/upload-artifact@v1
with:
name: paper
# This is the output path where Pandoc will write the compiled
# PDF. Note, this should be the same directory as the input
# paper.md
path: paper.pdf
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## Preprint template

Template repository for NeuroLibre preprint submissions.
Template repository for NeuroLibre reproducibe preprint submissions.

### Step 1: Click `Use this template button` and give a name to your new repository
### Step 1: Click `Use this template button` and name your new repository

### Step 2: Do the following changes in [_config.yml](content/_config.yml)

Expand Down
2 changes: 1 addition & 1 deletion binder/data_requirement.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{ "src": "from nilearn import datasets; datasets.fetch_development_fmri(data_dir=_dst, n_subjects=1);",
"dataLayout": "neurolibre",
"projectName": "neurolibre_template"}
"projectName": "agah_template"}
7 changes: 3 additions & 4 deletions binder/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
numpy==1.18.4
scipy==1.5.4
plotly==4.14.0
nilearn==0.7.1
plotly==5.14.1
plotly-express==0.4.1
repo2data>=2.6.0
jupyter-book==0.14.0
1 change: 1 addition & 0 deletions binder/runtime.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Python-3.8
4 changes: 2 additions & 2 deletions content/00-simple_markdown.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## How to organize the preprint content?
# How to organize the preprint content?

NeuroLibre expects all the preprint content (except for `paper.md` and `preprint.md`) under
the `content` folder. You can add subfolders to organize your content as you see fit.
Expand All @@ -7,4 +7,4 @@ The `_toc.yml` file determines the structure of your Book. Please visit the [off

## How to configure Book settings?

The `_config.yml` defines the majority Book configurations. Please visit the [official documentation]9https://jupyterbook.org/customize/config.html?highlight=_config%20yml) for details.
The `_config.yml` defines the majority Book configurations. Please visit the [official documentation]https://jupyterbook.org/customize/config.html?highlight=_config%20yml) for details.
8 changes: 5 additions & 3 deletions content/01-simple_notebook.ipynb
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## How to make a code cell collapsible in the Jupyter Book? \n",
"# How to make a code cell collapsible in the Jupyter Book? \n",
"\n",
"1. In the title bar above: `View` --> `Cell Toolbar` --> `Edit Metadata`\n",
"\n",
Expand Down Expand Up @@ -53,6 +54,7 @@
"source": [
"import plotly.express as px\n",
"from plotly.offline import plot\n",
"from IPython.core.display import HTML\n",
"\n",
"# Example dataset \n",
"df = px.data.gapminder()\n",
Expand All @@ -71,7 +73,7 @@
"metadata": {
"celltoolbar": "Edit Metadata",
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -85,7 +87,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.5"
"version": "3.8.16"
}
},
"nbformat": 4,
Expand Down
12 changes: 8 additions & 4 deletions content/02-simple-myst.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
---
jupytext:
formats: md:myst
text_representation:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.11.5
kernelspec:
display_name: Python 3
language: python
name: python3
repository:
url: https://github.com/neurolibre/template
---

## What is MyST Markdown?
# What is MyST Markdown?

In addition to Jupyter Notebooks, Jupyter Book also supports a special flavour of Markdown called MyST (or Markedly Structured Text). It is designed to make it easier to create publishable computational documents written with Markdown notation.

Expand Down Expand Up @@ -44,6 +47,7 @@ The code cell below uses `Plotly` to generate a simple interactive figure. When
import plotly.express as px
from plotly.offline import plot
from IPython.core.display import HTML
# Example dataset
df = px.data.gapminder()
Expand All @@ -57,4 +61,4 @@ fig = px.scatter(df.query("year==2007"), x="gdpPercap", y="lifeExp", size="pop",
plot(fig, filename = 'example_figure.html')
display(HTML('example_figure.html'))
```
```
12 changes: 9 additions & 3 deletions content/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
title : "NeuroLibre preprint template" # The title of the book. Will be placed in the left navbar.
author : Robo Neuro # The author of the book
copyright : "2021" # Copyright year to be placed in the footer
logo : "../images/neurolibre-logo.png" # A path to the book logo
logo : "neurolibre-logo.png" # A path to the book logo
exclude_patterns : [] # Patterns to skip when building the book. Can be glob-style (e.g. "*skip.ipynb")

#######################################################################################
Expand All @@ -35,12 +35,18 @@ html:
# Launch button settings
launch_buttons:
notebook_interface : classic # The interface interactive links will activate ["classic", "jupyterlab"]
binderhub_url : https://binder.conp.cloud # The URL of the Neurolibre BinderHub
binderhub_url : https://test.conp.cloud # The URL of the Neurolibre BinderHub
thebe : false # Add a thebe button to pages (requires the repository to run on Binder)

repository:
url : https://github.com/neurolibre/template # The URL to your book's repository
url : https://github.com/agahkarakuzu/template # The URL to your book's repository
path_to_book : "content" # A path to your book's folder, relative to the repository root.
branch : main # Which branch of the repository should be used when creating links


html_theme_options:
logo:
image_light: "neurolibre-logo.png"
image_dark: "neurolibre-logo.png"

#######################################################################################
12 changes: 9 additions & 3 deletions content/_toc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
- file: 00-simple_markdown
- file: 01-simple_notebook
- file: 02-simple_myst
format: jb-book
root: 00-simple_markdown
parts:
- caption: Ipynb
chapters:
- file: 01-simple_notebook
- caption: MyST
chapters:
- file: 02-simple-myst
File renamed without changes

0 comments on commit 2ead4e4

Please sign in to comment.