diff --git a/.github/workflows/draft-paper.yml b/.github/workflows/draft-paper.yml new file mode 100644 index 0000000..75ed661 --- /dev/null +++ b/.github/workflows/draft-paper.yml @@ -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 diff --git a/README.md b/README.md index 6018b0d..aaba9b1 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/binder/data_requirement.json b/binder/data_requirement.json index 68fb543..410e0d0 100644 --- a/binder/data_requirement.json +++ b/binder/data_requirement.json @@ -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"} diff --git a/binder/requirements.txt b/binder/requirements.txt index 19c8cab..f674c1d 100644 --- a/binder/requirements.txt +++ b/binder/requirements.txt @@ -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 \ No newline at end of file diff --git a/binder/runtime.txt b/binder/runtime.txt new file mode 100644 index 0000000..1d5ee4a --- /dev/null +++ b/binder/runtime.txt @@ -0,0 +1 @@ +Python-3.8 \ No newline at end of file diff --git a/content/00-simple_markdown.md b/content/00-simple_markdown.md index 187011c..bc7e0aa 100644 --- a/content/00-simple_markdown.md +++ b/content/00-simple_markdown.md @@ -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. @@ -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. \ No newline at end of file +The `_config.yml` defines the majority Book configurations. Please visit the [official documentation]https://jupyterbook.org/customize/config.html?highlight=_config%20yml) for details. \ No newline at end of file diff --git a/content/01-simple_notebook.ipynb b/content/01-simple_notebook.ipynb index 441f563..91a850b 100644 --- a/content/01-simple_notebook.ipynb +++ b/content/01-simple_notebook.ipynb @@ -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", @@ -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", @@ -71,7 +73,7 @@ "metadata": { "celltoolbar": "Edit Metadata", "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -85,7 +87,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.5" + "version": "3.8.16" } }, "nbformat": 4, diff --git a/content/02-simple-myst.md b/content/02-simple-myst.md index 10474b0..f428b04 100644 --- a/content/02-simple-myst.md +++ b/content/02-simple-myst.md @@ -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. @@ -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() @@ -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')) -``` \ No newline at end of file +``` diff --git a/content/_config.yml b/content/_config.yml index 9537c58..fda9776 100644 --- a/content/_config.yml +++ b/content/_config.yml @@ -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") ####################################################################################### @@ -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" + ####################################################################################### diff --git a/content/_toc.yml b/content/_toc.yml index fc7049c..ab06c26 100644 --- a/content/_toc.yml +++ b/content/_toc.yml @@ -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 \ No newline at end of file diff --git a/images/neurolibre-logo.png b/content/neurolibre-logo.png similarity index 100% rename from images/neurolibre-logo.png rename to content/neurolibre-logo.png