From e8c309709c6e104b486ff658466a1b753adc94a7 Mon Sep 17 00:00:00 2001 From: Alex Kerney Date: Sun, 14 Aug 2022 12:55:14 -0400 Subject: [PATCH 1/3] Including the tutorials A first pass at including the tutorials on the website --- .github/workflows/check_sphinx_build.yml | 2 ++ .github/workflows/deploy-docs.yml | 2 ++ .gitmodules | 4 ++++ Makefile | 2 +- conf.py | 8 ++++++++ environment.yml | 1 + ohw22/index.md | 2 +- ohw22/schedule.md | 6 ++++++ ohw22/tutorials | 1 + ohw22/tutorials-index/data-access-in-python.md | 9 +++++++++ ohw22/tutorials-index/data-access-in-r.md | 7 +++++++ ohw22/tutorials-index/data-vis-in-python.md | 13 +++++++++++++ ohw22/tutorials-index/index.md | 11 +++++++++++ .../machine-learning-applications.md | 7 +++++++ requirements.txt | 1 + 15 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 .gitmodules create mode 160000 ohw22/tutorials create mode 100644 ohw22/tutorials-index/data-access-in-python.md create mode 100644 ohw22/tutorials-index/data-access-in-r.md create mode 100644 ohw22/tutorials-index/data-vis-in-python.md create mode 100644 ohw22/tutorials-index/index.md create mode 100644 ohw22/tutorials-index/machine-learning-applications.md diff --git a/.github/workflows/check_sphinx_build.yml b/.github/workflows/check_sphinx_build.yml index f6e484bc..e8e9f3ae 100644 --- a/.github/workflows/check_sphinx_build.yml +++ b/.github/workflows/check_sphinx_build.yml @@ -12,6 +12,8 @@ jobs: # https://github.com/actions/checkout - name: Checkout uses: actions/checkout@v2 + with: + submodules: true - name: Install Conda environment from environment.yml uses: mamba-org/provision-with-micromamba@v11 diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 97cd7219..c73fbb0f 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -8,6 +8,8 @@ jobs: steps: - uses: actions/checkout@v2 + with: + submodules: true - name: Install Conda environment from environment.yml uses: mamba-org/provision-with-micromamba@v11 diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..018b5e7a --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "ohw22/tutorials"] + path = ohw22/tutorials + url = https://github.com/oceanhackweek/ohw-tutorials.git + branch = OHW22 diff --git a/Makefile b/Makefile index e7f33409..2cc8544a 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ help: @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) live: - sphinx-autobuild --ignore '_build/**/*' --ignore '**/.ipynb_checkpoints/*' --ignore 'jupyter_execute/**/*' -b dirhtml . _build/dirhtml/ + sphinx-autobuild --re-ignore '_build\/jupyter_execute\/.*' --ignore '_build/jupyter_execute/**/*' --ignore '**/.ipynb_checkpoints/*' --ignore 'jupyter_execute/**/*' -b dirhtml . _build/dirhtml/ .PHONY: help Makefile diff --git a/conf.py b/conf.py index 32d0d689..137b718c 100644 --- a/conf.py +++ b/conf.py @@ -41,6 +41,7 @@ "README.md", "jupyter_execute/**/*", "_InstructionSiteUpdates.md", + "_build/**" ] # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. @@ -137,6 +138,13 @@ # Temporarily stored as off until we fix it jupyter_execute_notebooks = "off" # TODO test +nb_custom_formats = { + ".Rmd": [ + "jupytext.reads", + {"fmt": "Rmd"} + ] +} + def setup(app): app.add_css_file("custom.css") diff --git a/environment.yml b/environment.yml index 67045921..368cf857 100644 --- a/environment.yml +++ b/environment.yml @@ -6,6 +6,7 @@ dependencies: # website/blog building - myst-nb>=0.16.0 - sphinx>= 5.0.2 + - jupytext # - sphinx-panels - ablog>=0.10.26 - sphinx-autobuild>=2021.3.14 diff --git a/ohw22/index.md b/ohw22/index.md index 4787775f..49ac4cce 100644 --- a/ohw22/index.md +++ b/ohw22/index.md @@ -107,6 +107,7 @@ schedule Global Virtual Event Regional Satellite Events Organizers +tutorials-index/index ``` ```{toctree} @@ -116,7 +117,6 @@ Organizers Logistics <../resources/logistics/index> Preparation <../resources/prep/index> -Tutorials <../resources/tutorials/getting_started> Projects <../resources/projects/index> ``` diff --git a/ohw22/schedule.md b/ohw22/schedule.md index 3540b22b..fcadefa9 100644 --- a/ohw22/schedule.md +++ b/ohw22/schedule.md @@ -18,3 +18,9 @@ For satellite event schedules, please check out their individual pages to see ho - [Australia](./australia/index.md) - [Brazil](./brazil/index.md) - [EspaƱol](./espanol/index.es.md) + +```{toctree} +:hidden: + +monday +``` \ No newline at end of file diff --git a/ohw22/tutorials b/ohw22/tutorials new file mode 160000 index 00000000..16dfe46e --- /dev/null +++ b/ohw22/tutorials @@ -0,0 +1 @@ +Subproject commit 16dfe46eec5a39cbd0c9172c7406d44426971070 diff --git a/ohw22/tutorials-index/data-access-in-python.md b/ohw22/tutorials-index/data-access-in-python.md new file mode 100644 index 00000000..a12f6796 --- /dev/null +++ b/ohw22/tutorials-index/data-access-in-python.md @@ -0,0 +1,9 @@ +# Data access in Python + +```{toctree} +../tutorials/01-Tue/00-data-access-in-python/00-data-access.ipynb +../tutorials/01-Tue/00-data-access-in-python/01-extras-https.ipynb +../tutorials/01-Tue/00-data-access-in-python/02-extras-data-clean-up.ipynb +../tutorials/01-Tue/00-data-access-in-python/03-extras-argopy-erddap.ipynb +../tutorials/01-Tue/00-data-access-in-python/04-extras-erddapy_saildrone.ipynb +``` diff --git a/ohw22/tutorials-index/data-access-in-r.md b/ohw22/tutorials-index/data-access-in-r.md new file mode 100644 index 00000000..77f819c8 --- /dev/null +++ b/ohw22/tutorials-index/data-access-in-r.md @@ -0,0 +1,7 @@ +# Data access in R + +```{toctree} +../tutorials/01-Tue/00-data-access-in-R/01_data_access.Rmd +../tutorials/01-Tue/00-data-access-in-R/02_get_nbdc.Rmd +../tutorials/01-Tue/00-data-access-in-R/03_get_nao.Rmd +``` diff --git a/ohw22/tutorials-index/data-vis-in-python.md b/ohw22/tutorials-index/data-vis-in-python.md new file mode 100644 index 00000000..72c18d31 --- /dev/null +++ b/ohw22/tutorials-index/data-vis-in-python.md @@ -0,0 +1,13 @@ +# Data visualization in Python + +```{toctree} + +../tutorials/02-Wed/01-data-visualization-in-python/tutorial/index.ipynb +../tutorials/02-Wed/01-data-visualization-in-python/tutorial/00_Setup.ipynb +../tutorials/02-Wed/01-data-visualization-in-python/tutorial/01_Overview.ipynb +../tutorials/02-Wed/01-data-visualization-in-python/tutorial/02_Building_Panels.ipynb +../tutorials/02-Wed/01-data-visualization-in-python/tutorial/03_Interlinked_Panels.ipynb +../tutorials/02-Wed/01-data-visualization-in-python/tutorial/04_Basic_Plotting.ipynb +../tutorials/02-Wed/01-data-visualization-in-python/tutorial/05_Composing_Plots.ipynb + +``` \ No newline at end of file diff --git a/ohw22/tutorials-index/index.md b/ohw22/tutorials-index/index.md new file mode 100644 index 00000000..8f3ca95c --- /dev/null +++ b/ohw22/tutorials-index/index.md @@ -0,0 +1,11 @@ +# Tutorials + +```{toctree} + +../../resources/tutorials/getting_started +../tutorials/00-Mon/xarray-in-45-min.ipynb +data-access-in-python +data-access-in-r +data-vis-in-python +machine-learning-applications +``` \ No newline at end of file diff --git a/ohw22/tutorials-index/machine-learning-applications.md b/ohw22/tutorials-index/machine-learning-applications.md new file mode 100644 index 00000000..555b9c46 --- /dev/null +++ b/ohw22/tutorials-index/machine-learning-applications.md @@ -0,0 +1,7 @@ +# Machine learning applications + +```{toctree} +../tutorials/03-Thu/00-machine-learning/00-unsupervised-PCA.ipynb +../tutorials/03-Thu/00-machine-learning/01-unsupervised-kmeans.ipynb +../tutorials/03-Thu/00-machine-learning/02-supervised-knn.ipynb +``` diff --git a/requirements.txt b/requirements.txt index 949c790e..a8f99592 100644 --- a/requirements.txt +++ b/requirements.txt @@ -44,6 +44,7 @@ jupyter-client==7.3.4 jupyter-core==4.10.0 jupyterlab-pygments==0.2.2 jupyterlab-widgets==1.1.1 +jupytext==1.14.0 livereload==2.6.3 lxml==4.9.1 markdown-it-py==2.1.0 From c44b4e2dd4d381f6e43541ce068fb911c4ac82c0 Mon Sep 17 00:00:00 2001 From: Alex Kerney Date: Sun, 14 Aug 2022 13:23:52 -0400 Subject: [PATCH 2/3] A swing at optional tutorials --- ohw22/index.md | 2 +- ohw22/tutorials-index/espanol/index.md | 5 +++++ ohw22/tutorials-index/espanol/python-cientifico.md | 8 ++++++++ ohw22/tutorials-index/index.md | 4 +++- 4 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 ohw22/tutorials-index/espanol/index.md create mode 100644 ohw22/tutorials-index/espanol/python-cientifico.md diff --git a/ohw22/index.md b/ohw22/index.md index 49ac4cce..52daabe4 100644 --- a/ohw22/index.md +++ b/ohw22/index.md @@ -99,7 +99,7 @@ In coordination with the OHW Northwest satellite event, there will be a **[3-wee ```{toctree} -:maxdepth: 2 +:maxdepth: 3 :caption: OceanHackWeek 2022 (OHW22) :hidden: diff --git a/ohw22/tutorials-index/espanol/index.md b/ohw22/tutorials-index/espanol/index.md new file mode 100644 index 00000000..c4eef42e --- /dev/null +++ b/ohw22/tutorials-index/espanol/index.md @@ -0,0 +1,5 @@ +# Espanol Tutorials + +```{toctree} +python-cientifico +``` diff --git a/ohw22/tutorials-index/espanol/python-cientifico.md b/ohw22/tutorials-index/espanol/python-cientifico.md new file mode 100644 index 00000000..a1ddbc68 --- /dev/null +++ b/ohw22/tutorials-index/espanol/python-cientifico.md @@ -0,0 +1,8 @@ +# Python Cientifico + +```{toctree} +Intro to Python <../../tutorials/optional/espanol/python-cientifico/intro_to_python_ohw2022.ipynb> +Read tabular data<../../tutorials/optional/espanol/python-cientifico/read_tabulardata.ipynb> +Intro to Plotting <../../tutorials/optional/espanol/python-cientifico/Intro_to_plot.ipynb> +Intro to NetCDF <../../tutorials/optional/espanol/python-cientifico/intro_to_netcdf.ipynb> +``` diff --git a/ohw22/tutorials-index/index.md b/ohw22/tutorials-index/index.md index 8f3ca95c..f8ba51d7 100644 --- a/ohw22/tutorials-index/index.md +++ b/ohw22/tutorials-index/index.md @@ -8,4 +8,6 @@ data-access-in-python data-access-in-r data-vis-in-python machine-learning-applications -``` \ No newline at end of file +espanol/index +../tutorials/optional/managing-conda-envs/README.md +``` From 44e4d97e0ddc1a4acc52449676f538ff32d7be27 Mon Sep 17 00:00:00 2001 From: Alex Kerney Date: Sun, 14 Aug 2022 21:17:59 -0400 Subject: [PATCH 3/3] Tweaks to toctrees --- ohw22/tutorials-index/data-access-in-python.md | 1 + ohw22/tutorials-index/data-vis-in-python.md | 2 +- ohw22/tutorials-index/espanol/index.md | 1 + ohw22/tutorials-index/index.md | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ohw22/tutorials-index/data-access-in-python.md b/ohw22/tutorials-index/data-access-in-python.md index a12f6796..3a052621 100644 --- a/ohw22/tutorials-index/data-access-in-python.md +++ b/ohw22/tutorials-index/data-access-in-python.md @@ -1,6 +1,7 @@ # Data access in Python ```{toctree} + ../tutorials/01-Tue/00-data-access-in-python/00-data-access.ipynb ../tutorials/01-Tue/00-data-access-in-python/01-extras-https.ipynb ../tutorials/01-Tue/00-data-access-in-python/02-extras-data-clean-up.ipynb diff --git a/ohw22/tutorials-index/data-vis-in-python.md b/ohw22/tutorials-index/data-vis-in-python.md index 72c18d31..092255f0 100644 --- a/ohw22/tutorials-index/data-vis-in-python.md +++ b/ohw22/tutorials-index/data-vis-in-python.md @@ -10,4 +10,4 @@ ../tutorials/02-Wed/01-data-visualization-in-python/tutorial/04_Basic_Plotting.ipynb ../tutorials/02-Wed/01-data-visualization-in-python/tutorial/05_Composing_Plots.ipynb -``` \ No newline at end of file +``` diff --git a/ohw22/tutorials-index/espanol/index.md b/ohw22/tutorials-index/espanol/index.md index c4eef42e..00af5373 100644 --- a/ohw22/tutorials-index/espanol/index.md +++ b/ohw22/tutorials-index/espanol/index.md @@ -2,4 +2,5 @@ ```{toctree} python-cientifico +../../tutorials/optional/espanol/datos-espaciales-tidy/Notas.Rmd ``` diff --git a/ohw22/tutorials-index/index.md b/ohw22/tutorials-index/index.md index f8ba51d7..de96dd57 100644 --- a/ohw22/tutorials-index/index.md +++ b/ohw22/tutorials-index/index.md @@ -1,6 +1,7 @@ # Tutorials ```{toctree} +:maxdepth: 1 ../../resources/tutorials/getting_started ../tutorials/00-Mon/xarray-in-45-min.ipynb