diff --git a/.github/workflows/binder.yml b/.github/workflows/binder.yml new file mode 100644 index 0000000..296df67 --- /dev/null +++ b/.github/workflows/binder.yml @@ -0,0 +1,18 @@ +name: Build Notebook Container + +on: [pull_request] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout PR + uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: test build + uses: jupyterhub/repo2docker-action@master + with: + NO_PUSH: 'true' + IMAGE_NAME: "neurohackademy/repo2docker-test" \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index d6783e2..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,33 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: CI - -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - # Runs a single command using the runners shell - - name: Run a one-line script - run: echo Hello, world! - - # Runs a set of commands using the runners shell - - name: Run a multi-line script - run: | - echo Add other actions to build, - echo test, and deploy your project. diff --git a/README.md b/README.md index b667e6b..3cd11d8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ # Neurohackademy 2020 curriculum This repository contains the materials for the talks/tutorials in -NeuroHackademy 2020. Each folder corresponds to one talk/tutorial. \ No newline at end of file +NeuroHackademy 2020. Each folder corresponds to one talk/tutorial. + + +[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/neurohackademy/nh2020-curriculum/master) diff --git a/binder/.github/workflows/binder.yml b/binder/.github/workflows/binder.yml new file mode 100644 index 0000000..296df67 --- /dev/null +++ b/binder/.github/workflows/binder.yml @@ -0,0 +1,18 @@ +name: Build Notebook Container + +on: [pull_request] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout PR + uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: test build + uses: jupyterhub/repo2docker-action@master + with: + NO_PUSH: 'true' + IMAGE_NAME: "neurohackademy/repo2docker-test" \ No newline at end of file diff --git a/binder/apt.txt b/binder/apt.txt new file mode 100644 index 0000000..cae8558 --- /dev/null +++ b/binder/apt.txt @@ -0,0 +1,4 @@ +dnsutils +iputils-ping +vim +nano diff --git a/binder/environment.yml b/binder/environment.yml new file mode 100644 index 0000000..8792a5c --- /dev/null +++ b/binder/environment.yml @@ -0,0 +1,74 @@ +name: nh +channels: + - conda-forge + - plotly +dependencies: + # conda packages for NeuroHackademy + - git-annex + - graphviz + - plotly + # ------------------------------------------------------------------------- + + # Base packages otherwise pinned in repo2docker, by adding them here we get + # more recent versions such as JupyterLab 2. + # ref: https://github.com/jupyter/repo2docker/blob/master/repo2docker/buildpacks/conda/environment.yml + - python=3.7 + - ipywidgets + - jupyterhub-singleuser + - jupyterlab + - nbconvert + - nbresuse + - notebook + + - pip + - pip: + # pip packages for NeuroHackademy + - cython + - dask[complete] + - datalad + - nibabel + - indexed-gzip + - nilearn + - transforms3d + - rise + - jupytext[myst] + - myst-nb + - numba + - pandas + - awscli + - s3fs + - gcsfs + - line_profiler + - memory_profiler + - graphviz + - matplotlib + - mne + - numpy + - scipy + - sklearn + - neuropythy + - ipyvolume==0.6.0a6 + - pytest + - dipy + - nitime + - xarray + - mne + - git+https://github.com/arokem/POT.git@pep518 + - git+https://github.com/arokem/mtw.git@pep518 + - imageio + - ipydatawidgets # dependency for one of plotly's jupyterlab extensions + - voila + - kaleido # plotly static image export: https://github.com/plotly/plotly.py#static-image-export + - nipype + - git+https://github.com/nipype/pydra.git@50051730c4bf894ce9ba4833f8c267b5993e0ce0 + - pydra-ml + - git+https://github.com/ReproNim/neurodocker.git@e64f58cc2d93620e6537d9efb0104cc87a99e5ca + - pyld + - testkraken + - seaborn + - statsmodels + - pytest-notebook # Testing the notebooks in CI + # ----------------------------------------------------------------------- + + # Needed by the neurohackademy Helm chart + - nbgitpuller diff --git a/binder/postBuild b/binder/postBuild new file mode 100644 index 0000000..080bf2d --- /dev/null +++ b/binder/postBuild @@ -0,0 +1,29 @@ +#!/bin/bash + +# ipyvolume depend on bqplot as of 27 July 2020 +# plotly instructions: https://github.com/plotly/plotly.py#jupyterlab-support-python-35 +# - I think jupyterlab-datawidgets is a dependency as well through threejs or +# similar. This is a general mess =/ +jupyter labextension install --dev-build=False --minimize=True \ + @jupyter-voila/jupyterlab-preview \ + @jupyter-widgets/jupyterlab-manager \ + bqplot \ + ipyvolume \ + jupyterlab-datawidgets \ + jupyterlab-plotly \ + plotlywidget \ + && echo JupyterLab extensions installed. + +# Enable use of a /voila path like /lab and /tree +jupyter serverextension enable --sys-prefix voila + +git config --global user.name "Neuro Hacker" +git config --global user.email hacker@neurohackademy.org + +mkdir data && \ + mkdir data/openneuro && \ + cd data/openneuro && \ + datalad install ///openfmri/ds000114 && \ + datalad get ds000114 && + cd ds000114 && \ + datalad get sub-01/ses-test/func/ \ No newline at end of file